Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

misc: Version v0.49.0-beta #16

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ docs/CustomerCreateInputCustomerMetadataInner.md
docs/CustomerMetadata.md
docs/CustomerObject.md
docs/CustomerObjectExtended.md
docs/CustomerPastUsage.md
docs/CustomerUsage.md
docs/CustomerUsageObject.md
docs/CustomersApi.md
Expand Down Expand Up @@ -276,6 +277,7 @@ lib/lago_ruby/models/customer_create_input_customer_metadata_inner.rb
lib/lago_ruby/models/customer_metadata.rb
lib/lago_ruby/models/customer_object.rb
lib/lago_ruby/models/customer_object_extended.rb
lib/lago_ruby/models/customer_past_usage.rb
lib/lago_ruby/models/customer_usage.rb
lib/lago_ruby/models/customer_usage_object.rb
lib/lago_ruby/models/customers_paginated.rb
Expand Down Expand Up @@ -369,11 +371,5 @@ lib/lago_ruby/models/webhook_endpoints_paginated.rb
lib/lago_ruby/version.rb
spec/api_client_spec.rb
spec/configuration_spec.rb
spec/models/event_input_event_timestamp_spec.rb
spec/models/webhook_endpoint_create_input_spec.rb
spec/models/webhook_endpoint_create_input_webhook_endpoint_spec.rb
spec/models/webhook_endpoint_object_spec.rb
spec/models/webhook_endpoint_spec.rb
spec/models/webhook_endpoint_update_input_spec.rb
spec/models/webhook_endpoints_paginated_spec.rb
spec/models/customer_past_usage_spec.rb
spec/spec_helper.rb
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ script:
- bundle install --path vendor/bundle
- bundle exec rspec
- gem build lago_ruby.gemspec
- gem install ./lago_ruby-0.48.0-beta.gem
- gem install ./lago_ruby-0.49.0-beta.gem
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.48.0-beta
- Package version: 0.48.0-beta
- API version: 0.49.0-beta
- Package version: 0.49.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)
Expand All @@ -26,16 +26,16 @@ gem build lago_ruby.gemspec
Then either install the gem locally:

```shell
gem install ./lago_ruby-0.48.0-beta.gem
gem install ./lago_ruby-0.49.0-beta.gem
```

