Name |
Type |
Description |
Notes |
transaction_id |
String |
This field represents a unique identifier for the event. It is crucial for ensuring idempotency, meaning that each event can be uniquely identified and processed without causing any unintended side effects. |
|
external_customer_id |
String |
The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription. |
[optional] |
external_subscription_id |
String |
The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided. |
[optional] |
code |
String |
The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process. |
|
timestamp |
EventInputEventTimestamp |
|
[optional] |
properties |
Hash<String, String> |
This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. |
[optional] |
require 'lago_ruby'
instance = LagoAPI::EventInputEvent.new(
transaction_id: transaction_1234567890,
external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
external_subscription_id: sub_1234567890,
code: storage,
timestamp: null,
properties: {"gb":10}
)