From a602b762208f858dc892c6af9cb8a54c9139d286 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Nov 2023 09:56:57 +0000 Subject: [PATCH] misc: Version v0.51.0-beta --- .openapi-generator/FILES | 33 +- .travis.yml | 2 +- README.md | 22 +- docs/CreditNoteCreateInputCreditNote.md | 2 +- docs/CreditNoteEstimateInput.md | 18 + docs/CreditNoteEstimateInputCreditNote.md | 20 + ...itNoteEstimateInputCreditNoteItemsInner.md | 20 + docs/CreditNoteEstimated.md | 18 + .../CreditNoteEstimatedEstimatedCreditNote.md | 38 ++ ...tedEstimatedCreditNoteAppliedTaxesInner.md | 32 ++ ...eEstimatedEstimatedCreditNoteItemsInner.md | 20 + docs/CreditNoteItemObjectFee.md | 2 + docs/CreditNoteObject.md | 4 +- docs/CreditNotesApi.md | 72 +++ docs/EventsApi.md | 13 +- docs/FeeObject.md | 2 + docs/FeeObjectItem.md | 2 + docs/PlanOverridesObject.md | 32 ++ docs/PlanOverridesObjectChargesInner.md | 28 + docs/Subscription.md | 2 +- docs/SubscriptionCreateInputSubscription.md | 4 +- docs/SubscriptionObjectExtended.md | 52 ++ docs/SubscriptionUpdateInputSubscription.md | 4 +- lago_ruby.gemspec | 2 +- lib/lago_ruby.rb | 13 +- lib/lago_ruby/api/add_ons_api.rb | 2 +- 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 | 66 ++- lib/lago_ruby/api/customers_api.rb | 2 +- lib/lago_ruby/api/events_api.rb | 12 +- 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 | 23 +- lib/lago_ruby/api_error.rb | 2 +- lib/lago_ruby/configuration.rb | 2 +- lib/lago_ruby/models/add_on.rb | 4 +- lib/lago_ruby/models/add_on_base_input.rb | 4 +- lib/lago_ruby/models/add_on_create_input.rb | 4 +- .../models/add_on_create_input_add_on.rb | 4 +- lib/lago_ruby/models/add_on_object.rb | 4 +- lib/lago_ruby/models/add_on_update_input.rb | 4 +- lib/lago_ruby/models/add_ons_paginated.rb | 4 +- lib/lago_ruby/models/api_error_bad_request.rb | 4 +- lib/lago_ruby/models/api_error_forbidden.rb | 4 +- lib/lago_ruby/models/api_error_not_allowed.rb | 4 +- lib/lago_ruby/models/api_error_not_found.rb | 4 +- .../models/api_error_unauthorized.rb | 4 +- .../models/api_error_unprocessable_entity.rb | 4 +- lib/lago_ruby/models/applied_coupon.rb | 4 +- lib/lago_ruby/models/applied_coupon_input.rb | 4 +- .../applied_coupon_input_applied_coupon.rb | 4 +- lib/lago_ruby/models/applied_coupon_object.rb | 4 +- .../models/applied_coupon_object_extended.rb | 4 +- .../models/applied_coupons_paginated.rb | 4 +- lib/lago_ruby/models/base_applied_tax.rb | 4 +- lib/lago_ruby/models/billable_metric.rb | 4 +- .../models/billable_metric_base_input.rb | 4 +- .../models/billable_metric_create_input.rb | 4 +- ...ble_metric_create_input_billable_metric.rb | 4 +- lib/lago_ruby/models/billable_metric_group.rb | 4 +- .../billable_metric_group_values_inner.rb | 2 +- ...llable_metric_group_values_inner_one_of.rb | 4 +- .../models/billable_metric_object.rb | 4 +- .../models/billable_metric_update_input.rb | 4 +- .../models/billable_metrics_paginated.rb | 4 +- lib/lago_ruby/models/charge_object.rb | 4 +- .../models/charge_object_properties.rb | 4 +- lib/lago_ruby/models/charge_properties.rb | 4 +- ...rties_graduated_percentage_ranges_inner.rb | 4 +- ...harge_properties_graduated_ranges_inner.rb | 4 +- .../charge_properties_volume_ranges_inner.rb | 4 +- lib/lago_ruby/models/country.rb | 2 +- lib/lago_ruby/models/coupon.rb | 4 +- lib/lago_ruby/models/coupon_base_input.rb | 4 +- .../models/coupon_base_input_applies_to.rb | 4 +- lib/lago_ruby/models/coupon_create_input.rb | 4 +- .../models/coupon_create_input_coupon.rb | 4 +- lib/lago_ruby/models/coupon_object.rb | 4 +- lib/lago_ruby/models/coupon_update_input.rb | 4 +- lib/lago_ruby/models/coupons_paginated.rb | 4 +- lib/lago_ruby/models/credit_note.rb | 4 +- .../models/credit_note_applied_tax_object.rb | 4 +- .../models/credit_note_create_input.rb | 4 +- .../credit_note_create_input_credit_note.rb | 6 +- .../models/credit_note_estimate_input.rb | 221 ++++++++ .../credit_note_estimate_input_credit_note.rb | 241 +++++++++ ..._estimate_input_credit_note_items_inner.rb | 239 +++++++++ lib/lago_ruby/models/credit_note_estimated.rb | 221 ++++++++ ...it_note_estimated_estimated_credit_note.rb | 387 +++++++++++++ ...timated_credit_note_applied_taxes_inner.rb | 283 ++++++++++ ...mated_estimated_credit_note_items_inner.rb | 235 ++++++++ .../models/credit_note_item_object.rb | 4 +- .../models/credit_note_item_object_fee.rb | 23 +- lib/lago_ruby/models/credit_note_object.rb | 26 +- .../models/credit_note_update_input.rb | 4 +- .../credit_note_update_input_credit_note.rb | 4 +- lib/lago_ruby/models/credit_notes.rb | 4 +- lib/lago_ruby/models/credit_object.rb | 4 +- lib/lago_ruby/models/credit_object_invoice.rb | 4 +- lib/lago_ruby/models/credit_object_item.rb | 4 +- lib/lago_ruby/models/currency.rb | 2 +- lib/lago_ruby/models/customer.rb | 4 +- .../models/customer_billing_configuration.rb | 4 +- .../models/customer_charge_usage_object.rb | 4 +- ...mer_charge_usage_object_billable_metric.rb | 4 +- .../customer_charge_usage_object_charge.rb | 4 +- ...stomer_charge_usage_object_groups_inner.rb | 4 +- lib/lago_ruby/models/customer_create_input.rb | 4 +- .../models/customer_create_input_customer.rb | 4 +- ...er_create_input_customer_metadata_inner.rb | 4 +- lib/lago_ruby/models/customer_metadata.rb | 4 +- lib/lago_ruby/models/customer_object.rb | 4 +- .../models/customer_object_extended.rb | 4 +- lib/lago_ruby/models/customer_past_usage.rb | 4 +- lib/lago_ruby/models/customer_usage.rb | 4 +- lib/lago_ruby/models/customer_usage_object.rb | 4 +- lib/lago_ruby/models/customers_paginated.rb | 4 +- lib/lago_ruby/models/event.rb | 4 +- lib/lago_ruby/models/event_batch_input.rb | 4 +- .../models/event_batch_input_event.rb | 4 +- .../event_batch_input_event_properties.rb | 4 +- .../models/event_estimate_fees_input.rb | 4 +- .../models/event_estimate_fees_input_event.rb | 4 +- lib/lago_ruby/models/event_input.rb | 4 +- lib/lago_ruby/models/event_input_event.rb | 4 +- .../models/event_input_event_timestamp.rb | 2 +- lib/lago_ruby/models/event_object.rb | 28 +- .../models/event_object_properties.rb | 4 +- lib/lago_ruby/models/fee.rb | 4 +- .../models/fee_applied_tax_object.rb | 4 +- lib/lago_ruby/models/fee_object.rb | 23 +- lib/lago_ruby/models/fee_object_item.rb | 16 +- lib/lago_ruby/models/fee_update_input.rb | 4 +- lib/lago_ruby/models/fee_update_input_fee.rb | 4 +- lib/lago_ruby/models/fees.rb | 4 +- lib/lago_ruby/models/fees_paginated.rb | 4 +- .../get_customer_portal_url200_response.rb | 4 +- ...ustomer_portal_url200_response_customer.rb | 4 +- lib/lago_ruby/models/group_object.rb | 4 +- .../models/group_properties_object.rb | 4 +- .../models/group_properties_object_values.rb | 4 +- lib/lago_ruby/models/groups_paginated.rb | 4 +- lib/lago_ruby/models/invoice.rb | 4 +- .../models/invoice_applied_tax_object.rb | 4 +- .../models/invoice_metadata_object.rb | 4 +- lib/lago_ruby/models/invoice_object.rb | 4 +- .../models/invoice_object_customer.rb | 4 +- .../models/invoice_object_extended.rb | 4 +- .../models/invoice_one_off_create_input.rb | 4 +- .../invoice_one_off_create_input_invoice.rb | 4 +- ...one_off_create_input_invoice_fees_inner.rb | 4 +- lib/lago_ruby/models/invoice_update_input.rb | 4 +- .../models/invoice_update_input_invoice.rb | 4 +- ...ice_update_input_invoice_metadata_inner.rb | 4 +- lib/lago_ruby/models/invoices_paginated.rb | 4 +- lib/lago_ruby/models/organization.rb | 4 +- .../organization_billing_configuration.rb | 4 +- lib/lago_ruby/models/organization_object.rb | 4 +- .../models/organization_update_input.rb | 4 +- .../organization_update_input_organization.rb | 4 +- lib/lago_ruby/models/pagination_meta.rb | 4 +- lib/lago_ruby/models/plan.rb | 4 +- lib/lago_ruby/models/plan_create_input.rb | 4 +- .../models/plan_create_input_plan.rb | 4 +- .../plan_create_input_plan_charges_inner.rb | 4 +- ...an_charges_inner_group_properties_inner.rb | 4 +- lib/lago_ruby/models/plan_object.rb | 4 +- lib/lago_ruby/models/plan_overrides_object.rb | 289 ++++++++++ .../plan_overrides_object_charges_inner.rb | 268 +++++++++ lib/lago_ruby/models/plan_update_input.rb | 4 +- .../models/plan_update_input_plan.rb | 4 +- .../plan_update_input_plan_charges_inner.rb | 4 +- lib/lago_ruby/models/plans_paginated.rb | 4 +- lib/lago_ruby/models/subscription.rb | 6 +- .../models/subscription_create_input.rb | 4 +- .../subscription_create_input_subscription.rb | 21 +- lib/lago_ruby/models/subscription_object.rb | 4 +- .../models/subscription_object_extended.rb | 507 ++++++++++++++++++ .../models/subscription_update_input.rb | 4 +- .../subscription_update_input_subscription.rb | 21 +- .../models/subscriptions_paginated.rb | 4 +- lib/lago_ruby/models/tax.rb | 4 +- lib/lago_ruby/models/tax_base_input.rb | 4 +- lib/lago_ruby/models/tax_create_input.rb | 4 +- lib/lago_ruby/models/tax_create_input_tax.rb | 4 +- lib/lago_ruby/models/tax_object.rb | 4 +- lib/lago_ruby/models/tax_update_input.rb | 4 +- lib/lago_ruby/models/taxes_paginated.rb | 4 +- lib/lago_ruby/models/timezone.rb | 2 +- lib/lago_ruby/models/wallet.rb | 4 +- lib/lago_ruby/models/wallet_create_input.rb | 4 +- .../models/wallet_create_input_wallet.rb | 4 +- lib/lago_ruby/models/wallet_object.rb | 4 +- .../models/wallet_transaction_create_input.rb | 4 +- ...saction_create_input_wallet_transaction.rb | 4 +- .../models/wallet_transaction_object.rb | 4 +- lib/lago_ruby/models/wallet_transactions.rb | 4 +- .../models/wallet_transactions_paginated.rb | 4 +- lib/lago_ruby/models/wallet_update_input.rb | 4 +- .../models/wallet_update_input_wallet.rb | 4 +- lib/lago_ruby/models/wallets_paginated.rb | 4 +- lib/lago_ruby/models/webhook_endpoint.rb | 4 +- .../models/webhook_endpoint_create_input.rb | 4 +- ..._endpoint_create_input_webhook_endpoint.rb | 4 +- .../models/webhook_endpoint_object.rb | 4 +- .../models/webhook_endpoint_update_input.rb | 4 +- .../models/webhook_endpoints_paginated.rb | 4 +- lib/lago_ruby/version.rb | 4 +- spec/api_client_spec.rb | 2 +- spec/configuration_spec.rb | 2 +- ...mate_input_credit_note_items_inner_spec.rb | 42 ++ ...it_note_estimate_input_credit_note_spec.rb | 42 ++ .../models/credit_note_estimate_input_spec.rb | 36 ++ ...ed_credit_note_applied_taxes_inner_spec.rb | 78 +++ ..._estimated_credit_note_items_inner_spec.rb | 42 ++ ...te_estimated_estimated_credit_note_spec.rb | 96 ++++ spec/models/credit_note_estimated_spec.rb | 36 ++ ...lan_overrides_object_charges_inner_spec.rb | 66 +++ spec/models/plan_overrides_object_spec.rb | 78 +++ .../subscription_object_extended_spec.rb | 146 +++++ spec/spec_helper.rb | 2 +- 229 files changed, 4496 insertions(+), 427 deletions(-) create mode 100644 docs/CreditNoteEstimateInput.md create mode 100644 docs/CreditNoteEstimateInputCreditNote.md create mode 100644 docs/CreditNoteEstimateInputCreditNoteItemsInner.md create mode 100644 docs/CreditNoteEstimated.md create mode 100644 docs/CreditNoteEstimatedEstimatedCreditNote.md create mode 100644 docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md create mode 100644 docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md create mode 100644 docs/PlanOverridesObject.md create mode 100644 docs/PlanOverridesObjectChargesInner.md create mode 100644 docs/SubscriptionObjectExtended.md create mode 100644 lib/lago_ruby/models/credit_note_estimate_input.rb create mode 100644 lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb create mode 100644 lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb create mode 100644 lib/lago_ruby/models/credit_note_estimated.rb create mode 100644 lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb create mode 100644 lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb create mode 100644 lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb create mode 100644 lib/lago_ruby/models/plan_overrides_object.rb create mode 100644 lib/lago_ruby/models/plan_overrides_object_charges_inner.rb create mode 100644 lib/lago_ruby/models/subscription_object_extended.rb create mode 100644 spec/models/credit_note_estimate_input_credit_note_items_inner_spec.rb create mode 100644 spec/models/credit_note_estimate_input_credit_note_spec.rb create mode 100644 spec/models/credit_note_estimate_input_spec.rb create mode 100644 spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb create mode 100644 spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb create mode 100644 spec/models/credit_note_estimated_estimated_credit_note_spec.rb create mode 100644 spec/models/credit_note_estimated_spec.rb create mode 100644 spec/models/plan_overrides_object_charges_inner_spec.rb create mode 100644 spec/models/plan_overrides_object_spec.rb create mode 100644 spec/models/subscription_object_extended_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fa3a435..80e7412 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -58,7 +58,13 @@ docs/CreditNote.md docs/CreditNoteAppliedTaxObject.md docs/CreditNoteCreateInput.md docs/CreditNoteCreateInputCreditNote.md -docs/CreditNoteCreateInputCreditNoteItemsInner.md +docs/CreditNoteEstimateInput.md +docs/CreditNoteEstimateInputCreditNote.md +docs/CreditNoteEstimateInputCreditNoteItemsInner.md +docs/CreditNoteEstimated.md +docs/CreditNoteEstimatedEstimatedCreditNote.md +docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md +docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md docs/CreditNoteItemObject.md docs/CreditNoteItemObjectFee.md docs/CreditNoteObject.md @@ -141,6 +147,8 @@ docs/PlanCreateInputPlan.md docs/PlanCreateInputPlanChargesInner.md docs/PlanCreateInputPlanChargesInnerGroupPropertiesInner.md docs/PlanObject.md +docs/PlanOverridesObject.md +docs/PlanOverridesObjectChargesInner.md docs/PlanUpdateInput.md docs/PlanUpdateInputPlan.md docs/PlanUpdateInputPlanChargesInner.md @@ -150,6 +158,7 @@ docs/Subscription.md docs/SubscriptionCreateInput.md docs/SubscriptionCreateInputSubscription.md docs/SubscriptionObject.md +docs/SubscriptionObjectExtended.md docs/SubscriptionUpdateInput.md docs/SubscriptionUpdateInputSubscription.md docs/SubscriptionsApi.md @@ -254,7 +263,13 @@ lib/lago_ruby/models/credit_note.rb lib/lago_ruby/models/credit_note_applied_tax_object.rb lib/lago_ruby/models/credit_note_create_input.rb lib/lago_ruby/models/credit_note_create_input_credit_note.rb -lib/lago_ruby/models/credit_note_create_input_credit_note_items_inner.rb +lib/lago_ruby/models/credit_note_estimate_input.rb +lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb +lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb +lib/lago_ruby/models/credit_note_estimated.rb +lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb +lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb +lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb lib/lago_ruby/models/credit_note_item_object.rb lib/lago_ruby/models/credit_note_item_object_fee.rb lib/lago_ruby/models/credit_note_object.rb @@ -331,6 +346,8 @@ lib/lago_ruby/models/plan_create_input_plan.rb lib/lago_ruby/models/plan_create_input_plan_charges_inner.rb lib/lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner.rb lib/lago_ruby/models/plan_object.rb +lib/lago_ruby/models/plan_overrides_object.rb +lib/lago_ruby/models/plan_overrides_object_charges_inner.rb lib/lago_ruby/models/plan_update_input.rb lib/lago_ruby/models/plan_update_input_plan.rb lib/lago_ruby/models/plan_update_input_plan_charges_inner.rb @@ -339,6 +356,7 @@ lib/lago_ruby/models/subscription.rb lib/lago_ruby/models/subscription_create_input.rb lib/lago_ruby/models/subscription_create_input_subscription.rb lib/lago_ruby/models/subscription_object.rb +lib/lago_ruby/models/subscription_object_extended.rb lib/lago_ruby/models/subscription_update_input.rb lib/lago_ruby/models/subscription_update_input_subscription.rb lib/lago_ruby/models/subscriptions_paginated.rb @@ -371,5 +389,14 @@ lib/lago_ruby/models/webhook_endpoints_paginated.rb lib/lago_ruby/version.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/customer_past_usage_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/spec_helper.rb diff --git a/.travis.yml b/.travis.yml index d8a8875..a75ac94 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.49.0-beta.gem + - gem install ./lago_ruby-0.51.0-beta.gem diff --git a/README.md b/README.md index dc25441..c924a7c 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ 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.49.0-beta -- Package version: 0.49.0-beta +- API version: 0.51.0-beta +- Package version: 0.51.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.49.0-beta.gem +gem install ./lago_ruby-0.51.0-beta.gem ``` -(for development, run `gem install --dev ./lago_ruby-0.49.0-beta.gem` to install the development dependencies) +(for development, run `gem install --dev ./lago_ruby-0.51.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.49.0-beta' + gem 'lago_ruby', '~> 0.51.0-beta' ### Install from Git @@ -109,6 +109,7 @@ Class | Method | HTTP request | Description *LagoAPI::CouponsApi* | [**update_coupon**](docs/CouponsApi.md#update_coupon) | **PUT** /coupons/{code} | Update a coupon *LagoAPI::CreditNotesApi* | [**create_credit_note**](docs/CreditNotesApi.md#create_credit_note) | **POST** /credit_notes | Create a credit note *LagoAPI::CreditNotesApi* | [**download_credit_note**](docs/CreditNotesApi.md#download_credit_note) | **POST** /credit_notes/{lago_id}/download | Download a credit note PDF +*LagoAPI::CreditNotesApi* | [**estimate_credit_note**](docs/CreditNotesApi.md#estimate_credit_note) | **POST** /credit_notes/estimate | Estimate amounts for a new credit note *LagoAPI::CreditNotesApi* | [**find_all_credit_notes**](docs/CreditNotesApi.md#find_all_credit_notes) | **GET** /credit_notes | List all credit notes *LagoAPI::CreditNotesApi* | [**find_credit_note**](docs/CreditNotesApi.md#find_credit_note) | **GET** /credit_notes/{lago_id} | Retrieve a credit note *LagoAPI::CreditNotesApi* | [**update_credit_note**](docs/CreditNotesApi.md#update_credit_note) | **PUT** /credit_notes/{lago_id} | Update a credit note @@ -218,7 +219,13 @@ Class | Method | HTTP request | Description - [LagoAPI::CreditNoteAppliedTaxObject](docs/CreditNoteAppliedTaxObject.md) - [LagoAPI::CreditNoteCreateInput](docs/CreditNoteCreateInput.md) - [LagoAPI::CreditNoteCreateInputCreditNote](docs/CreditNoteCreateInputCreditNote.md) - - [LagoAPI::CreditNoteCreateInputCreditNoteItemsInner](docs/CreditNoteCreateInputCreditNoteItemsInner.md) + - [LagoAPI::CreditNoteEstimateInput](docs/CreditNoteEstimateInput.md) + - [LagoAPI::CreditNoteEstimateInputCreditNote](docs/CreditNoteEstimateInputCreditNote.md) + - [LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner](docs/CreditNoteEstimateInputCreditNoteItemsInner.md) + - [LagoAPI::CreditNoteEstimated](docs/CreditNoteEstimated.md) + - [LagoAPI::CreditNoteEstimatedEstimatedCreditNote](docs/CreditNoteEstimatedEstimatedCreditNote.md) + - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner](docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md) + - [LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner](docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md) - [LagoAPI::CreditNoteItemObject](docs/CreditNoteItemObject.md) - [LagoAPI::CreditNoteItemObjectFee](docs/CreditNoteItemObjectFee.md) - [LagoAPI::CreditNoteObject](docs/CreditNoteObject.md) @@ -295,6 +302,8 @@ Class | Method | HTTP request | Description - [LagoAPI::PlanCreateInputPlanChargesInner](docs/PlanCreateInputPlanChargesInner.md) - [LagoAPI::PlanCreateInputPlanChargesInnerGroupPropertiesInner](docs/PlanCreateInputPlanChargesInnerGroupPropertiesInner.md) - [LagoAPI::PlanObject](docs/PlanObject.md) + - [LagoAPI::PlanOverridesObject](docs/PlanOverridesObject.md) + - [LagoAPI::PlanOverridesObjectChargesInner](docs/PlanOverridesObjectChargesInner.md) - [LagoAPI::PlanUpdateInput](docs/PlanUpdateInput.md) - [LagoAPI::PlanUpdateInputPlan](docs/PlanUpdateInputPlan.md) - [LagoAPI::PlanUpdateInputPlanChargesInner](docs/PlanUpdateInputPlanChargesInner.md) @@ -303,6 +312,7 @@ Class | Method | HTTP request | Description - [LagoAPI::SubscriptionCreateInput](docs/SubscriptionCreateInput.md) - [LagoAPI::SubscriptionCreateInputSubscription](docs/SubscriptionCreateInputSubscription.md) - [LagoAPI::SubscriptionObject](docs/SubscriptionObject.md) + - [LagoAPI::SubscriptionObjectExtended](docs/SubscriptionObjectExtended.md) - [LagoAPI::SubscriptionUpdateInput](docs/SubscriptionUpdateInput.md) - [LagoAPI::SubscriptionUpdateInputSubscription](docs/SubscriptionUpdateInputSubscription.md) - [LagoAPI::SubscriptionsPaginated](docs/SubscriptionsPaginated.md) diff --git a/docs/CreditNoteCreateInputCreditNote.md b/docs/CreditNoteCreateInputCreditNote.md index 1fc2923..50bdec3 100644 --- a/docs/CreditNoteCreateInputCreditNote.md +++ b/docs/CreditNoteCreateInputCreditNote.md @@ -9,7 +9,7 @@ | **description** | **String** | The description of the credit note. | [optional] | | **credit_amount_cents** | **Integer** | The total amount to be credited on the customer balance. | [optional] | | **refund_amount_cents** | **Integer** | The total amount to be refunded to the customer. | [optional] | -| **items** | [**Array<CreditNoteCreateInputCreditNoteItemsInner>**](CreditNoteCreateInputCreditNoteItemsInner.md) | The list of credit note’s items. | | +| **items** | [**Array<CreditNoteEstimateInputCreditNoteItemsInner>**](CreditNoteEstimateInputCreditNoteItemsInner.md) | The list of credit note’s items. | | ## Example diff --git a/docs/CreditNoteEstimateInput.md b/docs/CreditNoteEstimateInput.md new file mode 100644 index 0000000..6d83e21 --- /dev/null +++ b/docs/CreditNoteEstimateInput.md @@ -0,0 +1,18 @@ +# LagoAPI::CreditNoteEstimateInput + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **credit_note** | [**CreditNoteEstimateInputCreditNote**](CreditNoteEstimateInputCreditNote.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimateInput.new( + credit_note: null +) +``` + diff --git a/docs/CreditNoteEstimateInputCreditNote.md b/docs/CreditNoteEstimateInputCreditNote.md new file mode 100644 index 0000000..a71c9af --- /dev/null +++ b/docs/CreditNoteEstimateInputCreditNote.md @@ -0,0 +1,20 @@ +# LagoAPI::CreditNoteEstimateInputCreditNote + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **invoice_id** | **String** | The invoice unique identifier, created by Lago. | | +| **items** | [**Array<CreditNoteEstimateInputCreditNoteItemsInner>**](CreditNoteEstimateInputCreditNoteItemsInner.md) | The list of credit note’s items. | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimateInputCreditNote.new( + invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + items: [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}] +) +``` + diff --git a/docs/CreditNoteEstimateInputCreditNoteItemsInner.md b/docs/CreditNoteEstimateInputCreditNoteItemsInner.md new file mode 100644 index 0000000..91c9bd8 --- /dev/null +++ b/docs/CreditNoteEstimateInputCreditNoteItemsInner.md @@ -0,0 +1,20 @@ +# LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fee_id** | **String** | The fee unique identifier, created by Lago. | | +| **amount_cents** | **Integer** | The amount of the credit note item, expressed in cents. | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner.new( + fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + amount_cents: 10 +) +``` + diff --git a/docs/CreditNoteEstimated.md b/docs/CreditNoteEstimated.md new file mode 100644 index 0000000..44d2827 --- /dev/null +++ b/docs/CreditNoteEstimated.md @@ -0,0 +1,18 @@ +# LagoAPI::CreditNoteEstimated + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **estimated_credit_note** | [**CreditNoteEstimatedEstimatedCreditNote**](CreditNoteEstimatedEstimatedCreditNote.md) | | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimated.new( + estimated_credit_note: null +) +``` + diff --git a/docs/CreditNoteEstimatedEstimatedCreditNote.md b/docs/CreditNoteEstimatedEstimatedCreditNote.md new file mode 100644 index 0000000..df19fdf --- /dev/null +++ b/docs/CreditNoteEstimatedEstimatedCreditNote.md @@ -0,0 +1,38 @@ +# LagoAPI::CreditNoteEstimatedEstimatedCreditNote + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **lago_invoice_id** | **String** | Unique identifier assigned to the invoice that the credit note belongs to | | +| **invoice_number** | **String** | The invoice unique number, related to the credit note. | | +| **currency** | [**Currency**](Currency.md) | | | +| **taxes_amount_cents** | **Integer** | The tax amount of the credit note, expressed in cents. | | +| **taxes_rate** | **Float** | The tax rate associated with this specific credit note. | | +| **sub_total_excluding_taxes_amount_cents** | **Integer** | The subtotal of the credit note excluding any applicable taxes, expressed in cents. | | +| **max_creditable_amount_cents** | **Integer** | The credited amount of the credit note, expressed in cents. | | +| **max_refundable_amount_cents** | **Integer** | The refunded amount of the credit note, expressed in cents. | | +| **coupons_adjustment_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | | +| **items** | [**Array<CreditNoteEstimatedEstimatedCreditNoteItemsInner>**](CreditNoteEstimatedEstimatedCreditNoteItemsInner.md) | Array of credit note’s items. | | +| **applied_taxes** | [**Array<CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner>**](CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNote.new( + lago_invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + invoice_number: LAG-1234, + currency: null, + taxes_amount_cents: 20, + taxes_rate: 20, + sub_total_excluding_taxes_amount_cents: 100, + max_creditable_amount_cents: 100, + max_refundable_amount_cents: 0, + coupons_adjustment_amount_cents: 20, + items: null, + applied_taxes: null +) +``` + diff --git a/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md b/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md new file mode 100644 index 0000000..3d021bc --- /dev/null +++ b/docs/CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.md @@ -0,0 +1,32 @@ +# LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **lago_tax_id** | **String** | Unique identifier of the tax, created by Lago. | [optional] | +| **tax_name** | **String** | Name of the tax. | [optional] | +| **tax_code** | **String** | Unique code used to identify the tax associated with the API request. | [optional] | +| **tax_rate** | **Float** | The percentage rate of the tax | [optional] | +| **tax_description** | **String** | Internal description of the taxe | [optional] | +| **base_amount_cents** | **Integer** | | [optional] | +| **amount_cents** | **Integer** | Amount of the tax | [optional] | +| **amount_currency** | [**Currency**](Currency.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.new( + lago_tax_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + tax_name: TVA, + tax_code: french_standard_vat, + tax_rate: 20, + tax_description: French standard VAT, + base_amount_cents: 100, + amount_cents: 2000, + amount_currency: null +) +``` + diff --git a/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md b/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md new file mode 100644 index 0000000..d006bbc --- /dev/null +++ b/docs/CreditNoteEstimatedEstimatedCreditNoteItemsInner.md @@ -0,0 +1,20 @@ +# LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount_cents** | **Integer** | The credit note’s item amount, expressed in cents. | | +| **lago_fee_id** | **String** | Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system. | | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner.new( + amount_cents: 100, + lago_fee_id: 1a901a90-1a90-1a90-1a90-1a901a901a90 +) +``` + diff --git a/docs/CreditNoteItemObjectFee.md b/docs/CreditNoteItemObjectFee.md index 973831f..41ad97c 100644 --- a/docs/CreditNoteItemObjectFee.md +++ b/docs/CreditNoteItemObjectFee.md @@ -19,6 +19,7 @@ | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | | | **taxes_rate** | **Float** | The tax rate associated with this specific fee. | | | **units** | **String** | The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer. | | +| **precise_unit_amount** | **String** | The unit amount of the fee per unit, with precision. | | | **total_amount_cents** | **Integer** | The cost of this specific fee, including any applicable taxes. | | | **total_amount_currency** | [**Currency**](Currency.md) | | | | **events_count** | **Integer** | The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process. | [optional] | @@ -56,6 +57,7 @@ instance = LagoAPI::CreditNoteItemObjectFee.new( taxes_amount_cents: 20, taxes_rate: 20, units: 0.32, + precise_unit_amount: 312.5, total_amount_cents: 120, total_amount_currency: null, events_count: 23, diff --git a/docs/CreditNoteObject.md b/docs/CreditNoteObject.md index 5c4aed3..4b1f873 100644 --- a/docs/CreditNoteObject.md +++ b/docs/CreditNoteObject.md @@ -22,7 +22,7 @@ | **balance_amount_cents** | **Integer** | The remaining credit note amount, expressed in cents. | | | **credit_amount_cents** | **Integer** | The credited amount of the credit note, expressed in cents. | | | **refund_amount_cents** | **Integer** | The refunded amount of the credit note, expressed in cents. | | -| **coupons_adjustement_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | | +| **coupons_adjustment_amount_cents** | **Integer** | The pro-rated amount of the coupons applied to the source invoice. | | | **created_at** | **Time** | The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC). | | | **updated_at** | **Time** | The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC). | | | **file_url** | **String** | The PDF file of the credit note. | [optional] | @@ -53,7 +53,7 @@ instance = LagoAPI::CreditNoteObject.new( balance_amount_cents: 100, credit_amount_cents: 100, refund_amount_cents: 0, - coupons_adjustement_amount_cents: 20, + coupons_adjustment_amount_cents: 20, created_at: 2022-09-14T16:35:31Z, updated_at: 2022-09-14T16:35:31Z, file_url: https://getlago.com/credit_note/file, diff --git a/docs/CreditNotesApi.md b/docs/CreditNotesApi.md index dec574c..fa0dbd7 100644 --- a/docs/CreditNotesApi.md +++ b/docs/CreditNotesApi.md @@ -6,6 +6,7 @@ All URIs are relative to *https://api.getlago.com/api/v1* | ------ | ------------ | ----------- | | [**create_credit_note**](CreditNotesApi.md#create_credit_note) | **POST** /credit_notes | Create a credit note | | [**download_credit_note**](CreditNotesApi.md#download_credit_note) | **POST** /credit_notes/{lago_id}/download | Download a credit note PDF | +| [**estimate_credit_note**](CreditNotesApi.md#estimate_credit_note) | **POST** /credit_notes/estimate | Estimate amounts for a new credit note | | [**find_all_credit_notes**](CreditNotesApi.md#find_all_credit_notes) | **GET** /credit_notes | List all credit notes | | [**find_credit_note**](CreditNotesApi.md#find_credit_note) | **GET** /credit_notes/{lago_id} | Retrieve a credit note | | [**update_credit_note**](CreditNotesApi.md#update_credit_note) | **PUT** /credit_notes/{lago_id} | Update a credit note | @@ -150,6 +151,77 @@ end - **Accept**: application/json +## estimate_credit_note + +> estimate_credit_note(opts) + +Estimate amounts for a new credit note + +This endpoint allows you to retrieve amounts for a new credit note creation. + +### 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::CreditNotesApi.new +opts = { + credit_note_estimate_input: LagoAPI::CreditNoteEstimateInput.new({credit_note: LagoAPI::CreditNoteEstimateInputCreditNote.new({invoice_id: '1a901a90-1a90-1a90-1a90-1a901a901a90', items: [{"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "amount_cents": 10}, {"fee_id": "1a901a90-1a90-1a90-1a90-1a901a901a91", "amount_cents": 5}]})}) # CreditNoteEstimateInput | Credit note estimate payload +} + +begin + # Estimate amounts for a new credit note + result = api_instance.estimate_credit_note(opts) + p result +rescue LagoAPI::ApiError => e + puts "Error when calling CreditNotesApi->estimate_credit_note: #{e}" +end +``` + +#### Using the estimate_credit_note_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> estimate_credit_note_with_http_info(opts) + +```ruby +begin + # Estimate amounts for a new credit note + data, status_code, headers = api_instance.estimate_credit_note_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue LagoAPI::ApiError => e + puts "Error when calling CreditNotesApi->estimate_credit_note_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **credit_note_estimate_input** | [**CreditNoteEstimateInput**](CreditNoteEstimateInput.md) | Credit note estimate payload | [optional] | + +### Return type + +[**CreditNoteEstimated**](CreditNoteEstimated.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## find_all_credit_notes > find_all_credit_notes(opts) diff --git a/docs/EventsApi.md b/docs/EventsApi.md index 65fb24d..4249d06 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -80,7 +80,7 @@ nil (empty response body) ## create_event -> create_event(event_input) +> create_event(event_input) Send usage events @@ -102,7 +102,8 @@ event_input = LagoAPI::EventInput.new({event: LagoAPI::EventInputEvent.new({tran begin # Send usage events - api_instance.create_event(event_input) + result = api_instance.create_event(event_input) + p result rescue LagoAPI::ApiError => e puts "Error when calling EventsApi->create_event: #{e}" end @@ -110,9 +111,9 @@ end #### Using the create_event_with_http_info variant -This returns an Array which contains the response data (`nil` in this case), status code and headers. +This returns an Array which contains the response data, status code and headers. -> create_event_with_http_info(event_input) +> , Integer, Hash)> create_event_with_http_info(event_input) ```ruby begin @@ -120,7 +121,7 @@ begin data, status_code, headers = api_instance.create_event_with_http_info(event_input) p status_code # => 2xx p headers # => { ... } - p data # => nil + p data # => rescue LagoAPI::ApiError => e puts "Error when calling EventsApi->create_event_with_http_info: #{e}" end @@ -134,7 +135,7 @@ end ### Return type -nil (empty response body) +[**Event**](Event.md) ### Authorization diff --git a/docs/FeeObject.md b/docs/FeeObject.md index c7f3ea4..92721d2 100644 --- a/docs/FeeObject.md +++ b/docs/FeeObject.md @@ -19,6 +19,7 @@ | **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | | | **taxes_rate** | **Float** | The tax rate associated with this specific fee. | | | **units** | **String** | The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer. | | +| **precise_unit_amount** | **String** | The unit amount of the fee per unit, with precision. | | | **total_amount_cents** | **Integer** | The cost of this specific fee, including any applicable taxes. | | | **total_amount_currency** | [**Currency**](Currency.md) | | | | **events_count** | **Integer** | The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process. | [optional] | @@ -56,6 +57,7 @@ instance = LagoAPI::FeeObject.new( taxes_amount_cents: 20, taxes_rate: 20, units: 0.32, + precise_unit_amount: 312.5, total_amount_cents: 120, total_amount_currency: null, events_count: 23, diff --git a/docs/FeeObjectItem.md b/docs/FeeObjectItem.md index 9d5ec26..bbdf177 100644 --- a/docs/FeeObjectItem.md +++ b/docs/FeeObjectItem.md @@ -8,6 +8,7 @@ | **code** | **String** | The code of the fee item. It can be the code of the `add-o`n, the code of the `charge`, the code of the `credit` or the code of the `subscription`. | | | **name** | **String** | The name of the fee item. It can be the name of the `add-on`, the name of the `charge`, the name of the `credit` or the name of the `subscription`. | | | **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] | +| **group_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] | | **lago_item_id** | **String** | Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`. | | | **item_type** | **String** | The type of the fee item. Possible values are `AddOn`, `BillableMetric`, `WalletTransaction` or `Subscription`. | | @@ -21,6 +22,7 @@ instance = LagoAPI::FeeObjectItem.new( code: startup, name: Startup, invoice_display_name: Setup Fee (SF1), + group_invoice_display_name: Transactions - ACH, lago_item_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, item_type: Subscription ) diff --git a/docs/PlanOverridesObject.md b/docs/PlanOverridesObject.md new file mode 100644 index 0000000..361265e --- /dev/null +++ b/docs/PlanOverridesObject.md @@ -0,0 +1,32 @@ +# LagoAPI::PlanOverridesObject + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **amount_cents** | **Integer** | The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. | [optional] | +| **amount_currency** | [**Currency**](Currency.md) | | [optional] | +| **description** | **String** | The description on the plan. | [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 plan will be used as the default display name. | [optional] | +| **name** | **String** | The name of the plan. | [optional] | +| **tax_codes** | **Array<String>** | List of unique code used to identify the taxes. | [optional] | +| **trial_period** | **Float** | The duration in days during which the base cost of the plan is offered for free. | [optional] | +| **charges** | [**Array<PlanOverridesObjectChargesInner>**](PlanOverridesObjectChargesInner.md) | Additional usage-based charges for this plan. | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::PlanOverridesObject.new( + amount_cents: 10000, + amount_currency: null, + description: Plan for early stage startups., + invoice_display_name: Startup plan, + name: Startup, + tax_codes: ["french_standard_vat"], + trial_period: 5, + charges: null +) +``` + diff --git a/docs/PlanOverridesObjectChargesInner.md b/docs/PlanOverridesObjectChargesInner.md new file mode 100644 index 0000000..ebb8c93 --- /dev/null +++ b/docs/PlanOverridesObjectChargesInner.md @@ -0,0 +1,28 @@ +# LagoAPI::PlanOverridesObjectChargesInner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier of the charge 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] | +| **group_properties** | [**Array<PlanCreateInputPlanChargesInnerGroupPropertiesInner>**](PlanCreateInputPlanChargesInnerGroupPropertiesInner.md) | All charge information, sorted by groups. | [optional] | +| **tax_codes** | **Array<String>** | List of unique code used to identify the taxes. | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::PlanOverridesObjectChargesInner.new( + id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + invoice_display_name: Setup, + min_amount_cents: 0, + properties: null, + group_properties: null, + tax_codes: ["french_standard_vat"] +) +``` + diff --git a/docs/Subscription.md b/docs/Subscription.md index 005009f..ca26c92 100644 --- a/docs/Subscription.md +++ b/docs/Subscription.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | | +| **subscription** | [**SubscriptionObjectExtended**](SubscriptionObjectExtended.md) | | | ## Example diff --git a/docs/SubscriptionCreateInputSubscription.md b/docs/SubscriptionCreateInputSubscription.md index 73919e9..1450ab0 100644 --- a/docs/SubscriptionCreateInputSubscription.md +++ b/docs/SubscriptionCreateInputSubscription.md @@ -11,6 +11,7 @@ | **billing_time** | **String** | The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration). | [optional] | | **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] | | **subscription_at** | **Time** | The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] | +| **plan_overrides** | [**PlanOverridesObject**](PlanOverridesObject.md) | | [optional] | ## Example @@ -24,7 +25,8 @@ instance = LagoAPI::SubscriptionCreateInputSubscription.new( external_id: my_sub_1234567890, billing_time: anniversary, ending_at: 2022-10-08T00:00Z, - subscription_at: 2022-08-08T00:00Z + subscription_at: 2022-08-08T00:00Z, + plan_overrides: null ) ``` diff --git a/docs/SubscriptionObjectExtended.md b/docs/SubscriptionObjectExtended.md new file mode 100644 index 0000000..adf63bd --- /dev/null +++ b/docs/SubscriptionObjectExtended.md @@ -0,0 +1,52 @@ +# LagoAPI::SubscriptionObjectExtended + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **lago_id** | **String** | Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system | | +| **external_id** | **String** | The subscription external unique identifier (provided by your own application). | | +| **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 | | +| **external_customer_id** | **String** | The customer external unique identifier (provided by your own application). | | +| **billing_time** | **String** | The billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration). | | +| **name** | **String** | The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. | [optional] | +| **plan_code** | **String** | The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans. | | +| **status** | **String** | The status of the subscription, which can have the following values: - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period. - `active`: the subscription is currently active and applied to the customer. - `terminated`: the subscription is no longer active. - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated. | | +| **created_at** | **Time** | The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created. | | +| **canceled_at** | **Time** | The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] | +| **started_at** | **Time** | The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] | +| **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] | +| **subscription_at** | **Time** | The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | | +| **terminated_at** | **Time** | The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC) | [optional] | +| **previous_plan_code** | **String** | The code identifying the previous plan associated with this subscription. | [optional] | +| **next_plan_code** | **String** | The code identifying the next plan in the case of a downgrade. | [optional] | +| **downgrade_plan_date** | **Time** | The date when the plan will be downgraded, represented in ISO 8601 date format. | [optional] | +| **plan** | [**PlanObject**](PlanObject.md) | | [optional] | + +## Example + +```ruby +require 'lago_ruby' + +instance = LagoAPI::SubscriptionObjectExtended.new( + lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + external_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba, + lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90, + external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba, + billing_time: anniversary, + name: Repository A, + plan_code: premium, + status: active, + created_at: 2022-08-08T00:00Z, + canceled_at: 2022-09-14T16:35:31Z, + started_at: 2022-08-08T00:00Z, + ending_at: 2022-10-08T00:00Z, + subscription_at: 2022-08-08T00:00Z, + terminated_at: 2022-09-14T16:35:31Z, + previous_plan_code: null, + next_plan_code: null, + downgrade_plan_date: null, + plan: null +) +``` + diff --git a/docs/SubscriptionUpdateInputSubscription.md b/docs/SubscriptionUpdateInputSubscription.md index 2043f13..cb927fd 100644 --- a/docs/SubscriptionUpdateInputSubscription.md +++ b/docs/SubscriptionUpdateInputSubscription.md @@ -7,6 +7,7 @@ | **name** | **String** | The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. | [optional] | | **ending_at** | **Time** | The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). | [optional] | | **subscription_at** | **Time** | The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). | [optional] | +| **plan_overrides** | [**PlanOverridesObject**](PlanOverridesObject.md) | | [optional] | ## Example @@ -16,7 +17,8 @@ require 'lago_ruby' instance = LagoAPI::SubscriptionUpdateInputSubscription.new( name: Repository B, ending_at: 2022-10-08T00:00Z, - subscription_at: 2022-08-08T00:00Z + subscription_at: 2022-08-08T00:00Z, + plan_overrides: null ) ``` diff --git a/lago_ruby.gemspec b/lago_ruby.gemspec index b979a95..92fc2fd 100644 --- a/lago_ruby.gemspec +++ b/lago_ruby.gemspec @@ -5,7 +5,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby.rb b/lib/lago_ruby.rb index 2b7cfa7..d3da2aa 100644 --- a/lib/lago_ruby.rb +++ b/lib/lago_ruby.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -66,7 +66,13 @@ require 'lago_ruby/models/credit_note_applied_tax_object' require 'lago_ruby/models/credit_note_create_input' require 'lago_ruby/models/credit_note_create_input_credit_note' -require 'lago_ruby/models/credit_note_create_input_credit_note_items_inner' +require 'lago_ruby/models/credit_note_estimate_input' +require 'lago_ruby/models/credit_note_estimate_input_credit_note' +require 'lago_ruby/models/credit_note_estimate_input_credit_note_items_inner' +require 'lago_ruby/models/credit_note_estimated' +require 'lago_ruby/models/credit_note_estimated_estimated_credit_note' +require 'lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner' +require 'lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner' require 'lago_ruby/models/credit_note_item_object' require 'lago_ruby/models/credit_note_item_object_fee' require 'lago_ruby/models/credit_note_object' @@ -143,6 +149,8 @@ require 'lago_ruby/models/plan_create_input_plan_charges_inner' require 'lago_ruby/models/plan_create_input_plan_charges_inner_group_properties_inner' require 'lago_ruby/models/plan_object' +require 'lago_ruby/models/plan_overrides_object' +require 'lago_ruby/models/plan_overrides_object_charges_inner' require 'lago_ruby/models/plan_update_input' require 'lago_ruby/models/plan_update_input_plan' require 'lago_ruby/models/plan_update_input_plan_charges_inner' @@ -151,6 +159,7 @@ require 'lago_ruby/models/subscription_create_input' require 'lago_ruby/models/subscription_create_input_subscription' require 'lago_ruby/models/subscription_object' +require 'lago_ruby/models/subscription_object_extended' require 'lago_ruby/models/subscription_update_input' require 'lago_ruby/models/subscription_update_input_subscription' require 'lago_ruby/models/subscriptions_paginated' diff --git a/lib/lago_ruby/api/add_ons_api.rb b/lib/lago_ruby/api/add_ons_api.rb index 0891465..235be65 100644 --- a/lib/lago_ruby/api/add_ons_api.rb +++ b/lib/lago_ruby/api/add_ons_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/billable_metrics_api.rb b/lib/lago_ruby/api/billable_metrics_api.rb index b3243d2..92528ae 100644 --- a/lib/lago_ruby/api/billable_metrics_api.rb +++ b/lib/lago_ruby/api/billable_metrics_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/coupons_api.rb b/lib/lago_ruby/api/coupons_api.rb index 1563a26..a59492c 100644 --- a/lib/lago_ruby/api/coupons_api.rb +++ b/lib/lago_ruby/api/coupons_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/credit_notes_api.rb b/lib/lago_ruby/api/credit_notes_api.rb index 5215fc7..a0bbec7 100644 --- a/lib/lago_ruby/api/credit_notes_api.rb +++ b/lib/lago_ruby/api/credit_notes_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -150,6 +150,70 @@ def download_credit_note_with_http_info(lago_id, opts = {}) return data, status_code, headers end + # Estimate amounts for a new credit note + # This endpoint allows you to retrieve amounts for a new credit note creation. + # @param [Hash] opts the optional parameters + # @option opts [CreditNoteEstimateInput] :credit_note_estimate_input Credit note estimate payload + # @return [CreditNoteEstimated] + def estimate_credit_note(opts = {}) + data, _status_code, _headers = estimate_credit_note_with_http_info(opts) + data + end + + # Estimate amounts for a new credit note + # This endpoint allows you to retrieve amounts for a new credit note creation. + # @param [Hash] opts the optional parameters + # @option opts [CreditNoteEstimateInput] :credit_note_estimate_input Credit note estimate payload + # @return [Array<(CreditNoteEstimated, Integer, Hash)>] CreditNoteEstimated data, response status code and response headers + def estimate_credit_note_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CreditNotesApi.estimate_credit_note ...' + end + # resource path + local_var_path = '/credit_notes/estimate' + + # 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']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'credit_note_estimate_input']) + + # return_type + return_type = opts[:debug_return_type] || 'CreditNoteEstimated' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearerAuth'] + + new_options = opts.merge( + :operation => :"CreditNotesApi.estimate_credit_note", + :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: CreditNotesApi#estimate_credit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List all credit notes # This endpoint list all existing credit notes. # @param [Hash] opts the optional parameters diff --git a/lib/lago_ruby/api/customers_api.rb b/lib/lago_ruby/api/customers_api.rb index cd00a14..5cdc5ad 100644 --- a/lib/lago_ruby/api/customers_api.rb +++ b/lib/lago_ruby/api/customers_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/events_api.rb b/lib/lago_ruby/api/events_api.rb index 33bb75d..5dad89d 100644 --- a/lib/lago_ruby/api/events_api.rb +++ b/lib/lago_ruby/api/events_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -91,17 +91,17 @@ def create_batch_events_with_http_info(event_batch_input, opts = {}) # This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. # @param event_input [EventInput] Event payload # @param [Hash] opts the optional parameters - # @return [nil] + # @return [Event] def create_event(event_input, opts = {}) - create_event_with_http_info(event_input, opts) - nil + data, _status_code, _headers = create_event_with_http_info(event_input, opts) + data end # Send usage events # This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription. # @param event_input [EventInput] Event payload # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + # @return [Array<(Event, Integer, Hash)>] Event data, response status code and response headers def create_event_with_http_info(event_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.create_event ...' @@ -133,7 +133,7 @@ def create_event_with_http_info(event_input, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(event_input) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'Event' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] diff --git a/lib/lago_ruby/api/fees_api.rb b/lib/lago_ruby/api/fees_api.rb index b115f19..2b265f0 100644 --- a/lib/lago_ruby/api/fees_api.rb +++ b/lib/lago_ruby/api/fees_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/invoices_api.rb b/lib/lago_ruby/api/invoices_api.rb index cde07cf..312a492 100644 --- a/lib/lago_ruby/api/invoices_api.rb +++ b/lib/lago_ruby/api/invoices_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/organizations_api.rb b/lib/lago_ruby/api/organizations_api.rb index b601184..7460c90 100644 --- a/lib/lago_ruby/api/organizations_api.rb +++ b/lib/lago_ruby/api/organizations_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/plans_api.rb b/lib/lago_ruby/api/plans_api.rb index 9b44ccd..865f2a4 100644 --- a/lib/lago_ruby/api/plans_api.rb +++ b/lib/lago_ruby/api/plans_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/subscriptions_api.rb b/lib/lago_ruby/api/subscriptions_api.rb index e54f322..25259c0 100644 --- a/lib/lago_ruby/api/subscriptions_api.rb +++ b/lib/lago_ruby/api/subscriptions_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/taxes_api.rb b/lib/lago_ruby/api/taxes_api.rb index 7557be7..f02a005 100644 --- a/lib/lago_ruby/api/taxes_api.rb +++ b/lib/lago_ruby/api/taxes_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/wallets_api.rb b/lib/lago_ruby/api/wallets_api.rb index 8e2af09..73cfbf8 100644 --- a/lib/lago_ruby/api/wallets_api.rb +++ b/lib/lago_ruby/api/wallets_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/webhook_endpoints_api.rb b/lib/lago_ruby/api/webhook_endpoints_api.rb index 000036a..4c9dda5 100644 --- a/lib/lago_ruby/api/webhook_endpoints_api.rb +++ b/lib/lago_ruby/api/webhook_endpoints_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api/webhooks_api.rb b/lib/lago_ruby/api/webhooks_api.rb index 7b23f55..eb366ca 100644 --- a/lib/lago_ruby/api/webhooks_api.rb +++ b/lib/lago_ruby/api/webhooks_api.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/api_client.rb b/lib/lago_ruby/api_client.rb index 682a6ca..1baf9fd 100644 --- a/lib/lago_ruby/api_client.rb +++ b/lib/lago_ruby/api_client.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -46,9 +46,10 @@ def self.default # Call an API with given options. # # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: - # the data deserialized from response body (could be nil), response status code and response headers. + # the data deserialized from response body (may be a Tempfile or nil), response status code and response headers. def call_api(http_method, path, opts = {}) request = build_request(http_method, path, opts) + tempfile = download_file(request) if opts[:return_type] == 'File' response = request.run if @config.debugging @@ -70,7 +71,9 @@ def call_api(http_method, path, opts = {}) end end - if opts[:return_type] + if opts[:return_type] == 'File' + data = tempfile + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -126,9 +129,7 @@ def build_request(http_method, path, opts = {}) end end - request = Typhoeus::Request.new(url, req_opts) - download_file(request) if opts[:return_type] == 'File' - request + Typhoeus::Request.new(url, req_opts) end # Builds the HTTP request body @@ -166,6 +167,8 @@ def build_request_body(header_params, form_params, body) # process can use. # # @see Configuration#temp_folder_path + # + # @return [Tempfile] the tempfile generated def download_file(request) tempfile = nil encoding = nil @@ -180,7 +183,6 @@ def download_file(request) prefix = prefix + '-' unless prefix.end_with?('-') encoding = response.body.encoding tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile = tempfile end request.on_body do |chunk| chunk.force_encoding(encoding) @@ -195,6 +197,8 @@ def download_file(request) "explicitly with `tempfile.delete`" end end + + tempfile end # Check if the given MIME is a JSON MIME. @@ -215,11 +219,6 @@ def json_mime?(mime) # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - return @tempfile if return_type == 'File' - return nil if body.nil? || body.empty? # return response body directly for String return type diff --git a/lib/lago_ruby/api_error.rb b/lib/lago_ruby/api_error.rb index 819a898..fd3befd 100644 --- a/lib/lago_ruby/api_error.rb +++ b/lib/lago_ruby/api_error.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/configuration.rb b/lib/lago_ruby/configuration.rb index 1219fc0..e426495 100644 --- a/lib/lago_ruby/configuration.rb +++ b/lib/lago_ruby/configuration.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/models/add_on.rb b/lib/lago_ruby/models/add_on.rb index b062004..3d54add 100644 --- a/lib/lago_ruby/models/add_on.rb +++ b/lib/lago_ruby/models/add_on.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/add_on_base_input.rb b/lib/lago_ruby/models/add_on_base_input.rb index 089678c..aae7d86 100644 --- a/lib/lago_ruby/models/add_on_base_input.rb +++ b/lib/lago_ruby/models/add_on_base_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -222,7 +222,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/add_on_create_input.rb b/lib/lago_ruby/models/add_on_create_input.rb index 713b243..e99d704 100644 --- a/lib/lago_ruby/models/add_on_create_input.rb +++ b/lib/lago_ruby/models/add_on_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 e05b912..378e53a 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -257,7 +257,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/add_on_object.rb b/lib/lago_ruby/models/add_on_object.rb index 5448db5..56878e3 100644 --- a/lib/lago_ruby/models/add_on_object.rb +++ b/lib/lago_ruby/models/add_on_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -284,7 +284,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/add_on_update_input.rb b/lib/lago_ruby/models/add_on_update_input.rb index b1c3aa7..7cccbcd 100644 --- a/lib/lago_ruby/models/add_on_update_input.rb +++ b/lib/lago_ruby/models/add_on_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/add_ons_paginated.rb b/lib/lago_ruby/models/add_ons_paginated.rb index e9786ce..82f27a0 100644 --- a/lib/lago_ruby/models/add_ons_paginated.rb +++ b/lib/lago_ruby/models/add_ons_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_bad_request.rb b/lib/lago_ruby/models/api_error_bad_request.rb index 967e985..5a6fc8c 100644 --- a/lib/lago_ruby/models/api_error_bad_request.rb +++ b/lib/lago_ruby/models/api_error_bad_request.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -182,7 +182,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_forbidden.rb b/lib/lago_ruby/models/api_error_forbidden.rb index 826c3c7..7782662 100644 --- a/lib/lago_ruby/models/api_error_forbidden.rb +++ b/lib/lago_ruby/models/api_error_forbidden.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -198,7 +198,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_not_allowed.rb b/lib/lago_ruby/models/api_error_not_allowed.rb index c77de90..75009c5 100644 --- a/lib/lago_ruby/models/api_error_not_allowed.rb +++ b/lib/lago_ruby/models/api_error_not_allowed.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -198,7 +198,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_not_found.rb b/lib/lago_ruby/models/api_error_not_found.rb index cfbc1a8..4f4042f 100644 --- a/lib/lago_ruby/models/api_error_not_found.rb +++ b/lib/lago_ruby/models/api_error_not_found.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -198,7 +198,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_unauthorized.rb b/lib/lago_ruby/models/api_error_unauthorized.rb index dda61e3..d566be0 100644 --- a/lib/lago_ruby/models/api_error_unauthorized.rb +++ b/lib/lago_ruby/models/api_error_unauthorized.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -182,7 +182,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/api_error_unprocessable_entity.rb b/lib/lago_ruby/models/api_error_unprocessable_entity.rb index 2051cb9..9cff2b1 100644 --- a/lib/lago_ruby/models/api_error_unprocessable_entity.rb +++ b/lib/lago_ruby/models/api_error_unprocessable_entity.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -214,7 +214,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/applied_coupon.rb b/lib/lago_ruby/models/applied_coupon.rb index 24efa84..d214ddd 100644 --- a/lib/lago_ruby/models/applied_coupon.rb +++ b/lib/lago_ruby/models/applied_coupon.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/applied_coupon_input.rb b/lib/lago_ruby/models/applied_coupon_input.rb index 82648d4..edd0ad5 100644 --- a/lib/lago_ruby/models/applied_coupon_input.rb +++ b/lib/lago_ruby/models/applied_coupon_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 b2b6f48..84623a9 100644 --- a/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb +++ b/lib/lago_ruby/models/applied_coupon_input_applied_coupon.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -288,7 +288,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/applied_coupon_object.rb b/lib/lago_ruby/models/applied_coupon_object.rb index 07df0ff..6ff8ac1 100644 --- a/lib/lago_ruby/models/applied_coupon_object.rb +++ b/lib/lago_ruby/models/applied_coupon_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -452,7 +452,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/applied_coupon_object_extended.rb b/lib/lago_ruby/models/applied_coupon_object_extended.rb index c73d622..ea180fb 100644 --- a/lib/lago_ruby/models/applied_coupon_object_extended.rb +++ b/lib/lago_ruby/models/applied_coupon_object_extended.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -477,7 +477,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/applied_coupons_paginated.rb b/lib/lago_ruby/models/applied_coupons_paginated.rb index 677df90..3ae9621 100644 --- a/lib/lago_ruby/models/applied_coupons_paginated.rb +++ b/lib/lago_ruby/models/applied_coupons_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/base_applied_tax.rb b/lib/lago_ruby/models/base_applied_tax.rb index ac4000e..4fe98ad 100644 --- a/lib/lago_ruby/models/base_applied_tax.rb +++ b/lib/lago_ruby/models/base_applied_tax.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -239,7 +239,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric.rb b/lib/lago_ruby/models/billable_metric.rb index ea55a72..5ed623b 100644 --- a/lib/lago_ruby/models/billable_metric.rb +++ b/lib/lago_ruby/models/billable_metric.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric_base_input.rb b/lib/lago_ruby/models/billable_metric_base_input.rb index 20d29ca..d4f8ed9 100644 --- a/lib/lago_ruby/models/billable_metric_base_input.rb +++ b/lib/lago_ruby/models/billable_metric_base_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -278,7 +278,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric_create_input.rb b/lib/lago_ruby/models/billable_metric_create_input.rb index e72cda0..bffd91d 100644 --- a/lib/lago_ruby/models/billable_metric_create_input.rb +++ b/lib/lago_ruby/models/billable_metric_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 2728acd..d41bd2d 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -306,7 +306,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric_group.rb b/lib/lago_ruby/models/billable_metric_group.rb index 42d6990..a741d4a 100644 --- a/lib/lago_ruby/models/billable_metric_group.rb +++ b/lib/lago_ruby/models/billable_metric_group.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -187,7 +187,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 27541f9..421c9d3 100644 --- a/lib/lago_ruby/models/billable_metric_group_values_inner.rb +++ b/lib/lago_ruby/models/billable_metric_group_values_inner.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 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 429dec6..42a4e83 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -187,7 +187,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric_object.rb b/lib/lago_ruby/models/billable_metric_object.rb index a64687d..00d4003 100644 --- a/lib/lago_ruby/models/billable_metric_object.rb +++ b/lib/lago_ruby/models/billable_metric_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -391,7 +391,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metric_update_input.rb b/lib/lago_ruby/models/billable_metric_update_input.rb index 97308b0..8527664 100644 --- a/lib/lago_ruby/models/billable_metric_update_input.rb +++ b/lib/lago_ruby/models/billable_metric_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/billable_metrics_paginated.rb b/lib/lago_ruby/models/billable_metrics_paginated.rb index 6ff2645..3632415 100644 --- a/lib/lago_ruby/models/billable_metrics_paginated.rb +++ b/lib/lago_ruby/models/billable_metrics_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/charge_object.rb b/lib/lago_ruby/models/charge_object.rb index f69d383..0c50af2 100644 --- a/lib/lago_ruby/models/charge_object.rb +++ b/lib/lago_ruby/models/charge_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -352,7 +352,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/charge_object_properties.rb b/lib/lago_ruby/models/charge_object_properties.rb index 209e93e..c24129f 100644 --- a/lib/lago_ruby/models/charge_object_properties.rb +++ b/lib/lago_ruby/models/charge_object_properties.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -367,7 +367,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/charge_properties.rb b/lib/lago_ruby/models/charge_properties.rb index b888879..0ab92e8 100644 --- a/lib/lago_ruby/models/charge_properties.rb +++ b/lib/lago_ruby/models/charge_properties.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -360,7 +360,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 77d2d68..d8ada3f 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -214,7 +214,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 5bacf19..2390a9a 100644 --- a/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb +++ b/lib/lago_ruby/models/charge_properties_graduated_ranges_inner.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -256,7 +256,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 912a67d..d448ee7 100644 --- a/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb +++ b/lib/lago_ruby/models/charge_properties_volume_ranges_inner.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -256,7 +256,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/country.rb b/lib/lago_ruby/models/country.rb index b69873d..1cd1956 100644 --- a/lib/lago_ruby/models/country.rb +++ b/lib/lago_ruby/models/country.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/models/coupon.rb b/lib/lago_ruby/models/coupon.rb index 6f96184..5e37d13 100644 --- a/lib/lago_ruby/models/coupon.rb +++ b/lib/lago_ruby/models/coupon.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupon_base_input.rb b/lib/lago_ruby/models/coupon_base_input.rb index 79f0cbb..a35de50 100644 --- a/lib/lago_ruby/models/coupon_base_input.rb +++ b/lib/lago_ruby/models/coupon_base_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -359,7 +359,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 63723f5..abc2c07 100644 --- a/lib/lago_ruby/models/coupon_base_input_applies_to.rb +++ b/lib/lago_ruby/models/coupon_base_input_applies_to.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -177,7 +177,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupon_create_input.rb b/lib/lago_ruby/models/coupon_create_input.rb index 9e7a7e9..4e22419 100644 --- a/lib/lago_ruby/models/coupon_create_input.rb +++ b/lib/lago_ruby/models/coupon_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupon_create_input_coupon.rb b/lib/lago_ruby/models/coupon_create_input_coupon.rb index 6f5a233..df0d152 100644 --- a/lib/lago_ruby/models/coupon_create_input_coupon.rb +++ b/lib/lago_ruby/models/coupon_create_input_coupon.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -394,7 +394,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupon_object.rb b/lib/lago_ruby/models/coupon_object.rb index 1defb0b..0249e87 100644 --- a/lib/lago_ruby/models/coupon_object.rb +++ b/lib/lago_ruby/models/coupon_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -493,7 +493,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupon_update_input.rb b/lib/lago_ruby/models/coupon_update_input.rb index 7a79787..c4358d0 100644 --- a/lib/lago_ruby/models/coupon_update_input.rb +++ b/lib/lago_ruby/models/coupon_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/coupons_paginated.rb b/lib/lago_ruby/models/coupons_paginated.rb index 5a0a187..eab6999 100644 --- a/lib/lago_ruby/models/coupons_paginated.rb +++ b/lib/lago_ruby/models/coupons_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_note.rb b/lib/lago_ruby/models/credit_note.rb index ed76c5f..5e19e77 100644 --- a/lib/lago_ruby/models/credit_note.rb +++ b/lib/lago_ruby/models/credit_note.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 21d502f..d19f302 100644 --- a/lib/lago_ruby/models/credit_note_applied_tax_object.rb +++ b/lib/lago_ruby/models/credit_note_applied_tax_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -265,7 +265,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_note_create_input.rb b/lib/lago_ruby/models/credit_note_create_input.rb index b5d45ab..4bb5e48 100644 --- a/lib/lago_ruby/models/credit_note_create_input.rb +++ b/lib/lago_ruby/models/credit_note_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 8834f61..5482f38 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -80,7 +80,7 @@ def self.openapi_types :'description' => :'String', :'credit_amount_cents' => :'Integer', :'refund_amount_cents' => :'Integer', - :'items' => :'Array' + :'items' => :'Array' } end @@ -263,7 +263,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_note_estimate_input.rb b/lib/lago_ruby/models/credit_note_estimate_input.rb new file mode 100644 index 0000000..49f2f21 --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimate_input.rb @@ -0,0 +1,221 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimateInput + attr_accessor :credit_note + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'credit_note' => :'credit_note' + } + 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 + { + :'credit_note' => :'CreditNoteEstimateInputCreditNote' + } + 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::CreditNoteEstimateInput` 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::CreditNoteEstimateInput`. 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?(:'credit_note') + self.credit_note = attributes[:'credit_note'] + else + self.credit_note = 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 @credit_note.nil? + invalid_properties.push('invalid value for "credit_note", credit_note 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 @credit_note.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 && + credit_note == o.credit_note + 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 + [credit_note].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/credit_note_estimate_input_credit_note.rb b/lib/lago_ruby/models/credit_note_estimate_input_credit_note.rb new file mode 100644 index 0000000..7abc5d2 --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimate_input_credit_note.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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimateInputCreditNote + # The invoice unique identifier, created by Lago. + attr_accessor :invoice_id + + # The list of credit note’s items. + attr_accessor :items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'invoice_id' => :'invoice_id', + :'items' => :'items' + } + 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 + { + :'invoice_id' => :'String', + :'items' => :'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::CreditNoteEstimateInputCreditNote` 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::CreditNoteEstimateInputCreditNote`. 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?(:'invoice_id') + self.invoice_id = attributes[:'invoice_id'] + else + self.invoice_id = nil + end + + if attributes.key?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + else + self.items = 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 @invoice_id.nil? + invalid_properties.push('invalid value for "invoice_id", invoice_id cannot be nil.') + end + + if @items.nil? + invalid_properties.push('invalid value for "items", items 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 @invoice_id.nil? + return false if @items.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 && + invoice_id == o.invoice_id && + items == o.items + 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 + [invoice_id, items].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/credit_note_estimate_input_credit_note_items_inner.rb b/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb new file mode 100644 index 0000000..2639cc2 --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimate_input_credit_note_items_inner.rb @@ -0,0 +1,239 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimateInputCreditNoteItemsInner + # The fee unique identifier, created by Lago. + attr_accessor :fee_id + + # The amount of the credit note item, expressed in cents. + attr_accessor :amount_cents + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fee_id' => :'fee_id', + :'amount_cents' => :'amount_cents' + } + 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 + { + :'fee_id' => :'String', + :'amount_cents' => :'Integer' + } + 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::CreditNoteEstimateInputCreditNoteItemsInner` 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::CreditNoteEstimateInputCreditNoteItemsInner`. 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?(:'fee_id') + self.fee_id = attributes[:'fee_id'] + else + self.fee_id = nil + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + else + self.amount_cents = 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 @fee_id.nil? + invalid_properties.push('invalid value for "fee_id", fee_id 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 @fee_id.nil? + return false if @amount_cents.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 && + fee_id == o.fee_id && + amount_cents == o.amount_cents + 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 + [fee_id, amount_cents].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/credit_note_estimated.rb b/lib/lago_ruby/models/credit_note_estimated.rb new file mode 100644 index 0000000..af396cd --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimated.rb @@ -0,0 +1,221 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimated + attr_accessor :estimated_credit_note + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'estimated_credit_note' => :'estimated_credit_note' + } + 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 + { + :'estimated_credit_note' => :'CreditNoteEstimatedEstimatedCreditNote' + } + 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::CreditNoteEstimated` 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::CreditNoteEstimated`. 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?(:'estimated_credit_note') + self.estimated_credit_note = attributes[:'estimated_credit_note'] + else + self.estimated_credit_note = 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 @estimated_credit_note.nil? + invalid_properties.push('invalid value for "estimated_credit_note", estimated_credit_note 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 @estimated_credit_note.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 && + estimated_credit_note == o.estimated_credit_note + 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 + [estimated_credit_note].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/credit_note_estimated_estimated_credit_note.rb b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb new file mode 100644 index 0000000..a27461a --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note.rb @@ -0,0 +1,387 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimatedEstimatedCreditNote + # Unique identifier assigned to the invoice that the credit note belongs to + attr_accessor :lago_invoice_id + + # The invoice unique number, related to the credit note. + attr_accessor :invoice_number + + attr_accessor :currency + + # The tax amount of the credit note, expressed in cents. + attr_accessor :taxes_amount_cents + + # The tax rate associated with this specific credit note. + attr_accessor :taxes_rate + + # The subtotal of the credit note excluding any applicable taxes, expressed in cents. + attr_accessor :sub_total_excluding_taxes_amount_cents + + # The credited amount of the credit note, expressed in cents. + attr_accessor :max_creditable_amount_cents + + # The refunded amount of the credit note, expressed in cents. + attr_accessor :max_refundable_amount_cents + + # The pro-rated amount of the coupons applied to the source invoice. + attr_accessor :coupons_adjustment_amount_cents + + # Array of credit note’s items. + attr_accessor :items + + attr_accessor :applied_taxes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'lago_invoice_id' => :'lago_invoice_id', + :'invoice_number' => :'invoice_number', + :'currency' => :'currency', + :'taxes_amount_cents' => :'taxes_amount_cents', + :'taxes_rate' => :'taxes_rate', + :'sub_total_excluding_taxes_amount_cents' => :'sub_total_excluding_taxes_amount_cents', + :'max_creditable_amount_cents' => :'max_creditable_amount_cents', + :'max_refundable_amount_cents' => :'max_refundable_amount_cents', + :'coupons_adjustment_amount_cents' => :'coupons_adjustment_amount_cents', + :'items' => :'items', + :'applied_taxes' => :'applied_taxes' + } + 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_invoice_id' => :'String', + :'invoice_number' => :'String', + :'currency' => :'Currency', + :'taxes_amount_cents' => :'Integer', + :'taxes_rate' => :'Float', + :'sub_total_excluding_taxes_amount_cents' => :'Integer', + :'max_creditable_amount_cents' => :'Integer', + :'max_refundable_amount_cents' => :'Integer', + :'coupons_adjustment_amount_cents' => :'Integer', + :'items' => :'Array', + :'applied_taxes' => :'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::CreditNoteEstimatedEstimatedCreditNote` 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::CreditNoteEstimatedEstimatedCreditNote`. 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_invoice_id') + self.lago_invoice_id = attributes[:'lago_invoice_id'] + else + self.lago_invoice_id = nil + end + + if attributes.key?(:'invoice_number') + self.invoice_number = attributes[:'invoice_number'] + else + self.invoice_number = nil + end + + if attributes.key?(:'currency') + self.currency = attributes[:'currency'] + else + self.currency = nil + end + + if attributes.key?(:'taxes_amount_cents') + self.taxes_amount_cents = attributes[:'taxes_amount_cents'] + else + self.taxes_amount_cents = nil + end + + if attributes.key?(:'taxes_rate') + self.taxes_rate = attributes[:'taxes_rate'] + else + self.taxes_rate = nil + end + + if attributes.key?(:'sub_total_excluding_taxes_amount_cents') + self.sub_total_excluding_taxes_amount_cents = attributes[:'sub_total_excluding_taxes_amount_cents'] + else + self.sub_total_excluding_taxes_amount_cents = nil + end + + if attributes.key?(:'max_creditable_amount_cents') + self.max_creditable_amount_cents = attributes[:'max_creditable_amount_cents'] + else + self.max_creditable_amount_cents = nil + end + + if attributes.key?(:'max_refundable_amount_cents') + self.max_refundable_amount_cents = attributes[:'max_refundable_amount_cents'] + else + self.max_refundable_amount_cents = nil + end + + if attributes.key?(:'coupons_adjustment_amount_cents') + self.coupons_adjustment_amount_cents = attributes[:'coupons_adjustment_amount_cents'] + else + self.coupons_adjustment_amount_cents = nil + end + + if attributes.key?(:'items') + if (value = attributes[:'items']).is_a?(Array) + self.items = value + end + else + self.items = nil + end + + if attributes.key?(:'applied_taxes') + if (value = attributes[:'applied_taxes']).is_a?(Array) + self.applied_taxes = value + end + 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 @lago_invoice_id.nil? + invalid_properties.push('invalid value for "lago_invoice_id", lago_invoice_id cannot be nil.') + end + + if @invoice_number.nil? + invalid_properties.push('invalid value for "invoice_number", invoice_number cannot be nil.') + end + + if @currency.nil? + invalid_properties.push('invalid value for "currency", currency cannot be nil.') + end + + if @taxes_amount_cents.nil? + invalid_properties.push('invalid value for "taxes_amount_cents", taxes_amount_cents cannot be nil.') + end + + if @taxes_rate.nil? + invalid_properties.push('invalid value for "taxes_rate", taxes_rate cannot be nil.') + end + + if @sub_total_excluding_taxes_amount_cents.nil? + invalid_properties.push('invalid value for "sub_total_excluding_taxes_amount_cents", sub_total_excluding_taxes_amount_cents cannot be nil.') + end + + if @max_creditable_amount_cents.nil? + invalid_properties.push('invalid value for "max_creditable_amount_cents", max_creditable_amount_cents cannot be nil.') + end + + if @max_refundable_amount_cents.nil? + invalid_properties.push('invalid value for "max_refundable_amount_cents", max_refundable_amount_cents cannot be nil.') + end + + if @coupons_adjustment_amount_cents.nil? + invalid_properties.push('invalid value for "coupons_adjustment_amount_cents", coupons_adjustment_amount_cents cannot be nil.') + end + + if @items.nil? + invalid_properties.push('invalid value for "items", items 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 @lago_invoice_id.nil? + return false if @invoice_number.nil? + return false if @currency.nil? + return false if @taxes_amount_cents.nil? + return false if @taxes_rate.nil? + return false if @sub_total_excluding_taxes_amount_cents.nil? + return false if @max_creditable_amount_cents.nil? + return false if @max_refundable_amount_cents.nil? + return false if @coupons_adjustment_amount_cents.nil? + return false if @items.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 && + lago_invoice_id == o.lago_invoice_id && + invoice_number == o.invoice_number && + currency == o.currency && + taxes_amount_cents == o.taxes_amount_cents && + taxes_rate == o.taxes_rate && + sub_total_excluding_taxes_amount_cents == o.sub_total_excluding_taxes_amount_cents && + max_creditable_amount_cents == o.max_creditable_amount_cents && + max_refundable_amount_cents == o.max_refundable_amount_cents && + coupons_adjustment_amount_cents == o.coupons_adjustment_amount_cents && + items == o.items && + applied_taxes == o.applied_taxes + 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_invoice_id, invoice_number, currency, taxes_amount_cents, taxes_rate, sub_total_excluding_taxes_amount_cents, max_creditable_amount_cents, max_refundable_amount_cents, coupons_adjustment_amount_cents, items, applied_taxes].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/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 new file mode 100644 index 0000000..26c9d63 --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner.rb @@ -0,0 +1,283 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner + # Unique identifier of the tax, created by Lago. + attr_accessor :lago_tax_id + + # Name of the tax. + attr_accessor :tax_name + + # Unique code used to identify the tax associated with the API request. + attr_accessor :tax_code + + # The percentage rate of the tax + attr_accessor :tax_rate + + # Internal description of the taxe + attr_accessor :tax_description + + attr_accessor :base_amount_cents + + # Amount of the tax + attr_accessor :amount_cents + + attr_accessor :amount_currency + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'lago_tax_id' => :'lago_tax_id', + :'tax_name' => :'tax_name', + :'tax_code' => :'tax_code', + :'tax_rate' => :'tax_rate', + :'tax_description' => :'tax_description', + :'base_amount_cents' => :'base_amount_cents', + :'amount_cents' => :'amount_cents', + :'amount_currency' => :'amount_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 + { + :'lago_tax_id' => :'String', + :'tax_name' => :'String', + :'tax_code' => :'String', + :'tax_rate' => :'Float', + :'tax_description' => :'String', + :'base_amount_cents' => :'Integer', + :'amount_cents' => :'Integer', + :'amount_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::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner` 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::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner`. 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_tax_id') + self.lago_tax_id = attributes[:'lago_tax_id'] + end + + if attributes.key?(:'tax_name') + self.tax_name = attributes[:'tax_name'] + end + + if attributes.key?(:'tax_code') + self.tax_code = attributes[:'tax_code'] + end + + if attributes.key?(:'tax_rate') + self.tax_rate = attributes[:'tax_rate'] + end + + if attributes.key?(:'tax_description') + self.tax_description = attributes[:'tax_description'] + end + + if attributes.key?(:'base_amount_cents') + self.base_amount_cents = attributes[:'base_amount_cents'] + end + + if attributes.key?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + end + + if attributes.key?(:'amount_currency') + self.amount_currency = attributes[:'amount_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 + 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_tax_id == o.lago_tax_id && + tax_name == o.tax_name && + tax_code == o.tax_code && + tax_rate == o.tax_rate && + tax_description == o.tax_description && + base_amount_cents == o.base_amount_cents && + amount_cents == o.amount_cents && + amount_currency == o.amount_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 + [lago_tax_id, tax_name, tax_code, tax_rate, tax_description, base_amount_cents, amount_cents, amount_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/credit_note_estimated_estimated_credit_note_items_inner.rb b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb new file mode 100644 index 0000000..fb237e5 --- /dev/null +++ b/lib/lago_ruby/models/credit_note_estimated_estimated_credit_note_items_inner.rb @@ -0,0 +1,235 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class CreditNoteEstimatedEstimatedCreditNoteItemsInner + # The credit note’s item amount, expressed in cents. + attr_accessor :amount_cents + + # Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system. + attr_accessor :lago_fee_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_cents' => :'amount_cents', + :'lago_fee_id' => :'lago_fee_id' + } + 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 + { + :'amount_cents' => :'Integer', + :'lago_fee_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'lago_fee_id' + ]) + 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::CreditNoteEstimatedEstimatedCreditNoteItemsInner` 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::CreditNoteEstimatedEstimatedCreditNoteItemsInner`. 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?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + else + self.amount_cents = nil + end + + if attributes.key?(:'lago_fee_id') + self.lago_fee_id = attributes[:'lago_fee_id'] + else + self.lago_fee_id = 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 @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 @amount_cents.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 && + amount_cents == o.amount_cents && + lago_fee_id == o.lago_fee_id + 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 + [amount_cents, lago_fee_id].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/credit_note_item_object.rb b/lib/lago_ruby/models/credit_note_item_object.rb index e409e85..d256e5f 100644 --- a/lib/lago_ruby/models/credit_note_item_object.rb +++ b/lib/lago_ruby/models/credit_note_item_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -216,7 +216,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 66571e3..b9f6ea2 100644 --- a/lib/lago_ruby/models/credit_note_item_object_fee.rb +++ b/lib/lago_ruby/models/credit_note_item_object_fee.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -59,6 +59,9 @@ class CreditNoteItemObjectFee # The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer. attr_accessor :units + # The unit amount of the fee per unit, with precision. + attr_accessor :precise_unit_amount + # The cost of this specific fee, including any applicable taxes. attr_accessor :total_amount_cents @@ -142,6 +145,7 @@ def self.attribute_map :'taxes_amount_cents' => :'taxes_amount_cents', :'taxes_rate' => :'taxes_rate', :'units' => :'units', + :'precise_unit_amount' => :'precise_unit_amount', :'total_amount_cents' => :'total_amount_cents', :'total_amount_currency' => :'total_amount_currency', :'events_count' => :'events_count', @@ -183,6 +187,7 @@ def self.openapi_types :'taxes_amount_cents' => :'Integer', :'taxes_rate' => :'Float', :'units' => :'String', + :'precise_unit_amount' => :'String', :'total_amount_cents' => :'Integer', :'total_amount_currency' => :'Currency', :'events_count' => :'Integer', @@ -315,6 +320,12 @@ def initialize(attributes = {}) self.units = nil end + if attributes.key?(:'precise_unit_amount') + self.precise_unit_amount = attributes[:'precise_unit_amount'] + else + self.precise_unit_amount = nil + end + if attributes.key?(:'total_amount_cents') self.total_amount_cents = attributes[:'total_amount_cents'] else @@ -415,6 +426,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "units", units cannot be nil.') end + if @precise_unit_amount.nil? + invalid_properties.push('invalid value for "precise_unit_amount", precise_unit_amount cannot be nil.') + end + if @total_amount_cents.nil? invalid_properties.push('invalid value for "total_amount_cents", total_amount_cents cannot be nil.') end @@ -451,6 +466,7 @@ def valid? return false if @taxes_amount_cents.nil? return false if @taxes_rate.nil? return false if @units.nil? + return false if @precise_unit_amount.nil? return false if @total_amount_cents.nil? return false if @total_amount_currency.nil? return false if @pay_in_advance.nil? @@ -492,6 +508,7 @@ def ==(o) taxes_amount_cents == o.taxes_amount_cents && taxes_rate == o.taxes_rate && units == o.units && + precise_unit_amount == o.precise_unit_amount && total_amount_cents == o.total_amount_cents && total_amount_currency == o.total_amount_currency && events_count == o.events_count && @@ -518,7 +535,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, invoice_display_name, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash + [lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, invoice_display_name, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, precise_unit_amount, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash end # Builds the object from hash @@ -583,7 +600,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_note_object.rb b/lib/lago_ruby/models/credit_note_object.rb index 9d07afb..8b9dff9 100644 --- a/lib/lago_ruby/models/credit_note_object.rb +++ b/lib/lago_ruby/models/credit_note_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -69,7 +69,7 @@ class CreditNoteObject attr_accessor :refund_amount_cents # The pro-rated amount of the coupons applied to the source invoice. - attr_accessor :coupons_adjustement_amount_cents + attr_accessor :coupons_adjustment_amount_cents # The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC). attr_accessor :created_at @@ -128,7 +128,7 @@ def self.attribute_map :'balance_amount_cents' => :'balance_amount_cents', :'credit_amount_cents' => :'credit_amount_cents', :'refund_amount_cents' => :'refund_amount_cents', - :'coupons_adjustement_amount_cents' => :'coupons_adjustement_amount_cents', + :'coupons_adjustment_amount_cents' => :'coupons_adjustment_amount_cents', :'created_at' => :'created_at', :'updated_at' => :'updated_at', :'file_url' => :'file_url', @@ -163,7 +163,7 @@ def self.openapi_types :'balance_amount_cents' => :'Integer', :'credit_amount_cents' => :'Integer', :'refund_amount_cents' => :'Integer', - :'coupons_adjustement_amount_cents' => :'Integer', + :'coupons_adjustment_amount_cents' => :'Integer', :'created_at' => :'Time', :'updated_at' => :'Time', :'file_url' => :'String', @@ -299,10 +299,10 @@ def initialize(attributes = {}) self.refund_amount_cents = nil end - if attributes.key?(:'coupons_adjustement_amount_cents') - self.coupons_adjustement_amount_cents = attributes[:'coupons_adjustement_amount_cents'] + if attributes.key?(:'coupons_adjustment_amount_cents') + self.coupons_adjustment_amount_cents = attributes[:'coupons_adjustment_amount_cents'] else - self.coupons_adjustement_amount_cents = nil + self.coupons_adjustment_amount_cents = nil end if attributes.key?(:'created_at') @@ -399,8 +399,8 @@ def list_invalid_properties invalid_properties.push('invalid value for "refund_amount_cents", refund_amount_cents cannot be nil.') end - if @coupons_adjustement_amount_cents.nil? - invalid_properties.push('invalid value for "coupons_adjustement_amount_cents", coupons_adjustement_amount_cents cannot be nil.') + if @coupons_adjustment_amount_cents.nil? + invalid_properties.push('invalid value for "coupons_adjustment_amount_cents", coupons_adjustment_amount_cents cannot be nil.') end if @created_at.nil? @@ -439,7 +439,7 @@ def valid? return false if @balance_amount_cents.nil? return false if @credit_amount_cents.nil? return false if @refund_amount_cents.nil? - return false if @coupons_adjustement_amount_cents.nil? + return false if @coupons_adjustment_amount_cents.nil? return false if @created_at.nil? return false if @updated_at.nil? true @@ -498,7 +498,7 @@ def ==(o) balance_amount_cents == o.balance_amount_cents && credit_amount_cents == o.credit_amount_cents && refund_amount_cents == o.refund_amount_cents && - coupons_adjustement_amount_cents == o.coupons_adjustement_amount_cents && + coupons_adjustment_amount_cents == o.coupons_adjustment_amount_cents && created_at == o.created_at && updated_at == o.updated_at && file_url == o.file_url && @@ -515,7 +515,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [lago_id, sequential_id, number, lago_invoice_id, invoice_number, issuing_date, credit_status, refund_status, reason, description, currency, total_amount_cents, taxes_amount_cents, taxes_rate, sub_total_excluding_taxes_amount_cents, balance_amount_cents, credit_amount_cents, refund_amount_cents, coupons_adjustement_amount_cents, created_at, updated_at, file_url, items, applied_taxes].hash + [lago_id, sequential_id, number, lago_invoice_id, invoice_number, issuing_date, credit_status, refund_status, reason, description, currency, total_amount_cents, taxes_amount_cents, taxes_rate, sub_total_excluding_taxes_amount_cents, balance_amount_cents, credit_amount_cents, refund_amount_cents, coupons_adjustment_amount_cents, created_at, updated_at, file_url, items, applied_taxes].hash end # Builds the object from hash @@ -580,7 +580,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_note_update_input.rb b/lib/lago_ruby/models/credit_note_update_input.rb index 279f983..9d93e71 100644 --- a/lib/lago_ruby/models/credit_note_update_input.rb +++ b/lib/lago_ruby/models/credit_note_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 075cdef..9060388 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -201,7 +201,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_notes.rb b/lib/lago_ruby/models/credit_notes.rb index 524656e..952bc6c 100644 --- a/lib/lago_ruby/models/credit_notes.rb +++ b/lib/lago_ruby/models/credit_notes.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -168,7 +168,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_object.rb b/lib/lago_ruby/models/credit_object.rb index 0e9096b..5562bbb 100644 --- a/lib/lago_ruby/models/credit_object.rb +++ b/lib/lago_ruby/models/credit_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -249,7 +249,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_object_invoice.rb b/lib/lago_ruby/models/credit_object_invoice.rb index fd5c6e0..df2e1ac 100644 --- a/lib/lago_ruby/models/credit_object_invoice.rb +++ b/lib/lago_ruby/models/credit_object_invoice.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -216,7 +216,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/credit_object_item.rb b/lib/lago_ruby/models/credit_object_item.rb index 8fbab12..5be1617 100644 --- a/lib/lago_ruby/models/credit_object_item.rb +++ b/lib/lago_ruby/models/credit_object_item.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -253,7 +253,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/currency.rb b/lib/lago_ruby/models/currency.rb index cbe5a2f..89dbf8e 100644 --- a/lib/lago_ruby/models/currency.rb +++ b/lib/lago_ruby/models/currency.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/models/customer.rb b/lib/lago_ruby/models/customer.rb index e631386..6173e38 100644 --- a/lib/lago_ruby/models/customer.rb +++ b/lib/lago_ruby/models/customer.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_billing_configuration.rb b/lib/lago_ruby/models/customer_billing_configuration.rb index ede55f3..880908b 100644 --- a/lib/lago_ruby/models/customer_billing_configuration.rb +++ b/lib/lago_ruby/models/customer_billing_configuration.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -258,7 +258,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_charge_usage_object.rb b/lib/lago_ruby/models/customer_charge_usage_object.rb index f2c68e2..32e27b8 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -289,7 +289,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 4f0cd6e..1115d8b 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -253,7 +253,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 826a6bb..194b05a 100644 --- a/lib/lago_ruby/models/customer_charge_usage_object_charge.rb +++ b/lib/lago_ruby/models/customer_charge_usage_object_charge.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -219,7 +219,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end 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 5829e7c..47ec157 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -232,7 +232,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_create_input.rb b/lib/lago_ruby/models/customer_create_input.rb index 4fb4ba2..aa53acd 100644 --- a/lib/lago_ruby/models/customer_create_input.rb +++ b/lib/lago_ruby/models/customer_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_create_input_customer.rb b/lib/lago_ruby/models/customer_create_input_customer.rb index 0f7e7fa..d018370 100644 --- a/lib/lago_ruby/models/customer_create_input_customer.rb +++ b/lib/lago_ruby/models/customer_create_input_customer.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -381,7 +381,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 c332256..c71258e 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -211,7 +211,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_metadata.rb b/lib/lago_ruby/models/customer_metadata.rb index 8750415..bfa0663 100644 --- a/lib/lago_ruby/models/customer_metadata.rb +++ b/lib/lago_ruby/models/customer_metadata.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -236,7 +236,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_object.rb b/lib/lago_ruby/models/customer_object.rb index 0c78d72..bbe96c4 100644 --- a/lib/lago_ruby/models/customer_object.rb +++ b/lib/lago_ruby/models/customer_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -462,7 +462,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_object_extended.rb b/lib/lago_ruby/models/customer_object_extended.rb index fa247fc..afed366 100644 --- a/lib/lago_ruby/models/customer_object_extended.rb +++ b/lib/lago_ruby/models/customer_object_extended.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -481,7 +481,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_past_usage.rb b/lib/lago_ruby/models/customer_past_usage.rb index 6f3ad9e..b32adf7 100644 --- a/lib/lago_ruby/models/customer_past_usage.rb +++ b/lib/lago_ruby/models/customer_past_usage.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_usage.rb b/lib/lago_ruby/models/customer_usage.rb index 7ddfe71..e274c92 100644 --- a/lib/lago_ruby/models/customer_usage.rb +++ b/lib/lago_ruby/models/customer_usage.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customer_usage_object.rb b/lib/lago_ruby/models/customer_usage_object.rb index ba59f6e..33a9f53 100644 --- a/lib/lago_ruby/models/customer_usage_object.rb +++ b/lib/lago_ruby/models/customer_usage_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -291,7 +291,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/customers_paginated.rb b/lib/lago_ruby/models/customers_paginated.rb index d9d45bd..fc7c4d6 100644 --- a/lib/lago_ruby/models/customers_paginated.rb +++ b/lib/lago_ruby/models/customers_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event.rb b/lib/lago_ruby/models/event.rb index aa09e9c..14bfc70 100644 --- a/lib/lago_ruby/models/event.rb +++ b/lib/lago_ruby/models/event.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_batch_input.rb b/lib/lago_ruby/models/event_batch_input.rb index 93e0769..b2ea34d 100644 --- a/lib/lago_ruby/models/event_batch_input.rb +++ b/lib/lago_ruby/models/event_batch_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_batch_input_event.rb b/lib/lago_ruby/models/event_batch_input_event.rb index ef0c29d..299d2b2 100644 --- a/lib/lago_ruby/models/event_batch_input_event.rb +++ b/lib/lago_ruby/models/event_batch_input_event.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -232,7 +232,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 9d247f7..36820f4 100644 --- a/lib/lago_ruby/models/event_batch_input_event_properties.rb +++ b/lib/lago_ruby/models/event_batch_input_event_properties.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -195,7 +195,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_estimate_fees_input.rb b/lib/lago_ruby/models/event_estimate_fees_input.rb index 9ed66aa..9f7605f 100644 --- a/lib/lago_ruby/models/event_estimate_fees_input.rb +++ b/lib/lago_ruby/models/event_estimate_fees_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 5a77c5c..632c337 100644 --- a/lib/lago_ruby/models/event_estimate_fees_input_event.rb +++ b/lib/lago_ruby/models/event_estimate_fees_input_event.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -197,7 +197,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_input.rb b/lib/lago_ruby/models/event_input.rb index 95b8412..000bd98 100644 --- a/lib/lago_ruby/models/event_input.rb +++ b/lib/lago_ruby/models/event_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_input_event.rb b/lib/lago_ruby/models/event_input_event.rb index 48bbfb9..3a7aeaa 100644 --- a/lib/lago_ruby/models/event_input_event.rb +++ b/lib/lago_ruby/models/event_input_event.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -225,7 +225,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_input_event_timestamp.rb b/lib/lago_ruby/models/event_input_event_timestamp.rb index 3b0d5a8..3f8e66d 100644 --- a/lib/lago_ruby/models/event_input_event_timestamp.rb +++ b/lib/lago_ruby/models/event_input_event_timestamp.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/models/event_object.rb b/lib/lago_ruby/models/event_object.rb index 278c184..36045f7 100644 --- a/lib/lago_ruby/models/event_object.rb +++ b/lib/lago_ruby/models/event_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -84,6 +84,10 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'lago_customer_id', + :'external_customer_id', + :'lago_subscription_id', + :'external_subscription_id', ]) end @@ -174,14 +178,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.') end - if @lago_customer_id.nil? - invalid_properties.push('invalid value for "lago_customer_id", lago_customer_id cannot be nil.') - end - - if @external_customer_id.nil? - invalid_properties.push('invalid value for "external_customer_id", external_customer_id cannot be nil.') - end - if @code.nil? invalid_properties.push('invalid value for "code", code cannot be nil.') end @@ -190,14 +186,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') end - if @lago_subscription_id.nil? - invalid_properties.push('invalid value for "lago_subscription_id", lago_subscription_id cannot be nil.') - end - - if @external_subscription_id.nil? - invalid_properties.push('invalid value for "external_subscription_id", external_subscription_id cannot be nil.') - end - if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end @@ -211,12 +199,8 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @lago_id.nil? return false if @transaction_id.nil? - return false if @lago_customer_id.nil? - return false if @external_customer_id.nil? return false if @code.nil? return false if @timestamp.nil? - return false if @lago_subscription_id.nil? - return false if @external_subscription_id.nil? return false if @created_at.nil? true end @@ -312,7 +296,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/event_object_properties.rb b/lib/lago_ruby/models/event_object_properties.rb index bf878ba..a339734 100644 --- a/lib/lago_ruby/models/event_object_properties.rb +++ b/lib/lago_ruby/models/event_object_properties.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -195,7 +195,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee.rb b/lib/lago_ruby/models/fee.rb index 3a786f9..00fd443 100644 --- a/lib/lago_ruby/models/fee.rb +++ b/lib/lago_ruby/models/fee.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee_applied_tax_object.rb b/lib/lago_ruby/models/fee_applied_tax_object.rb index 160708c..be88da0 100644 --- a/lib/lago_ruby/models/fee_applied_tax_object.rb +++ b/lib/lago_ruby/models/fee_applied_tax_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -256,7 +256,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee_object.rb b/lib/lago_ruby/models/fee_object.rb index 8ec1211..22ec4bb 100644 --- a/lib/lago_ruby/models/fee_object.rb +++ b/lib/lago_ruby/models/fee_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -59,6 +59,9 @@ class FeeObject # The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer. attr_accessor :units + # The unit amount of the fee per unit, with precision. + attr_accessor :precise_unit_amount + # The cost of this specific fee, including any applicable taxes. attr_accessor :total_amount_cents @@ -142,6 +145,7 @@ def self.attribute_map :'taxes_amount_cents' => :'taxes_amount_cents', :'taxes_rate' => :'taxes_rate', :'units' => :'units', + :'precise_unit_amount' => :'precise_unit_amount', :'total_amount_cents' => :'total_amount_cents', :'total_amount_currency' => :'total_amount_currency', :'events_count' => :'events_count', @@ -183,6 +187,7 @@ def self.openapi_types :'taxes_amount_cents' => :'Integer', :'taxes_rate' => :'Float', :'units' => :'String', + :'precise_unit_amount' => :'String', :'total_amount_cents' => :'Integer', :'total_amount_currency' => :'Currency', :'events_count' => :'Integer', @@ -308,6 +313,12 @@ def initialize(attributes = {}) self.units = nil end + if attributes.key?(:'precise_unit_amount') + self.precise_unit_amount = attributes[:'precise_unit_amount'] + else + self.precise_unit_amount = nil + end + if attributes.key?(:'total_amount_cents') self.total_amount_cents = attributes[:'total_amount_cents'] else @@ -408,6 +419,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "units", units cannot be nil.') end + if @precise_unit_amount.nil? + invalid_properties.push('invalid value for "precise_unit_amount", precise_unit_amount cannot be nil.') + end + if @total_amount_cents.nil? invalid_properties.push('invalid value for "total_amount_cents", total_amount_cents cannot be nil.') end @@ -444,6 +459,7 @@ def valid? return false if @taxes_amount_cents.nil? return false if @taxes_rate.nil? return false if @units.nil? + return false if @precise_unit_amount.nil? return false if @total_amount_cents.nil? return false if @total_amount_currency.nil? return false if @pay_in_advance.nil? @@ -485,6 +501,7 @@ def ==(o) taxes_amount_cents == o.taxes_amount_cents && taxes_rate == o.taxes_rate && units == o.units && + precise_unit_amount == o.precise_unit_amount && total_amount_cents == o.total_amount_cents && total_amount_currency == o.total_amount_currency && events_count == o.events_count && @@ -511,7 +528,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, invoice_display_name, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash + [lago_id, lago_group_id, lago_invoice_id, lago_true_up_fee_id, lago_true_up_parent_fee_id, lago_subscription_id, lago_customer_id, external_customer_id, external_subscription_id, invoice_display_name, amount_cents, amount_currency, taxes_amount_cents, taxes_rate, units, precise_unit_amount, total_amount_cents, total_amount_currency, events_count, pay_in_advance, invoiceable, from_date, to_date, payment_status, created_at, succeeded_at, failed_at, refunded_at, event_transaction_id, item, applied_taxes].hash end # Builds the object from hash @@ -576,7 +593,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee_object_item.rb b/lib/lago_ruby/models/fee_object_item.rb index ca58983..7e01ef3 100644 --- a/lib/lago_ruby/models/fee_object_item.rb +++ b/lib/lago_ruby/models/fee_object_item.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -28,6 +28,9 @@ class FeeObjectItem # 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 + # 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 :group_invoice_display_name + # Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`. attr_accessor :lago_item_id @@ -63,6 +66,7 @@ def self.attribute_map :'code' => :'code', :'name' => :'name', :'invoice_display_name' => :'invoice_display_name', + :'group_invoice_display_name' => :'group_invoice_display_name', :'lago_item_id' => :'lago_item_id', :'item_type' => :'item_type' } @@ -80,6 +84,7 @@ def self.openapi_types :'code' => :'String', :'name' => :'String', :'invoice_display_name' => :'String', + :'group_invoice_display_name' => :'String', :'lago_item_id' => :'String', :'item_type' => :'String' } @@ -128,6 +133,10 @@ def initialize(attributes = {}) self.invoice_display_name = attributes[:'invoice_display_name'] end + if attributes.key?(:'group_invoice_display_name') + self.group_invoice_display_name = attributes[:'group_invoice_display_name'] + end + if attributes.key?(:'lago_item_id') self.lago_item_id = attributes[:'lago_item_id'] else @@ -214,6 +223,7 @@ def ==(o) code == o.code && name == o.name && invoice_display_name == o.invoice_display_name && + group_invoice_display_name == o.group_invoice_display_name && lago_item_id == o.lago_item_id && item_type == o.item_type end @@ -227,7 +237,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, code, name, invoice_display_name, lago_item_id, item_type].hash + [type, code, name, invoice_display_name, group_invoice_display_name, lago_item_id, item_type].hash end # Builds the object from hash @@ -292,7 +302,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee_update_input.rb b/lib/lago_ruby/models/fee_update_input.rb index 3a29474..2c8e33c 100644 --- a/lib/lago_ruby/models/fee_update_input.rb +++ b/lib/lago_ruby/models/fee_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fee_update_input_fee.rb b/lib/lago_ruby/models/fee_update_input_fee.rb index 22d7bfe..4cf581f 100644 --- a/lib/lago_ruby/models/fee_update_input_fee.rb +++ b/lib/lago_ruby/models/fee_update_input_fee.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -201,7 +201,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fees.rb b/lib/lago_ruby/models/fees.rb index 1e66ea7..ff3830b 100644 --- a/lib/lago_ruby/models/fees.rb +++ b/lib/lago_ruby/models/fees.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -168,7 +168,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/fees_paginated.rb b/lib/lago_ruby/models/fees_paginated.rb index 22db54b..6e81db4 100644 --- a/lib/lago_ruby/models/fees_paginated.rb +++ b/lib/lago_ruby/models/fees_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -191,7 +191,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) 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 c3f23cd..8c59e35 100644 --- a/lib/lago_ruby/models/get_customer_portal_url200_response.rb +++ b/lib/lago_ruby/models/get_customer_portal_url200_response.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 71d9b80..4f80451 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -167,7 +167,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/group_object.rb b/lib/lago_ruby/models/group_object.rb index 79b0589..a525f37 100644 --- a/lib/lago_ruby/models/group_object.rb +++ b/lib/lago_ruby/models/group_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -201,7 +201,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/group_properties_object.rb b/lib/lago_ruby/models/group_properties_object.rb index 88153c1..8180c3e 100644 --- a/lib/lago_ruby/models/group_properties_object.rb +++ b/lib/lago_ruby/models/group_properties_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -193,7 +193,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/group_properties_object_values.rb b/lib/lago_ruby/models/group_properties_object_values.rb index 8a2cbf2..7ee501a 100644 --- a/lib/lago_ruby/models/group_properties_object_values.rb +++ b/lib/lago_ruby/models/group_properties_object_values.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -367,7 +367,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/groups_paginated.rb b/lib/lago_ruby/models/groups_paginated.rb index f81b334..22aacdb 100644 --- a/lib/lago_ruby/models/groups_paginated.rb +++ b/lib/lago_ruby/models/groups_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice.rb b/lib/lago_ruby/models/invoice.rb index d9e58d2..f907082 100644 --- a/lib/lago_ruby/models/invoice.rb +++ b/lib/lago_ruby/models/invoice.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_applied_tax_object.rb b/lib/lago_ruby/models/invoice_applied_tax_object.rb index 1a119f2..044f247 100644 --- a/lib/lago_ruby/models/invoice_applied_tax_object.rb +++ b/lib/lago_ruby/models/invoice_applied_tax_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -266,7 +266,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_metadata_object.rb b/lib/lago_ruby/models/invoice_metadata_object.rb index f65d894..c217d2c 100644 --- a/lib/lago_ruby/models/invoice_metadata_object.rb +++ b/lib/lago_ruby/models/invoice_metadata_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -190,7 +190,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_object.rb b/lib/lago_ruby/models/invoice_object.rb index 2b3df90..f54eae8 100644 --- a/lib/lago_ruby/models/invoice_object.rb +++ b/lib/lago_ruby/models/invoice_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -556,7 +556,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_object_customer.rb b/lib/lago_ruby/models/invoice_object_customer.rb index dec8f7f..ccd75f3 100644 --- a/lib/lago_ruby/models/invoice_object_customer.rb +++ b/lib/lago_ruby/models/invoice_object_customer.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -469,7 +469,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_object_extended.rb b/lib/lago_ruby/models/invoice_object_extended.rb index 70fde79..6559c52 100644 --- a/lib/lago_ruby/models/invoice_object_extended.rb +++ b/lib/lago_ruby/models/invoice_object_extended.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -596,7 +596,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 dcd5c29..5dfbf74 100644 --- a/lib/lago_ruby/models/invoice_one_off_create_input.rb +++ b/lib/lago_ruby/models/invoice_one_off_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 50d2c9d..eaad68a 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -194,7 +194,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 d96965f..8c2503a 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -239,7 +239,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_update_input.rb b/lib/lago_ruby/models/invoice_update_input.rb index a0c75d5..ca83745 100644 --- a/lib/lago_ruby/models/invoice_update_input.rb +++ b/lib/lago_ruby/models/invoice_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoice_update_input_invoice.rb b/lib/lago_ruby/models/invoice_update_input_invoice.rb index b8ff94d..d223797 100644 --- a/lib/lago_ruby/models/invoice_update_input_invoice.rb +++ b/lib/lago_ruby/models/invoice_update_input_invoice.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -205,7 +205,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 f04caab..7a87edc 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -180,7 +180,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/invoices_paginated.rb b/lib/lago_ruby/models/invoices_paginated.rb index 232bd27..b0bbf04 100644 --- a/lib/lago_ruby/models/invoices_paginated.rb +++ b/lib/lago_ruby/models/invoices_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/organization.rb b/lib/lago_ruby/models/organization.rb index 74d5c03..e066b10 100644 --- a/lib/lago_ruby/models/organization.rb +++ b/lib/lago_ruby/models/organization.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/organization_billing_configuration.rb b/lib/lago_ruby/models/organization_billing_configuration.rb index 8469f95..7e5cd32 100644 --- a/lib/lago_ruby/models/organization_billing_configuration.rb +++ b/lib/lago_ruby/models/organization_billing_configuration.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -182,7 +182,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/organization_object.rb b/lib/lago_ruby/models/organization_object.rb index 64e0ebf..a9cfeac 100644 --- a/lib/lago_ruby/models/organization_object.rb +++ b/lib/lago_ruby/models/organization_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -376,7 +376,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/organization_update_input.rb b/lib/lago_ruby/models/organization_update_input.rb index 701c307..f5c3389 100644 --- a/lib/lago_ruby/models/organization_update_input.rb +++ b/lib/lago_ruby/models/organization_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/organization_update_input_organization.rb b/lib/lago_ruby/models/organization_update_input_organization.rb index 3d84e2a..789a2fd 100644 --- a/lib/lago_ruby/models/organization_update_input_organization.rb +++ b/lib/lago_ruby/models/organization_update_input_organization.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -331,7 +331,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/pagination_meta.rb b/lib/lago_ruby/models/pagination_meta.rb index b9abddd..7f95aac 100644 --- a/lib/lago_ruby/models/pagination_meta.rb +++ b/lib/lago_ruby/models/pagination_meta.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -223,7 +223,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan.rb b/lib/lago_ruby/models/plan.rb index 3e1d6d2..b4e7174 100644 --- a/lib/lago_ruby/models/plan.rb +++ b/lib/lago_ruby/models/plan.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan_create_input.rb b/lib/lago_ruby/models/plan_create_input.rb index a9de71b..cfe054d 100644 --- a/lib/lago_ruby/models/plan_create_input.rb +++ b/lib/lago_ruby/models/plan_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan_create_input_plan.rb b/lib/lago_ruby/models/plan_create_input_plan.rb index fddfe15..ac87096 100644 --- a/lib/lago_ruby/models/plan_create_input_plan.rb +++ b/lib/lago_ruby/models/plan_create_input_plan.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -308,7 +308,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 dde71d8..7278014 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -287,7 +287,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 4530e69..ae995f6 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -183,7 +183,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan_object.rb b/lib/lago_ruby/models/plan_object.rb index 7bdea1d..42ac85d 100644 --- a/lib/lago_ruby/models/plan_object.rb +++ b/lib/lago_ruby/models/plan_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -411,7 +411,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan_overrides_object.rb b/lib/lago_ruby/models/plan_overrides_object.rb new file mode 100644 index 0000000..8fd9ee6 --- /dev/null +++ b/lib/lago_ruby/models/plan_overrides_object.rb @@ -0,0 +1,289 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + # Based plan overrides. + class PlanOverridesObject + # The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan. + attr_accessor :amount_cents + + attr_accessor :amount_currency + + # The description on the plan. + attr_accessor :description + + # Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the plan will be used as the default display name. + attr_accessor :invoice_display_name + + # The name of the plan. + attr_accessor :name + + # List of unique code used to identify the taxes. + attr_accessor :tax_codes + + # The duration in days during which the base cost of the plan is offered for free. + attr_accessor :trial_period + + # Additional usage-based charges for this plan. + attr_accessor :charges + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'amount_cents' => :'amount_cents', + :'amount_currency' => :'amount_currency', + :'description' => :'description', + :'invoice_display_name' => :'invoice_display_name', + :'name' => :'name', + :'tax_codes' => :'tax_codes', + :'trial_period' => :'trial_period', + :'charges' => :'charges' + } + 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 + { + :'amount_cents' => :'Integer', + :'amount_currency' => :'Currency', + :'description' => :'String', + :'invoice_display_name' => :'String', + :'name' => :'String', + :'tax_codes' => :'Array', + :'trial_period' => :'Float', + :'charges' => :'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::PlanOverridesObject` 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::PlanOverridesObject`. 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?(:'amount_cents') + self.amount_cents = attributes[:'amount_cents'] + end + + if attributes.key?(:'amount_currency') + self.amount_currency = attributes[:'amount_currency'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'invoice_display_name') + self.invoice_display_name = attributes[:'invoice_display_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'tax_codes') + if (value = attributes[:'tax_codes']).is_a?(Array) + self.tax_codes = value + end + end + + if attributes.key?(:'trial_period') + self.trial_period = attributes[:'trial_period'] + end + + if attributes.key?(:'charges') + if (value = attributes[:'charges']).is_a?(Array) + self.charges = value + end + 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 && + amount_cents == o.amount_cents && + amount_currency == o.amount_currency && + description == o.description && + invoice_display_name == o.invoice_display_name && + name == o.name && + tax_codes == o.tax_codes && + trial_period == o.trial_period && + charges == o.charges + 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 + [amount_cents, amount_currency, description, invoice_display_name, name, tax_codes, trial_period, charges].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/plan_overrides_object_charges_inner.rb b/lib/lago_ruby/models/plan_overrides_object_charges_inner.rb new file mode 100644 index 0000000..1dee9f2 --- /dev/null +++ b/lib/lago_ruby/models/plan_overrides_object_charges_inner.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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class PlanOverridesObjectChargesInner + # Unique identifier of the charge created by Lago. + attr_accessor :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 + + # 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. + attr_accessor :min_amount_cents + + attr_accessor :properties + + # All charge information, sorted by groups. + attr_accessor :group_properties + + # List of unique code used to identify the taxes. + attr_accessor :tax_codes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'invoice_display_name' => :'invoice_display_name', + :'min_amount_cents' => :'min_amount_cents', + :'properties' => :'properties', + :'group_properties' => :'group_properties', + :'tax_codes' => :'tax_codes' + } + 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 + { + :'id' => :'String', + :'invoice_display_name' => :'String', + :'min_amount_cents' => :'Integer', + :'properties' => :'ChargeObjectProperties', + :'group_properties' => :'Array', + :'tax_codes' => :'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::PlanOverridesObjectChargesInner` 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::PlanOverridesObjectChargesInner`. 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'invoice_display_name') + self.invoice_display_name = attributes[:'invoice_display_name'] + end + + if attributes.key?(:'min_amount_cents') + self.min_amount_cents = attributes[:'min_amount_cents'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'group_properties') + if (value = attributes[:'group_properties']).is_a?(Array) + self.group_properties = value + end + end + + if attributes.key?(:'tax_codes') + if (value = attributes[:'tax_codes']).is_a?(Array) + self.tax_codes = value + end + 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 && + id == o.id && + invoice_display_name == o.invoice_display_name && + min_amount_cents == o.min_amount_cents && + properties == o.properties && + group_properties == o.group_properties && + tax_codes == o.tax_codes + 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 + [id, invoice_display_name, min_amount_cents, properties, group_properties, tax_codes].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/plan_update_input.rb b/lib/lago_ruby/models/plan_update_input.rb index 1b81461..ee08eaf 100644 --- a/lib/lago_ruby/models/plan_update_input.rb +++ b/lib/lago_ruby/models/plan_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plan_update_input_plan.rb b/lib/lago_ruby/models/plan_update_input_plan.rb index 11ae8cf..2abc3e7 100644 --- a/lib/lago_ruby/models/plan_update_input_plan.rb +++ b/lib/lago_ruby/models/plan_update_input_plan.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -308,7 +308,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 d5d877d..85c871f 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -297,7 +297,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/plans_paginated.rb b/lib/lago_ruby/models/plans_paginated.rb index 6c814e4..ee29db6 100644 --- a/lib/lago_ruby/models/plans_paginated.rb +++ b/lib/lago_ruby/models/plans_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription.rb b/lib/lago_ruby/models/subscription.rb index c786eeb..d62ab2c 100644 --- a/lib/lago_ruby/models/subscription.rb +++ b/lib/lago_ruby/models/subscription.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -32,7 +32,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'subscription' => :'SubscriptionObject' + :'subscription' => :'SubscriptionObjectExtended' } end @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription_create_input.rb b/lib/lago_ruby/models/subscription_create_input.rb index b975bdf..85a64c7 100644 --- a/lib/lago_ruby/models/subscription_create_input.rb +++ b/lib/lago_ruby/models/subscription_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription_create_input_subscription.rb b/lib/lago_ruby/models/subscription_create_input_subscription.rb index c405849..d7f4638 100644 --- a/lib/lago_ruby/models/subscription_create_input_subscription.rb +++ b/lib/lago_ruby/models/subscription_create_input_subscription.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -36,6 +36,8 @@ class SubscriptionCreateInputSubscription # The start date for the subscription, allowing for the creation of subscriptions that can begin in the past or future. Please note that it cannot be used to update the start date of a pending subscription or schedule an upgrade/downgrade. The start_date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). attr_accessor :subscription_at + attr_accessor :plan_overrides + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -67,7 +69,8 @@ def self.attribute_map :'external_id' => :'external_id', :'billing_time' => :'billing_time', :'ending_at' => :'ending_at', - :'subscription_at' => :'subscription_at' + :'subscription_at' => :'subscription_at', + :'plan_overrides' => :'plan_overrides' } end @@ -85,7 +88,8 @@ def self.openapi_types :'external_id' => :'String', :'billing_time' => :'String', :'ending_at' => :'Time', - :'subscription_at' => :'Time' + :'subscription_at' => :'Time', + :'plan_overrides' => :'PlanOverridesObject' } end @@ -143,6 +147,10 @@ def initialize(attributes = {}) if attributes.key?(:'subscription_at') self.subscription_at = attributes[:'subscription_at'] end + + if attributes.key?(:'plan_overrides') + self.plan_overrides = attributes[:'plan_overrides'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -198,7 +206,8 @@ def ==(o) external_id == o.external_id && billing_time == o.billing_time && ending_at == o.ending_at && - subscription_at == o.subscription_at + subscription_at == o.subscription_at && + plan_overrides == o.plan_overrides end # @see the `==` method @@ -210,7 +219,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [external_customer_id, plan_code, name, external_id, billing_time, ending_at, subscription_at].hash + [external_customer_id, plan_code, name, external_id, billing_time, ending_at, subscription_at, plan_overrides].hash end # Builds the object from hash @@ -275,7 +284,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription_object.rb b/lib/lago_ruby/models/subscription_object.rb index ad577ac..0fab565 100644 --- a/lib/lago_ruby/models/subscription_object.rb +++ b/lib/lago_ruby/models/subscription_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -436,7 +436,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription_object_extended.rb b/lib/lago_ruby/models/subscription_object_extended.rb new file mode 100644 index 0000000..637b146 --- /dev/null +++ b/lib/lago_ruby/models/subscription_object_extended.rb @@ -0,0 +1,507 @@ +=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.1.0-SNAPSHOT + +=end + +require 'date' +require 'time' + +module LagoAPI + class SubscriptionObjectExtended + # Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system + attr_accessor :lago_id + + # The subscription external unique identifier (provided by your own application). + attr_accessor :external_id + + # 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 billing time for the subscription, which can be set as either `anniversary` or `calendar`. If not explicitly provided, it will default to `calendar`. The billing time determines the timing of recurring billing cycles for the subscription. By specifying `anniversary`, the billing cycle will be based on the specific date the subscription started (billed fully), while `calendar` sets the billing cycle at the first day of the week/month/year (billed with proration). + attr_accessor :billing_time + + # The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan. + attr_accessor :name + + # The unique code representing the plan to be attached to the customer. This code must correspond to the `code` property of one of the active plans. + attr_accessor :plan_code + + # The status of the subscription, which can have the following values: - `pending`: a previous subscription has been downgraded, and the current one is awaiting automatic activation at the end of the billing period. - `active`: the subscription is currently active and applied to the customer. - `terminated`: the subscription is no longer active. - `canceled`: the subscription has been stopped before its activation. This can occur when two consecutive downgrades have been applied to a customer or when a subscription with a pending status is terminated. + attr_accessor :status + + # The creation date of the subscription, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). This date provides a timestamp indicating when the subscription was initially created. + attr_accessor :created_at + + # The cancellation date of the subscription. This field is not null when the subscription is `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). + attr_accessor :canceled_at + + # The effective start date of the subscription. This field can be null if the subscription is `pending` or `canceled`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). + attr_accessor :started_at + + # The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC). + attr_accessor :ending_at + + # The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). + attr_accessor :subscription_at + + # The termination date of the subscription. This field is not null when the subscription is `terminated`. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC) + attr_accessor :terminated_at + + # The code identifying the previous plan associated with this subscription. + attr_accessor :previous_plan_code + + # The code identifying the next plan in the case of a downgrade. + attr_accessor :next_plan_code + + # The date when the plan will be downgraded, represented in ISO 8601 date format. + attr_accessor :downgrade_plan_date + + attr_accessor :plan + + 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 + { + :'lago_id' => :'lago_id', + :'external_id' => :'external_id', + :'lago_customer_id' => :'lago_customer_id', + :'external_customer_id' => :'external_customer_id', + :'billing_time' => :'billing_time', + :'name' => :'name', + :'plan_code' => :'plan_code', + :'status' => :'status', + :'created_at' => :'created_at', + :'canceled_at' => :'canceled_at', + :'started_at' => :'started_at', + :'ending_at' => :'ending_at', + :'subscription_at' => :'subscription_at', + :'terminated_at' => :'terminated_at', + :'previous_plan_code' => :'previous_plan_code', + :'next_plan_code' => :'next_plan_code', + :'downgrade_plan_date' => :'downgrade_plan_date', + :'plan' => :'plan' + } + 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_id' => :'String', + :'external_id' => :'String', + :'lago_customer_id' => :'String', + :'external_customer_id' => :'String', + :'billing_time' => :'String', + :'name' => :'String', + :'plan_code' => :'String', + :'status' => :'String', + :'created_at' => :'Time', + :'canceled_at' => :'Time', + :'started_at' => :'Time', + :'ending_at' => :'Time', + :'subscription_at' => :'Time', + :'terminated_at' => :'Time', + :'previous_plan_code' => :'String', + :'next_plan_code' => :'String', + :'downgrade_plan_date' => :'Time', + :'plan' => :'PlanObject' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'name', + :'canceled_at', + :'started_at', + :'terminated_at', + :'previous_plan_code', + :'next_plan_code', + :'downgrade_plan_date', + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'SubscriptionObject' + ] + 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::SubscriptionObjectExtended` 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::SubscriptionObjectExtended`. 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_id') + self.lago_id = attributes[:'lago_id'] + else + self.lago_id = nil + end + + if attributes.key?(:'external_id') + self.external_id = attributes[:'external_id'] + else + self.external_id = nil + end + + if attributes.key?(:'lago_customer_id') + self.lago_customer_id = attributes[:'lago_customer_id'] + else + self.lago_customer_id = nil + end + + if attributes.key?(:'external_customer_id') + self.external_customer_id = attributes[:'external_customer_id'] + else + self.external_customer_id = nil + end + + if attributes.key?(:'billing_time') + self.billing_time = attributes[:'billing_time'] + else + self.billing_time = nil + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'plan_code') + self.plan_code = attributes[:'plan_code'] + else + self.plan_code = nil + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + else + self.status = nil + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + else + self.created_at = nil + end + + if attributes.key?(:'canceled_at') + self.canceled_at = attributes[:'canceled_at'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'ending_at') + self.ending_at = attributes[:'ending_at'] + end + + if attributes.key?(:'subscription_at') + self.subscription_at = attributes[:'subscription_at'] + else + self.subscription_at = nil + end + + if attributes.key?(:'terminated_at') + self.terminated_at = attributes[:'terminated_at'] + end + + if attributes.key?(:'previous_plan_code') + self.previous_plan_code = attributes[:'previous_plan_code'] + end + + if attributes.key?(:'next_plan_code') + self.next_plan_code = attributes[:'next_plan_code'] + end + + if attributes.key?(:'downgrade_plan_date') + self.downgrade_plan_date = attributes[:'downgrade_plan_date'] + end + + if attributes.key?(:'plan') + self.plan = attributes[:'plan'] + 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 @lago_id.nil? + invalid_properties.push('invalid value for "lago_id", lago_id cannot be nil.') + end + + if @external_id.nil? + invalid_properties.push('invalid value for "external_id", external_id cannot be nil.') + end + + if @lago_customer_id.nil? + invalid_properties.push('invalid value for "lago_customer_id", lago_customer_id cannot be nil.') + end + + if @external_customer_id.nil? + invalid_properties.push('invalid value for "external_customer_id", external_customer_id cannot be nil.') + end + + if @billing_time.nil? + invalid_properties.push('invalid value for "billing_time", billing_time cannot be nil.') + end + + if @plan_code.nil? + invalid_properties.push('invalid value for "plan_code", plan_code cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @subscription_at.nil? + invalid_properties.push('invalid value for "subscription_at", subscription_at 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 @lago_id.nil? + return false if @external_id.nil? + return false if @lago_customer_id.nil? + return false if @external_customer_id.nil? + return false if @billing_time.nil? + billing_time_validator = EnumAttributeValidator.new('String', ["calendar", "anniversary"]) + return false unless billing_time_validator.valid?(@billing_time) + return false if @plan_code.nil? + return false if @status.nil? + status_validator = EnumAttributeValidator.new('String', ["active", "pending", "terminated", "canceled"]) + return false unless status_validator.valid?(@status) + return false if @created_at.nil? + return false if @subscription_at.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] billing_time Object to be assigned + def billing_time=(billing_time) + validator = EnumAttributeValidator.new('String', ["calendar", "anniversary"]) + unless validator.valid?(billing_time) + fail ArgumentError, "invalid value for \"billing_time\", must be one of #{validator.allowable_values}." + end + @billing_time = billing_time + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["active", "pending", "terminated", "canceled"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = 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 && + lago_id == o.lago_id && + external_id == o.external_id && + lago_customer_id == o.lago_customer_id && + external_customer_id == o.external_customer_id && + billing_time == o.billing_time && + name == o.name && + plan_code == o.plan_code && + status == o.status && + created_at == o.created_at && + canceled_at == o.canceled_at && + started_at == o.started_at && + ending_at == o.ending_at && + subscription_at == o.subscription_at && + terminated_at == o.terminated_at && + previous_plan_code == o.previous_plan_code && + next_plan_code == o.next_plan_code && + downgrade_plan_date == o.downgrade_plan_date && + plan == o.plan + 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_id, external_id, lago_customer_id, external_customer_id, billing_time, name, plan_code, status, created_at, canceled_at, started_at, ending_at, subscription_at, terminated_at, previous_plan_code, next_plan_code, downgrade_plan_date, plan].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/subscription_update_input.rb b/lib/lago_ruby/models/subscription_update_input.rb index be17c79..9d38c4a 100644 --- a/lib/lago_ruby/models/subscription_update_input.rb +++ b/lib/lago_ruby/models/subscription_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscription_update_input_subscription.rb b/lib/lago_ruby/models/subscription_update_input_subscription.rb index 84d4c15..5329bab 100644 --- a/lib/lago_ruby/models/subscription_update_input_subscription.rb +++ b/lib/lago_ruby/models/subscription_update_input_subscription.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -24,12 +24,15 @@ class SubscriptionUpdateInputSubscription # The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). attr_accessor :subscription_at + attr_accessor :plan_overrides + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', :'ending_at' => :'ending_at', - :'subscription_at' => :'subscription_at' + :'subscription_at' => :'subscription_at', + :'plan_overrides' => :'plan_overrides' } end @@ -43,7 +46,8 @@ def self.openapi_types { :'name' => :'String', :'ending_at' => :'Time', - :'subscription_at' => :'Time' + :'subscription_at' => :'Time', + :'plan_overrides' => :'PlanOverridesObject' } end @@ -80,6 +84,10 @@ def initialize(attributes = {}) if attributes.key?(:'subscription_at') self.subscription_at = attributes[:'subscription_at'] end + + if attributes.key?(:'plan_overrides') + self.plan_overrides = attributes[:'plan_overrides'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -104,7 +112,8 @@ def ==(o) self.class == o.class && name == o.name && ending_at == o.ending_at && - subscription_at == o.subscription_at + subscription_at == o.subscription_at && + plan_overrides == o.plan_overrides end # @see the `==` method @@ -116,7 +125,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, ending_at, subscription_at].hash + [name, ending_at, subscription_at, plan_overrides].hash end # Builds the object from hash @@ -181,7 +190,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/subscriptions_paginated.rb b/lib/lago_ruby/models/subscriptions_paginated.rb index e934ed7..3eda06a 100644 --- a/lib/lago_ruby/models/subscriptions_paginated.rb +++ b/lib/lago_ruby/models/subscriptions_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax.rb b/lib/lago_ruby/models/tax.rb index 543dcb8..de79d2c 100644 --- a/lib/lago_ruby/models/tax.rb +++ b/lib/lago_ruby/models/tax.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax_base_input.rb b/lib/lago_ruby/models/tax_base_input.rb index 5393e71..ab697e4 100644 --- a/lib/lago_ruby/models/tax_base_input.rb +++ b/lib/lago_ruby/models/tax_base_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -222,7 +222,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax_create_input.rb b/lib/lago_ruby/models/tax_create_input.rb index e1a9782..8602cff 100644 --- a/lib/lago_ruby/models/tax_create_input.rb +++ b/lib/lago_ruby/models/tax_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax_create_input_tax.rb b/lib/lago_ruby/models/tax_create_input_tax.rb index b20bdde..06a35ca 100644 --- a/lib/lago_ruby/models/tax_create_input_tax.rb +++ b/lib/lago_ruby/models/tax_create_input_tax.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -250,7 +250,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax_object.rb b/lib/lago_ruby/models/tax_object.rb index 8863a7d..bc1e46b 100644 --- a/lib/lago_ruby/models/tax_object.rb +++ b/lib/lago_ruby/models/tax_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -309,7 +309,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/tax_update_input.rb b/lib/lago_ruby/models/tax_update_input.rb index 8fcbe18..3fdc054 100644 --- a/lib/lago_ruby/models/tax_update_input.rb +++ b/lib/lago_ruby/models/tax_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/taxes_paginated.rb b/lib/lago_ruby/models/taxes_paginated.rb index d617530..f64ae45 100644 --- a/lib/lago_ruby/models/taxes_paginated.rb +++ b/lib/lago_ruby/models/taxes_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/timezone.rb b/lib/lago_ruby/models/timezone.rb index 3145fab..264fb05 100644 --- a/lib/lago_ruby/models/timezone.rb +++ b/lib/lago_ruby/models/timezone.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/lib/lago_ruby/models/wallet.rb b/lib/lago_ruby/models/wallet.rb index 0eb4794..595acc1 100644 --- a/lib/lago_ruby/models/wallet.rb +++ b/lib/lago_ruby/models/wallet.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_create_input.rb b/lib/lago_ruby/models/wallet_create_input.rb index 49eb659..a5407f7 100644 --- a/lib/lago_ruby/models/wallet_create_input.rb +++ b/lib/lago_ruby/models/wallet_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -159,7 +159,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_create_input_wallet.rb b/lib/lago_ruby/models/wallet_create_input_wallet.rb index 9d3b1cf..cbca22c 100644 --- a/lib/lago_ruby/models/wallet_create_input_wallet.rb +++ b/lib/lago_ruby/models/wallet_create_input_wallet.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -298,7 +298,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_object.rb b/lib/lago_ruby/models/wallet_object.rb index 9bc7ace..7ea9d86 100644 --- a/lib/lago_ruby/models/wallet_object.rb +++ b/lib/lago_ruby/models/wallet_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -470,7 +470,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_transaction_create_input.rb b/lib/lago_ruby/models/wallet_transaction_create_input.rb index 3b1a42d..fb9b766 100644 --- a/lib/lago_ruby/models/wallet_transaction_create_input.rb +++ b/lib/lago_ruby/models/wallet_transaction_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 c331d3f..2a24835 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -229,7 +229,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_transaction_object.rb b/lib/lago_ruby/models/wallet_transaction_object.rb index 20e1a27..5d68aa5 100644 --- a/lib/lago_ruby/models/wallet_transaction_object.rb +++ b/lib/lago_ruby/models/wallet_transaction_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -367,7 +367,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_transactions.rb b/lib/lago_ruby/models/wallet_transactions.rb index e86199a..67f7b09 100644 --- a/lib/lago_ruby/models/wallet_transactions.rb +++ b/lib/lago_ruby/models/wallet_transactions.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -168,7 +168,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_transactions_paginated.rb b/lib/lago_ruby/models/wallet_transactions_paginated.rb index a0ea66b..83cd035 100644 --- a/lib/lago_ruby/models/wallet_transactions_paginated.rb +++ b/lib/lago_ruby/models/wallet_transactions_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -191,7 +191,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_update_input.rb b/lib/lago_ruby/models/wallet_update_input.rb index f85a3ce..3a926ca 100644 --- a/lib/lago_ruby/models/wallet_update_input.rb +++ b/lib/lago_ruby/models/wallet_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallet_update_input_wallet.rb b/lib/lago_ruby/models/wallet_update_input_wallet.rb index 2019102..df54eb3 100644 --- a/lib/lago_ruby/models/wallet_update_input_wallet.rb +++ b/lib/lago_ruby/models/wallet_update_input_wallet.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -172,7 +172,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/wallets_paginated.rb b/lib/lago_ruby/models/wallets_paginated.rb index 8b2c0ee..f8b5dfb 100644 --- a/lib/lago_ruby/models/wallets_paginated.rb +++ b/lib/lago_ruby/models/wallets_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/webhook_endpoint.rb b/lib/lago_ruby/models/webhook_endpoint.rb index 0ae1335..45f1be4 100644 --- a/lib/lago_ruby/models/webhook_endpoint.rb +++ b/lib/lago_ruby/models/webhook_endpoint.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -166,7 +166,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/webhook_endpoint_create_input.rb b/lib/lago_ruby/models/webhook_endpoint_create_input.rb index 7c4c127..9371c6a 100644 --- a/lib/lago_ruby/models/webhook_endpoint_create_input.rb +++ b/lib/lago_ruby/models/webhook_endpoint_create_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -159,7 +159,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end 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 0eb3ba3..505a92d 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 @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -212,7 +212,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/webhook_endpoint_object.rb b/lib/lago_ruby/models/webhook_endpoint_object.rb index 8093608..47828e1 100644 --- a/lib/lago_ruby/models/webhook_endpoint_object.rb +++ b/lib/lago_ruby/models/webhook_endpoint_object.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -262,7 +262,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/webhook_endpoint_update_input.rb b/lib/lago_ruby/models/webhook_endpoint_update_input.rb index a86423d..c0f7987 100644 --- a/lib/lago_ruby/models/webhook_endpoint_update_input.rb +++ b/lib/lago_ruby/models/webhook_endpoint_update_input.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -159,7 +159,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/models/webhook_endpoints_paginated.rb b/lib/lago_ruby/models/webhook_endpoints_paginated.rb index c5d857a..2681c0f 100644 --- a/lib/lago_ruby/models/webhook_endpoints_paginated.rb +++ b/lib/lago_ruby/models/webhook_endpoints_paginated.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -184,7 +184,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = LagoAPI.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/lago_ruby/version.rb b/lib/lago_ruby/version.rb index 858d2f6..327f4c6 100644 --- a/lib/lago_ruby/version.rb +++ b/lib/lago_ruby/version.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 @@ -11,5 +11,5 @@ =end module LagoAPI - VERSION = '0.49.0-beta' + VERSION = '0.51.0-beta' end diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index 0e2c0d3..c891000 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index 1bf2829..59de36c 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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 diff --git a/spec/models/credit_note_estimate_input_credit_note_items_inner_spec.rb b/spec/models/credit_note_estimate_input_credit_note_items_inner_spec.rb new file mode 100644 index 0000000..39a2008 --- /dev/null +++ b/spec/models/credit_note_estimate_input_credit_note_items_inner_spec.rb @@ -0,0 +1,42 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner do + let(:instance) { LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner.new } + + describe 'test an instance of CreditNoteEstimateInputCreditNoteItemsInner' do + it 'should create an instance of CreditNoteEstimateInputCreditNoteItemsInner' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimateInputCreditNoteItemsInner) + end + end + + describe 'test attribute "fee_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 "amount_cents"' 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/credit_note_estimate_input_credit_note_spec.rb b/spec/models/credit_note_estimate_input_credit_note_spec.rb new file mode 100644 index 0000000..7b2e810 --- /dev/null +++ b/spec/models/credit_note_estimate_input_credit_note_spec.rb @@ -0,0 +1,42 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimateInputCreditNote +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimateInputCreditNote do + let(:instance) { LagoAPI::CreditNoteEstimateInputCreditNote.new } + + describe 'test an instance of CreditNoteEstimateInputCreditNote' do + it 'should create an instance of CreditNoteEstimateInputCreditNote' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimateInputCreditNote) + end + end + + describe 'test attribute "invoice_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 "items"' 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/credit_note_estimate_input_spec.rb b/spec/models/credit_note_estimate_input_spec.rb new file mode 100644 index 0000000..3eaacd4 --- /dev/null +++ b/spec/models/credit_note_estimate_input_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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimateInput +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimateInput do + let(:instance) { LagoAPI::CreditNoteEstimateInput.new } + + describe 'test an instance of CreditNoteEstimateInput' do + it 'should create an instance of CreditNoteEstimateInput' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimateInput) + end + end + + describe 'test attribute "credit_note"' 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/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb b/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb new file mode 100644 index 0000000..efdbdc4 --- /dev/null +++ b/spec/models/credit_note_estimated_estimated_credit_note_applied_taxes_inner_spec.rb @@ -0,0 +1,78 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner do + let(:instance) { LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner.new } + + describe 'test an instance of CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner' do + it 'should create an instance of CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimatedEstimatedCreditNoteAppliedTaxesInner) + end + end + + describe 'test attribute "lago_tax_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 "tax_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tax_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 "tax_rate"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tax_description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "base_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 "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 "amount_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/credit_note_estimated_estimated_credit_note_items_inner_spec.rb b/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb new file mode 100644 index 0000000..64d4730 --- /dev/null +++ b/spec/models/credit_note_estimated_estimated_credit_note_items_inner_spec.rb @@ -0,0 +1,42 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner do + let(:instance) { LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner.new } + + describe 'test an instance of CreditNoteEstimatedEstimatedCreditNoteItemsInner' do + it 'should create an instance of CreditNoteEstimatedEstimatedCreditNoteItemsInner' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimatedEstimatedCreditNoteItemsInner) + 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 "lago_fee_id"' 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/credit_note_estimated_estimated_credit_note_spec.rb b/spec/models/credit_note_estimated_estimated_credit_note_spec.rb new file mode 100644 index 0000000..d7362aa --- /dev/null +++ b/spec/models/credit_note_estimated_estimated_credit_note_spec.rb @@ -0,0 +1,96 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimatedEstimatedCreditNote +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimatedEstimatedCreditNote do + let(:instance) { LagoAPI::CreditNoteEstimatedEstimatedCreditNote.new } + + describe 'test an instance of CreditNoteEstimatedEstimatedCreditNote' do + it 'should create an instance of CreditNoteEstimatedEstimatedCreditNote' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimatedEstimatedCreditNote) + end + end + + describe 'test attribute "lago_invoice_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 "invoice_number"' 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 + + describe 'test attribute "taxes_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 "taxes_rate"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sub_total_excluding_taxes_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 "max_creditable_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 "max_refundable_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 "coupons_adjustment_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 "items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "applied_taxes"' 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/credit_note_estimated_spec.rb b/spec/models/credit_note_estimated_spec.rb new file mode 100644 index 0000000..7c40656 --- /dev/null +++ b/spec/models/credit_note_estimated_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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::CreditNoteEstimated +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::CreditNoteEstimated do + let(:instance) { LagoAPI::CreditNoteEstimated.new } + + describe 'test an instance of CreditNoteEstimated' do + it 'should create an instance of CreditNoteEstimated' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::CreditNoteEstimated) + end + end + + describe 'test attribute "estimated_credit_note"' 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/plan_overrides_object_charges_inner_spec.rb b/spec/models/plan_overrides_object_charges_inner_spec.rb new file mode 100644 index 0000000..d6137d8 --- /dev/null +++ b/spec/models/plan_overrides_object_charges_inner_spec.rb @@ -0,0 +1,66 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::PlanOverridesObjectChargesInner +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::PlanOverridesObjectChargesInner do + let(:instance) { LagoAPI::PlanOverridesObjectChargesInner.new } + + describe 'test an instance of PlanOverridesObjectChargesInner' do + it 'should create an instance of PlanOverridesObjectChargesInner' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::PlanOverridesObjectChargesInner) + end + end + + describe 'test attribute "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 "invoice_display_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "min_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 "properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "group_properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tax_codes"' 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/plan_overrides_object_spec.rb b/spec/models/plan_overrides_object_spec.rb new file mode 100644 index 0000000..58eed1e --- /dev/null +++ b/spec/models/plan_overrides_object_spec.rb @@ -0,0 +1,78 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::PlanOverridesObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::PlanOverridesObject do + let(:instance) { LagoAPI::PlanOverridesObject.new } + + describe 'test an instance of PlanOverridesObject' do + it 'should create an instance of PlanOverridesObject' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::PlanOverridesObject) + 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 "amount_currency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "invoice_display_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tax_codes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trial_period"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "charges"' 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/subscription_object_extended_spec.rb b/spec/models/subscription_object_extended_spec.rb new file mode 100644 index 0000000..3a2b188 --- /dev/null +++ b/spec/models/subscription_object_extended_spec.rb @@ -0,0 +1,146 @@ +=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.1.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for LagoAPI::SubscriptionObjectExtended +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe LagoAPI::SubscriptionObjectExtended do + let(:instance) { LagoAPI::SubscriptionObjectExtended.new } + + describe 'test an instance of SubscriptionObjectExtended' do + it 'should create an instance of SubscriptionObjectExtended' do + # uncomment below to test the instance creation + #expect(instance).to be_instance_of(LagoAPI::SubscriptionObjectExtended) + end + end + + describe 'test attribute "lago_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_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 "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 "billing_time"' 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', ["calendar", "anniversary"]) + # validator.allowable_values.each do |value| + # expect { instance.billing_time = value }.not_to raise_error + # end + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "plan_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 "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', ["active", "pending", "terminated", "canceled"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "canceled_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "started_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ending_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "subscription_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "terminated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "previous_plan_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 "next_plan_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 "downgrade_plan_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "plan"' 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 5799048..fc224b1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,7 @@ #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.49.0-beta +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