togai_client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +61 -0
- data/Rakefile +10 -0
- data/docs/Account.md +24 -0
- data/docs/AccountAliases.md +20 -0
- data/docs/AccountPaginatedResponse.md +22 -0
- data/docs/AccountsApi.md +595 -0
- data/docs/AddAccountAliasesRequest.md +18 -0
- data/docs/AssociatePricePlanRequest.md +24 -0
- data/docs/AssociatePricePlanResponse.md +22 -0
- data/docs/BaseSuccessResponse.md +18 -0
- data/docs/BundleStrategy.md +24 -0
- data/docs/BundleStrategyUsageMetersValue.md +18 -0
- data/docs/Computation.md +31 -0
- data/docs/CreateAccountRequest.md +22 -0
- data/docs/CreateCustomerRequest.md +26 -0
- data/docs/CreateCustomerResponse.md +26 -0
- data/docs/CreateEventSchemaRequest.md +24 -0
- data/docs/CreatePricePlanRequest.md +24 -0
- data/docs/CreateUsageMeterRequest.md +26 -0
- data/docs/Customer.md +30 -0
- data/docs/CustomerPaginatedResponse.md +22 -0
- data/docs/CustomersApi.md +363 -0
- data/docs/DimensionsSchema.md +18 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/Event.md +28 -0
- data/docs/EventAttribute.md +22 -0
- data/docs/EventAttributeSchema.md +20 -0
- data/docs/EventIngestionApi.md +146 -0
- data/docs/EventManagementApi.md +159 -0
- data/docs/EventPipelineInfo.md +26 -0
- data/docs/EventPipelineInfoAccount.md +20 -0
- data/docs/EventPipelineInfoCustomer.md +20 -0
- data/docs/EventPipelineInfoEventSchema.md +20 -0
- data/docs/EventPipelineInfoPricePlansInner.md +26 -0
- data/docs/EventPipelineInfoUsageMetersInner.md +24 -0
- data/docs/EventSchema.md +32 -0
- data/docs/EventSchemaListData.md +34 -0
- data/docs/EventSchemaListDataAllOf.md +18 -0
- data/docs/EventSchemaListPaginatedResponse.md +22 -0
- data/docs/EventSchemaVersionsResponse.md +18 -0
- data/docs/EventSchemasApi.md +581 -0
- data/docs/EventWithStatus.md +20 -0
- data/docs/EventWithStatusAndEventPipelineInfo.md +22 -0
- data/docs/EventWithStatusAndEventPipelineInfoAllOf.md +18 -0
- data/docs/GetEventResponse.md +18 -0
- data/docs/GetEventsResponse.md +20 -0
- data/docs/GetMetricsRequest.md +22 -0
- data/docs/GetMetricsResponse.md +18 -0
- data/docs/IngestBatchEventRequest.md +18 -0
- data/docs/IngestBatchEventResponse.md +18 -0
- data/docs/IngestError.md +20 -0
- data/docs/IngestEventRequest.md +18 -0
- data/docs/IngestEventResponse.md +18 -0
- data/docs/IngestionStatus.md +20 -0
- data/docs/MetricDataPoints.md +22 -0
- data/docs/MetricDataPointsGroupedBy.md +20 -0
- data/docs/MetricName.md +15 -0
- data/docs/MetricQuery.md +26 -0
- data/docs/MetricQueryFilterEntry.md +20 -0
- data/docs/MetricQueryResponse.md +22 -0
- data/docs/MetricsApi.md +79 -0
- data/docs/PaginationOptions.md +20 -0
- data/docs/PlanOverride.md +24 -0
- data/docs/PricePlan.md +26 -0
- data/docs/PricePlanListData.md +32 -0
- data/docs/PricePlanPaginatedResponse.md +22 -0
- data/docs/PricePlansApi.md +363 -0
- data/docs/PricingCycle.md +24 -0
- data/docs/PricingCycleStartOffset.md +20 -0
- data/docs/PricingSchedule.md +22 -0
- data/docs/RateCard.md +22 -0
- data/docs/RateCardBundle.md +22 -0
- data/docs/RateCardUsageValue.md +24 -0
- data/docs/RemoveAccountAliasesRequest.md +18 -0
- data/docs/SignupRequest.md +22 -0
- data/docs/SignupResponse.md +20 -0
- data/docs/StatusResponse.md +24 -0
- data/docs/StatusResponseHeaders.md +18 -0
- data/docs/UpdateAccountRequest.md +18 -0
- data/docs/UpdateCustomerRequest.md +22 -0
- data/docs/UpdateEventSchemaRequest.md +22 -0
- data/docs/UpdatePricePlanRequest.md +22 -0
- data/docs/UpdateUsageMeterRequest.md +24 -0
- data/docs/UsageMeter.md +34 -0
- data/docs/UsageMeterPaginatedResponse.md +22 -0
- data/docs/UsageMetersApi.md +521 -0
- data/docs/UsageStrategy.md +22 -0
- data/docs/UserDetails.md +26 -0
- data/git_push.sh +57 -0
- data/lib/togai_client/api/accounts_api.rb +679 -0
- data/lib/togai_client/api/customers_api.rb +365 -0
- data/lib/togai_client/api/event_ingestion_api.rb +158 -0
- data/lib/togai_client/api/event_management_api.rb +164 -0
- data/lib/togai_client/api/event_schemas_api.rb +579 -0
- data/lib/togai_client/api/metrics_api.rb +86 -0
- data/lib/togai_client/api/price_plans_api.rb +365 -0
- data/lib/togai_client/api/usage_meters_api.rb +572 -0
- data/lib/togai_client/api_client.rb +392 -0
- data/lib/togai_client/api_error.rb +57 -0
- data/lib/togai_client/configuration.rb +287 -0
- data/lib/togai_client/models/account.rb +373 -0
- data/lib/togai_client/models/account_aliases.rb +277 -0
- data/lib/togai_client/models/account_paginated_response.rb +239 -0
- data/lib/togai_client/models/add_account_aliases_request.rb +247 -0
- data/lib/togai_client/models/associate_price_plan_request.rb +274 -0
- data/lib/togai_client/models/associate_price_plan_response.rb +275 -0
- data/lib/togai_client/models/base_success_response.rb +224 -0
- data/lib/togai_client/models/bundle_strategy.rb +325 -0
- data/lib/togai_client/models/bundle_strategy_usage_meters_value.rb +224 -0
- data/lib/togai_client/models/computation.rb +294 -0
- data/lib/togai_client/models/create_account_request.rb +324 -0
- data/lib/togai_client/models/create_customer_request.rb +374 -0
- data/lib/togai_client/models/create_customer_response.rb +373 -0
- data/lib/togai_client/models/create_event_schema_request.rb +351 -0
- data/lib/togai_client/models/create_price_plan_request.rb +298 -0
- data/lib/togai_client/models/create_usage_meter_request.rb +368 -0
- data/lib/togai_client/models/customer.rb +442 -0
- data/lib/togai_client/models/customer_paginated_response.rb +239 -0
- data/lib/togai_client/models/dimensions_schema.rb +256 -0
- data/lib/togai_client/models/error_response.rb +244 -0
- data/lib/togai_client/models/event.rb +379 -0
- data/lib/togai_client/models/event_attribute.rb +304 -0
- data/lib/togai_client/models/event_attribute_schema.rb +281 -0
- data/lib/togai_client/models/event_pipeline_info.rb +260 -0
- data/lib/togai_client/models/event_pipeline_info_account.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_customer.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_event_schema.rb +238 -0
- data/lib/togai_client/models/event_pipeline_info_price_plans_inner.rb +283 -0
- data/lib/togai_client/models/event_pipeline_info_usage_meters_inner.rb +295 -0
- data/lib/togai_client/models/event_schema.rb +438 -0
- data/lib/togai_client/models/event_schema_list_data.rb +456 -0
- data/lib/togai_client/models/event_schema_list_data_all_of.rb +221 -0
- data/lib/togai_client/models/event_schema_list_paginated_response.rb +239 -0
- data/lib/togai_client/models/event_schema_versions_response.rb +227 -0
- data/lib/togai_client/models/event_with_status.rb +239 -0
- data/lib/togai_client/models/event_with_status_and_event_pipeline_info.rb +255 -0
- data/lib/togai_client/models/event_with_status_and_event_pipeline_info_all_of.rb +219 -0
- data/lib/togai_client/models/get_event_response.rb +222 -0
- data/lib/togai_client/models/get_events_response.rb +279 -0
- data/lib/togai_client/models/get_metrics_request.rb +265 -0
- data/lib/togai_client/models/get_metrics_response.rb +227 -0
- data/lib/togai_client/models/ingest_batch_event_request.rb +255 -0
- data/lib/togai_client/models/ingest_batch_event_response.rb +245 -0
- data/lib/togai_client/models/ingest_error.rb +229 -0
- data/lib/togai_client/models/ingest_event_request.rb +220 -0
- data/lib/togai_client/models/ingest_event_response.rb +244 -0
- data/lib/togai_client/models/ingestion_status.rb +284 -0
- data/lib/togai_client/models/metric_data_points.rb +289 -0
- data/lib/togai_client/models/metric_data_points_grouped_by.rb +238 -0
- data/lib/togai_client/models/metric_name.rb +38 -0
- data/lib/togai_client/models/metric_query.rb +331 -0
- data/lib/togai_client/models/metric_query_filter_entry.rb +241 -0
- data/lib/togai_client/models/metric_query_response.rb +255 -0
- data/lib/togai_client/models/pagination_options.rb +262 -0
- data/lib/togai_client/models/plan_override.rb +262 -0
- data/lib/togai_client/models/price_plan.rb +349 -0
- data/lib/togai_client/models/price_plan_list_data.rb +393 -0
- data/lib/togai_client/models/price_plan_paginated_response.rb +239 -0
- data/lib/togai_client/models/pricing_cycle.rb +313 -0
- data/lib/togai_client/models/pricing_cycle_start_offset.rb +241 -0
- data/lib/togai_client/models/pricing_schedule.rb +248 -0
- data/lib/togai_client/models/rate_card.rb +279 -0
- data/lib/togai_client/models/rate_card_bundle.rb +328 -0
- data/lib/togai_client/models/rate_card_usage_value.rb +343 -0
- data/lib/togai_client/models/remove_account_aliases_request.rb +247 -0
- data/lib/togai_client/models/signup_request.rb +293 -0
- data/lib/togai_client/models/signup_response.rb +260 -0
- data/lib/togai_client/models/status_response.rb +246 -0
- data/lib/togai_client/models/status_response_headers.rb +219 -0
- data/lib/togai_client/models/update_account_request.rb +245 -0
- data/lib/togai_client/models/update_customer_request.rb +304 -0
- data/lib/togai_client/models/update_event_schema_request.rb +306 -0
- data/lib/togai_client/models/update_price_plan_request.rb +254 -0
- data/lib/togai_client/models/update_usage_meter_request.rb +323 -0
- data/lib/togai_client/models/usage_meter.rb +440 -0
- data/lib/togai_client/models/usage_meter_paginated_response.rb +239 -0
- data/lib/togai_client/models/usage_strategy.rb +281 -0
- data/lib/togai_client/models/user_details.rb +380 -0
- data/lib/togai_client/version.rb +15 -0
- data/lib/togai_client.rb +125 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- data/togai_client.gemspec +38 -0
- metadata +271 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
# TogaiClient::EventAttribute
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **attribute_name** | **String** | Name of the event attribute | |
|
8
|
+
| **attribute_value** | **String** | Value of the event attribute | |
|
9
|
+
| **attribute_value_unit** | **String** | Unit with which the attribute value was measured. Natively supported units - \"Meters, Miles, Kilometers, Grams, Kilograms, ounces, Pounds, Minutes, Hours, Seconds, Milliseconds, Microseconds, None\". Clients are free to add any other custom units. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'togai_client'
|
15
|
+
|
16
|
+
instance = TogaiClient::EventAttribute.new(
|
17
|
+
attribute_name: apiUsage,
|
18
|
+
attribute_value: null,
|
19
|
+
attribute_value_unit: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TogaiClient::EventAttributeSchema
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the event attribute. | |
|
8
|
+
| **default_unit** | **String** | Unit for the attribute | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'togai_client'
|
14
|
+
|
15
|
+
instance = TogaiClient::EventAttributeSchema.new(
|
16
|
+
name: distance,
|
17
|
+
default_unit: kms
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,146 @@
|
|
1
|
+
# TogaiClient::EventIngestionApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://sandbox-api.togai.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**ingest**](EventIngestionApi.md#ingest) | **POST** /ingest | Ingest events to Togai |
|
8
|
+
| [**ingest_batch**](EventIngestionApi.md#ingest_batch) | **POST** /ingestBatch | Ingest events to Togai in batch |
|
9
|
+
|
10
|
+
|
11
|
+
## ingest
|
12
|
+
|
13
|
+
> ingest(ingest_event_request)
|
14
|
+
|
15
|
+
Ingest events to Togai
|
16
|
+
|
17
|
+
API to ingest your application event to Togai for billing and usage analytics. To know the limits on the ingestion api, check our docs - https://togai.com/docs/limits.
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'togai_client'
|
24
|
+
# setup authorization
|
25
|
+
TogaiClient.configure do |config|
|
26
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
api_instance = TogaiClient::EventIngestionApi.new
|
31
|
+
ingest_event_request = TogaiClient::IngestEventRequest.new # IngestEventRequest | Request body to ingest events to Togai usage and billing management service.
|
32
|
+
|
33
|
+
begin
|
34
|
+
# Ingest events to Togai
|
35
|
+
api_instance.ingest(ingest_event_request)
|
36
|
+
rescue TogaiClient::ApiError => e
|
37
|
+
puts "Error when calling EventIngestionApi->ingest: #{e}"
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
#### Using the ingest_with_http_info variant
|
42
|
+
|
43
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
44
|
+
|
45
|
+
> <Array(nil, Integer, Hash)> ingest_with_http_info(ingest_event_request)
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
begin
|
49
|
+
# Ingest events to Togai
|
50
|
+
data, status_code, headers = api_instance.ingest_with_http_info(ingest_event_request)
|
51
|
+
p status_code # => 2xx
|
52
|
+
p headers # => { ... }
|
53
|
+
p data # => nil
|
54
|
+
rescue TogaiClient::ApiError => e
|
55
|
+
puts "Error when calling EventIngestionApi->ingest_with_http_info: #{e}"
|
56
|
+
end
|
57
|
+
```
|
58
|
+
|
59
|
+
### Parameters
|
60
|
+
|
61
|
+
| Name | Type | Description | Notes |
|
62
|
+
| ---- | ---- | ----------- | ----- |
|
63
|
+
| **ingest_event_request** | [**IngestEventRequest**](IngestEventRequest.md) | Request body to ingest events to Togai usage and billing management service. | |
|
64
|
+
|
65
|
+
### Return type
|
66
|
+
|
67
|
+
nil (empty response body)
|
68
|
+
|
69
|
+
### Authorization
|
70
|
+
|
71
|
+
[bearerAuth](../README.md#bearerAuth)
|
72
|
+
|
73
|
+
### HTTP request headers
|
74
|
+
|
75
|
+
- **Content-Type**: application/json
|
76
|
+
- **Accept**: application/json
|
77
|
+
|
78
|
+
|
79
|
+
## ingest_batch
|
80
|
+
|
81
|
+
> <IngestBatchEventResponse> ingest_batch(ingest_batch_event_request)
|
82
|
+
|
83
|
+
Ingest events to Togai in batch
|
84
|
+
|
85
|
+
API to ingest your application event in batch to Togai for billing and usage analytics. To know the limits on the ingestion api, check our docs - https://togai.com/docs/limits.
|
86
|
+
|
87
|
+
### Examples
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
require 'time'
|
91
|
+
require 'togai_client'
|
92
|
+
# setup authorization
|
93
|
+
TogaiClient.configure do |config|
|
94
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
95
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
96
|
+
end
|
97
|
+
|
98
|
+
api_instance = TogaiClient::EventIngestionApi.new
|
99
|
+
ingest_batch_event_request = TogaiClient::IngestBatchEventRequest.new({events: [TogaiClient::Event.new({event_name: 'event_name_example', id: 'id_example', event_timestamp: Time.now, account_id: 'account_id_example', event_attributes: [TogaiClient::EventAttribute.new({attribute_name: 'apiUsage', attribute_value: 'attribute_value_example'})], dimensions: { key: 'inner_example'}})]}) # IngestBatchEventRequest | Request body to ingest events in batch to Togai usage and billing management service.
|
100
|
+
|
101
|
+
begin
|
102
|
+
# Ingest events to Togai in batch
|
103
|
+
result = api_instance.ingest_batch(ingest_batch_event_request)
|
104
|
+
p result
|
105
|
+
rescue TogaiClient::ApiError => e
|
106
|
+
puts "Error when calling EventIngestionApi->ingest_batch: #{e}"
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
#### Using the ingest_batch_with_http_info variant
|
111
|
+
|
112
|
+
This returns an Array which contains the response data, status code and headers.
|
113
|
+
|
114
|
+
> <Array(<IngestBatchEventResponse>, Integer, Hash)> ingest_batch_with_http_info(ingest_batch_event_request)
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
begin
|
118
|
+
# Ingest events to Togai in batch
|
119
|
+
data, status_code, headers = api_instance.ingest_batch_with_http_info(ingest_batch_event_request)
|
120
|
+
p status_code # => 2xx
|
121
|
+
p headers # => { ... }
|
122
|
+
p data # => <IngestBatchEventResponse>
|
123
|
+
rescue TogaiClient::ApiError => e
|
124
|
+
puts "Error when calling EventIngestionApi->ingest_batch_with_http_info: #{e}"
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
128
|
+
### Parameters
|
129
|
+
|
130
|
+
| Name | Type | Description | Notes |
|
131
|
+
| ---- | ---- | ----------- | ----- |
|
132
|
+
| **ingest_batch_event_request** | [**IngestBatchEventRequest**](IngestBatchEventRequest.md) | Request body to ingest events in batch to Togai usage and billing management service. | |
|
133
|
+
|
134
|
+
### Return type
|
135
|
+
|
136
|
+
[**IngestBatchEventResponse**](IngestBatchEventResponse.md)
|
137
|
+
|
138
|
+
### Authorization
|
139
|
+
|
140
|
+
[bearerAuth](../README.md#bearerAuth)
|
141
|
+
|
142
|
+
### HTTP request headers
|
143
|
+
|
144
|
+
- **Content-Type**: application/json
|
145
|
+
- **Accept**: application/json
|
146
|
+
|
@@ -0,0 +1,159 @@
|
|
1
|
+
# TogaiClient::EventManagementApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://sandbox-api.togai.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_events**](EventManagementApi.md#get_events) | **GET** /events | Get usage events from Togai |
|
8
|
+
| [**get_single_event**](EventManagementApi.md#get_single_event) | **GET** /events/{event_id} | Get the usage event given event id. |
|
9
|
+
|
10
|
+
|
11
|
+
## get_events
|
12
|
+
|
13
|
+
> <GetEventsResponse> get_events(opts)
|
14
|
+
|
15
|
+
Get usage events from Togai
|
16
|
+
|
17
|
+
API to get usage events ingested to Togai.
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'togai_client'
|
24
|
+
# setup authorization
|
25
|
+
TogaiClient.configure do |config|
|
26
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
27
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
28
|
+
end
|
29
|
+
|
30
|
+
api_instance = TogaiClient::EventManagementApi.new
|
31
|
+
opts = {
|
32
|
+
next_token: 'eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ==', # String | Pagination token used as a marker to get records from next page.
|
33
|
+
status: 'PROCESSED', # String | Filter option to filter the events by processed/unprocessed status.
|
34
|
+
account_id: '1234', # String | Filter option to filter the events based on account id.
|
35
|
+
page_size: 10, # Integer | Maximum page size expected by client to return the record list. NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.
|
36
|
+
start_time: 1650110402000, # Integer | Start time filter in epoch milli seconds
|
37
|
+
end_time: 1650110402000 # Integer | End time filter in epoch milli seconds
|
38
|
+
}
|
39
|
+
|
40
|
+
begin
|
41
|
+
# Get usage events from Togai
|
42
|
+
result = api_instance.get_events(opts)
|
43
|
+
p result
|
44
|
+
rescue TogaiClient::ApiError => e
|
45
|
+
puts "Error when calling EventManagementApi->get_events: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Using the get_events_with_http_info variant
|
50
|
+
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
52
|
+
|
53
|
+
> <Array(<GetEventsResponse>, Integer, Hash)> get_events_with_http_info(opts)
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
begin
|
57
|
+
# Get usage events from Togai
|
58
|
+
data, status_code, headers = api_instance.get_events_with_http_info(opts)
|
59
|
+
p status_code # => 2xx
|
60
|
+
p headers # => { ... }
|
61
|
+
p data # => <GetEventsResponse>
|
62
|
+
rescue TogaiClient::ApiError => e
|
63
|
+
puts "Error when calling EventManagementApi->get_events_with_http_info: #{e}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
| Name | Type | Description | Notes |
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
71
|
+
| **next_token** | **String** | Pagination token used as a marker to get records from next page. | [optional] |
|
72
|
+
| **status** | **String** | Filter option to filter the events by processed/unprocessed status. | [optional] |
|
73
|
+
| **account_id** | **String** | Filter option to filter the events based on account id. | [optional] |
|
74
|
+
| **page_size** | **Integer** | Maximum page size expected by client to return the record list. NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided. | [optional] |
|
75
|
+
| **start_time** | **Integer** | Start time filter in epoch milli seconds | [optional] |
|
76
|
+
| **end_time** | **Integer** | End time filter in epoch milli seconds | [optional] |
|
77
|
+
|
78
|
+
### Return type
|
79
|
+
|
80
|
+
[**GetEventsResponse**](GetEventsResponse.md)
|
81
|
+
|
82
|
+
### Authorization
|
83
|
+
|
84
|
+
[bearerAuth](../README.md#bearerAuth)
|
85
|
+
|
86
|
+
### HTTP request headers
|
87
|
+
|
88
|
+
- **Content-Type**: Not defined
|
89
|
+
- **Accept**: application/json
|
90
|
+
|
91
|
+
|
92
|
+
## get_single_event
|
93
|
+
|
94
|
+
> <GetEventResponse> get_single_event(event_id)
|
95
|
+
|
96
|
+
Get the usage event given event id.
|
97
|
+
|
98
|
+
API to get the event given the event id.
|
99
|
+
|
100
|
+
### Examples
|
101
|
+
|
102
|
+
```ruby
|
103
|
+
require 'time'
|
104
|
+
require 'togai_client'
|
105
|
+
# setup authorization
|
106
|
+
TogaiClient.configure do |config|
|
107
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
108
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
109
|
+
end
|
110
|
+
|
111
|
+
api_instance = TogaiClient::EventManagementApi.new
|
112
|
+
event_id = 'event_id_example' # String |
|
113
|
+
|
114
|
+
begin
|
115
|
+
# Get the usage event given event id.
|
116
|
+
result = api_instance.get_single_event(event_id)
|
117
|
+
p result
|
118
|
+
rescue TogaiClient::ApiError => e
|
119
|
+
puts "Error when calling EventManagementApi->get_single_event: #{e}"
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
#### Using the get_single_event_with_http_info variant
|
124
|
+
|
125
|
+
This returns an Array which contains the response data, status code and headers.
|
126
|
+
|
127
|
+
> <Array(<GetEventResponse>, Integer, Hash)> get_single_event_with_http_info(event_id)
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
begin
|
131
|
+
# Get the usage event given event id.
|
132
|
+
data, status_code, headers = api_instance.get_single_event_with_http_info(event_id)
|
133
|
+
p status_code # => 2xx
|
134
|
+
p headers # => { ... }
|
135
|
+
p data # => <GetEventResponse>
|
136
|
+
rescue TogaiClient::ApiError => e
|
137
|
+
puts "Error when calling EventManagementApi->get_single_event_with_http_info: #{e}"
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
### Parameters
|
142
|
+
|
143
|
+
| Name | Type | Description | Notes |
|
144
|
+
| ---- | ---- | ----------- | ----- |
|
145
|
+
| **event_id** | **String** | | |
|
146
|
+
|
147
|
+
### Return type
|
148
|
+
|
149
|
+
[**GetEventResponse**](GetEventResponse.md)
|
150
|
+
|
151
|
+
### Authorization
|
152
|
+
|
153
|
+
[bearerAuth](../README.md#bearerAuth)
|
154
|
+
|
155
|
+
### HTTP request headers
|
156
|
+
|
157
|
+
- **Content-Type**: Not defined
|
158
|
+
- **Accept**: application/json
|
159
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **event_schema** | [**EventPipelineInfoEventSchema**](EventPipelineInfoEventSchema.md) | | [optional] |
|
8
|
+
| **usage_meters** | [**Array<EventPipelineInfoUsageMetersInner>**](EventPipelineInfoUsageMetersInner.md) | | [optional] |
|
9
|
+
| **price_plans** | [**Array<EventPipelineInfoPricePlansInner>**](EventPipelineInfoPricePlansInner.md) | | [optional] |
|
10
|
+
| **account** | [**EventPipelineInfoAccount**](EventPipelineInfoAccount.md) | | [optional] |
|
11
|
+
| **customer** | [**EventPipelineInfoCustomer**](EventPipelineInfoCustomer.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'togai_client'
|
17
|
+
|
18
|
+
instance = TogaiClient::EventPipelineInfo.new(
|
19
|
+
event_schema: null,
|
20
|
+
usage_meters: null,
|
21
|
+
price_plans: null,
|
22
|
+
account: null,
|
23
|
+
customer: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfoAccount
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **name** | **String** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'togai_client'
|
14
|
+
|
15
|
+
instance = TogaiClient::EventPipelineInfoAccount.new(
|
16
|
+
id: null,
|
17
|
+
name: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfoCustomer
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **name** | **String** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'togai_client'
|
14
|
+
|
15
|
+
instance = TogaiClient::EventPipelineInfoCustomer.new(
|
16
|
+
id: null,
|
17
|
+
name: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfoEventSchema
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **version** | **Integer** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'togai_client'
|
14
|
+
|
15
|
+
instance = TogaiClient::EventPipelineInfoEventSchema.new(
|
16
|
+
name: null,
|
17
|
+
version: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfoPricePlansInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **id** | **String** | | |
|
9
|
+
| **cycle_start** | **Date** | | |
|
10
|
+
| **cycle_end** | **Date** | | |
|
11
|
+
| **usage_meters** | **Array<String>** | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'togai_client'
|
17
|
+
|
18
|
+
instance = TogaiClient::EventPipelineInfoPricePlansInner.new(
|
19
|
+
name: null,
|
20
|
+
id: null,
|
21
|
+
cycle_start: null,
|
22
|
+
cycle_end: null,
|
23
|
+
usage_meters: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# TogaiClient::EventPipelineInfoUsageMetersInner
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **version** | **Integer** | | |
|
9
|
+
| **status** | **String** | | |
|
10
|
+
| **units** | **Float** | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'togai_client'
|
16
|
+
|
17
|
+
instance = TogaiClient::EventPipelineInfoUsageMetersInner.new(
|
18
|
+
name: null,
|
19
|
+
version: null,
|
20
|
+
status: null,
|
21
|
+
units: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
data/docs/EventSchema.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# TogaiClient::EventSchema
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the event. Must be unique for an organization. | |
|
8
|
+
| **description** | **String** | Description of the event | [optional] |
|
9
|
+
| **version** | **Integer** | Version of event schema | |
|
10
|
+
| **status** | **String** | Status of event schema * DRAFT - Schema is in draft state * ACTIVE - Schema is currently active * INACTIVE - Schema is currently inactive * ARCHIVED - Older version of event schema | [optional] |
|
11
|
+
| **attributes** | [**Array<EventAttributeSchema>**](EventAttributeSchema.md) | | |
|
12
|
+
| **dimensions** | [**Array<DimensionsSchema>**](DimensionsSchema.md) | | [optional] |
|
13
|
+
| **created_at** | **Time** | | [optional] |
|
14
|
+
| **updated_at** | **Time** | | [optional] |
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'togai_client'
|
20
|
+
|
21
|
+
instance = TogaiClient::EventSchema.new(
|
22
|
+
name: null,
|
23
|
+
description: null,
|
24
|
+
version: 1,
|
25
|
+
status: DRAFT,
|
26
|
+
attributes: null,
|
27
|
+
dimensions: null,
|
28
|
+
created_at: null,
|
29
|
+
updated_at: null
|
30
|
+
)
|
31
|
+
```
|
32
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# TogaiClient::EventSchemaListData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the event. Must be unique for an organization. | |
|
8
|
+
| **description** | **String** | Description of the event | [optional] |
|
9
|
+
| **version** | **Integer** | Version of event schema | |
|
10
|
+
| **status** | **String** | Status of event schema * DRAFT - Schema is in draft state * ACTIVE - Schema is currently active * INACTIVE - Schema is currently inactive * ARCHIVED - Older version of event schema | [optional] |
|
11
|
+
| **attributes** | [**Array<EventAttributeSchema>**](EventAttributeSchema.md) | | |
|
12
|
+
| **dimensions** | [**Array<DimensionsSchema>**](DimensionsSchema.md) | | [optional] |
|
13
|
+
| **created_at** | **Time** | | [optional] |
|
14
|
+
| **updated_at** | **Time** | | [optional] |
|
15
|
+
| **associated_usage_meters** | **Array<String>** | | [optional] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'togai_client'
|
21
|
+
|
22
|
+
instance = TogaiClient::EventSchemaListData.new(
|
23
|
+
name: null,
|
24
|
+
description: null,
|
25
|
+
version: 1,
|
26
|
+
status: DRAFT,
|
27
|
+
attributes: null,
|
28
|
+
dimensions: null,
|
29
|
+
created_at: null,
|
30
|
+
updated_at: null,
|
31
|
+
associated_usage_meters: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TogaiClient::EventSchemaListDataAllOf
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **associated_usage_meters** | **Array<String>** | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'togai_client'
|
13
|
+
|
14
|
+
instance = TogaiClient::EventSchemaListDataAllOf.new(
|
15
|
+
associated_usage_meters: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TogaiClient::EventSchemaListPaginatedResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data** | [**Array<EventSchemaListData>**](EventSchemaListData.md) | | [optional] |
|
8
|
+
| **next_token** | **String** | | [optional] |
|
9
|
+
| **context** | [**PaginationOptions**](PaginationOptions.md) | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'togai_client'
|
15
|
+
|
16
|
+
instance = TogaiClient::EventSchemaListPaginatedResponse.new(
|
17
|
+
data: null,
|
18
|
+
next_token: null,
|
19
|
+
context: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TogaiClient::EventSchemaVersionsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data** | [**Array<EventSchema>**](EventSchema.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'togai_client'
|
13
|
+
|
14
|
+
instance = TogaiClient::EventSchemaVersionsResponse.new(
|
15
|
+
data: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|