(for development, run `gem install --dev ./lago_ruby-0.48.0-beta.gem` to install the development dependencies)
(for development, run `gem install --dev ./lago_ruby-0.49.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.48.0-beta'
gem 'lago_ruby', '~> 0.49.0-beta'

### Install from Git

Expand Down Expand Up @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
*LagoAPI::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /customers | Create a customer
*LagoAPI::CustomersApi* | [**delete_applied_coupon**](docs/CustomersApi.md#delete_applied_coupon) | **DELETE** /customers/{external_customer_id}/applied_coupons/{applied_coupon_id} | Delete an applied coupon
*LagoAPI::CustomersApi* | [**destroy_customer**](docs/CustomersApi.md#destroy_customer) | **DELETE** /customers/{external_id} | Delete a customer
*LagoAPI::CustomersApi* | [**find_all_customer_past_usage**](docs/CustomersApi.md#find_all_customer_past_usage) | **GET** /customers/{external_customer_id}/past_usage | Retrieve customer past usage
*LagoAPI::CustomersApi* | [**find_all_customers**](docs/CustomersApi.md#find_all_customers) | **GET** /customers | List all customers
*LagoAPI::CustomersApi* | [**find_customer**](docs/CustomersApi.md#find_customer) | **GET** /customers/{external_id} | Retrieve a customer
*LagoAPI::CustomersApi* | [**find_customer_current_usage**](docs/CustomersApi.md#find_customer_current_usage) | **GET** /customers/{external_customer_id}/current_usage | Retrieve customer current usage
Expand Down Expand Up @@ -144,6 +145,7 @@ Class | Method | HTTP request | Description
*LagoAPI::SubscriptionsApi* | [**create_subscription**](docs/SubscriptionsApi.md#create_subscription) | **POST** /subscriptions | Assign a plan to a customer
*LagoAPI::SubscriptionsApi* | [**destroy_subscription**](docs/SubscriptionsApi.md#destroy_subscription) | **DELETE** /subscriptions/{external_id} | Terminate a subscription
*LagoAPI::SubscriptionsApi* | [**find_all_subscriptions**](docs/SubscriptionsApi.md#find_all_subscriptions) | **GET** /subscriptions | List all subscriptions
*LagoAPI::SubscriptionsApi* | [**find_subscription**](docs/SubscriptionsApi.md#find_subscription) | **GET** /subscriptions/{external_id} | Retrieve a subscription
*LagoAPI::SubscriptionsApi* | [**update_subscription**](docs/SubscriptionsApi.md#update_subscription) | **PUT** /subscriptions/{external_id} | Update a subscription
*LagoAPI::TaxesApi* | [**create_tax**](docs/TaxesApi.md#create_tax) | **POST** /taxes | Create a tax
*LagoAPI::TaxesApi* | [**destroy_tax**](docs/TaxesApi.md#destroy_tax) | **DELETE** /taxes/{code} | Delete a tax
Expand Down Expand Up @@ -239,6 +241,7 @@ Class | Method | HTTP request | Description
- [LagoAPI::CustomerMetadata](docs/CustomerMetadata.md)
- [LagoAPI::CustomerObject](docs/CustomerObject.md)
- [LagoAPI::CustomerObjectExtended](docs/CustomerObjectExtended.md)
- [LagoAPI::CustomerPastUsage](docs/CustomerPastUsage.md)
- [LagoAPI::CustomerUsage](docs/CustomerUsage.md)
- [LagoAPI::CustomerUsageObject](docs/CustomerUsageObject.md)
- [LagoAPI::CustomersPaginated](docs/CustomersPaginated.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/AddOnBaseInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | The name of the add-on. | [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] |
| **code** | **String** | Unique code used to identify the add-on. | [optional] |
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | [optional] |
| **amount_currency** | [**Currency**](Currency.md) | | [optional] |
Expand All @@ -18,6 +19,7 @@ require 'lago_ruby'

instance = LagoAPI::AddOnBaseInput.new(
name: Setup Fee,
invoice_display_name: Setup Fee (SF1),
code: setup_fee,
amount_cents: 50000,
amount_currency: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/AddOnCreateInputAddOn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | The name of the add-on. | |
| **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] |
| **code** | **String** | Unique code used to identify the add-on. | |
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
| **amount_currency** | [**Currency**](Currency.md) | | |
Expand All @@ -18,6 +19,7 @@ require 'lago_ruby'

instance = LagoAPI::AddOnCreateInputAddOn.new(
name: Setup Fee,
invoice_display_name: Setup Fee (SF1),
code: setup_fee,
amount_cents: 50000,
amount_currency: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/AddOnObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
| ---- | ---- | ----------- | ----- |
| **lago_id** | **String** | Unique identifier of the add-on, created by Lago. | |
| **name** | **String** | The name of the add-on. | |
| **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] |
| **code** | **String** | Unique code used to identify the add-on. | |
| **amount_cents** | **Integer** | The cost of the add-on in cents, excluding any applicable taxes, that is billed to a customer. By creating a one-off invoice, you will be able to override this value. | |
| **amount_currency** | [**Currency**](Currency.md) | | |
Expand All @@ -21,6 +22,7 @@ require 'lago_ruby'
instance = LagoAPI::AddOnObject.new(
lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
name: Setup Fee,
invoice_display_name: Setup Fee (SF1),
code: setup_fee,
amount_cents: 50000,
amount_currency: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/BillableMetricBaseInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| **description** | **String** | Internal description of the billable metric. | [optional] |
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | [optional] |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | [optional] |
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |

Expand Down
2 changes: 1 addition & 1 deletion docs/BillableMetricCreateInputBillableMetric.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| **description** | **String** | Internal description of the billable metric. | [optional] |
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | [optional] |
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |

Expand Down
2 changes: 1 addition & 1 deletion docs/BillableMetricObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| **recurring** | **Boolean** | Defines if the billable metric is persisted billing period over billing period. - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period. - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period. - If not defined in the request, default value is `false`. | |
| **created_at** | **Time** | Creation date of the billable metric. | |
| **field_name** | **String** | Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`. | [optional] |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`. | |
| **aggregation_type** | **String** | Aggregation method used to compute usage for this billable metric. | |
| **weighted_interval** | **String** | Parameter exclusively utilized in conjunction with the `weighted_sum` aggregation type. It serves to adjust the aggregation result by assigning weights and proration to the result based on time intervals. When this field is not provided, the default time interval is assumed to be in `seconds`. | [optional] |
| **group** | [**BillableMetricGroup**](BillableMetricGroup.md) | | [optional] |
| **active_subscriptions_count** | **Integer** | Number of active subscriptions using this billable metric. | |
Expand Down
2 changes: 2 additions & 0 deletions docs/ChargeObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| **lago_id** | **String** | Unique identifier of charge, created by Lago. | |
| **lago_billable_metric_id** | **String** | Unique identifier of the billable metric created by Lago. | |
| **billable_metric_code** | **String** | Unique code identifying a billable metric. | |
| **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] |
| **created_at** | **Time** | The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard. | |
| **charge_model** | **String** | Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `graduated_percentage`, `package`, `percentage` or `volume`. | |
| **pay_in_advance** | **Boolean** | This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to `false`, the charge is due and invoiced at the end of each billing period. | [optional] |
Expand All @@ -26,6 +27,7 @@ instance = LagoAPI::ChargeObject.new(
lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
lago_billable_metric_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
billable_metric_code: requests,
invoice_display_name: Setup,
created_at: 2022-09-14T16:35:31Z,
charge_model: null,
pay_in_advance: true,
Expand Down
2 changes: 2 additions & 0 deletions docs/CreditNoteItemObjectFee.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
| **lago_customer_id** | **String** | Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
| **external_customer_id** | **String** | Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
| **external_subscription_id** | **String** | Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge and the payment for the fee is made in advance (`pay_in_advance` is set to true). | [optional] |
| **invoice_display_name** | **String** | Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name. | [optional] |
| **amount_cents** | **Integer** | The cost of this specific fee, excluding any applicable taxes. | |
| **amount_currency** | [**Currency**](Currency.md) | | |
| **taxes_amount_cents** | **Integer** | The cost of the tax associated with this specific fee. | |
Expand Down Expand Up @@ -49,6 +50,7 @@ instance = LagoAPI::CreditNoteItemObjectFee.new(
lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
external_customer_id: external_id,
external_subscription_id: external_id,
invoice_display_name: Setup Fee (SF1),
amount_cents: 100,
amount_currency: null,
taxes_amount_cents: 20,
Expand Down
2 changes: 2 additions & 0 deletions docs/CustomerChargeUsageObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **units** | **String** | The number of units consumed by the customer for a specific charge item. | |
| **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | |
| **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed by the customer for a specific charge item. | |
| **amount_currency** | [**Currency**](Currency.md) | | |
| **charge** | [**CustomerChargeUsageObjectCharge**](CustomerChargeUsageObjectCharge.md) | | |
Expand All @@ -18,6 +19,7 @@ require 'lago_ruby'

instance = LagoAPI::CustomerChargeUsageObject.new(
units: 1.0,
events_count: 10,
amount_cents: 123,
amount_currency: null,
charge: null,
Expand Down
2 changes: 2 additions & 0 deletions docs/CustomerChargeUsageObjectGroupsInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| **key** | **String** | The group key, only returned for groups with two dimensions. | [optional] |
| **value** | **String** | The group value. | [optional] |
| **units** | **String** | The number of units consumed for a specific group related to a charge item. | [optional] |
| **events_count** | **Integer** | The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts. | [optional] |
| **amount_cents** | **Integer** | The amount in cents, tax excluded, consumed for a specific group related to a charge item. | [optional] |

## Example
Expand All @@ -20,6 +21,7 @@ instance = LagoAPI::CustomerChargeUsageObjectGroupsInner.new(
key: null,
value: europe,
units: 0.9,
events_count: 10,
amount_cents: 1000
)
```
Expand Down
20 changes: 20 additions & 0 deletions docs/CustomerPastUsage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LagoAPI::CustomerPastUsage

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **usage_periods** | [**Array<CustomerUsage>**](CustomerUsage.md) | | |
| **meta** | [**PaginationMeta**](PaginationMeta.md) | | |

## Example

```ruby
require 'lago_ruby'

instance = LagoAPI::CustomerPastUsage.new(
usage_periods: null,
meta: null
)
```

2 changes: 2 additions & 0 deletions docs/CustomerUsageObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| **from_datetime** | **Time** | The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
| **to_datetime** | **Time** | The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC). | |
| **issuing_date** | **Time** | The date of creation of the invoice. | |
| **lago_invoice_id** | **String** | A unique identifier associated with the invoice related to this particular usage record. | [optional] |
| **currency** | [**Currency**](Currency.md) | | [optional] |
| **amount_cents** | **Integer** | The amount in cents, tax excluded. | |
| **taxes_amount_cents** | **Integer** | The tax amount in cents. | |
Expand All @@ -22,6 +23,7 @@ instance = LagoAPI::CustomerUsageObject.new(
from_datetime: 2022-07-01T00:00Z,
to_datetime: 2022-07-31T23:59:59Z,
issuing_date: 2022-08-01T23:59:59Z,
lago_invoice_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
currency: null,
amount_cents: 123,
taxes_amount_cents: 200,
Expand Down
Loading