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,18 @@
|
|
1
|
+
# TogaiClient::BundleStrategyUsageMetersValue
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **start_after** | **Float** | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'togai_client'
|
13
|
+
|
14
|
+
instance = TogaiClient::BundleStrategyUsageMetersValue.new(
|
15
|
+
start_after: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/Computation.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# TogaiClient::Computation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Optional identifier describing the matcher and computation pair | [optional] |
|
8
|
+
| **matcher** | **String** | Condition to be applied on event. Upon matching it the corresponding computation will be considered for usage_meter unit calculation. The result of the matcher needs to be truthy (https://jsonlogic.com/truthy.html) in order to be considered as a match. | [optional] |
|
9
|
+
| **computation** | **String** | Computation to be applied on an event if it matches the matcher In case of a COUNT aggregation type, computation should be passed as '1' | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'togai_client'
|
15
|
+
|
16
|
+
instance = TogaiClient::Computation.new(
|
17
|
+
id: null,
|
18
|
+
matcher: {
|
19
|
+
"and": [
|
20
|
+
{"in": [{"var": "dimension.city"}, "chennai", "mumbai"]},
|
21
|
+
"or": [
|
22
|
+
{">": [{"var": "attribute.distance"}, 100]},
|
23
|
+
{"<": [{"var": "attribute.distance"}, 20]}
|
24
|
+
]
|
25
|
+
]
|
26
|
+
}
|
27
|
+
,
|
28
|
+
computation: {"*":[{"var":"attributes.distance"},0.4]}
|
29
|
+
)
|
30
|
+
```
|
31
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TogaiClient::CreateAccountRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Identifier of the account | |
|
8
|
+
| **name** | **String** | Name of the customer | |
|
9
|
+
| **aliases** | **Array<String>** | list of aliases for the account. Can be used interchangeably with 'id' for event ingestion. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'togai_client'
|
15
|
+
|
16
|
+
instance = TogaiClient::CreateAccountRequest.new(
|
17
|
+
id: null,
|
18
|
+
name: null,
|
19
|
+
aliases: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# TogaiClient::CreateCustomerRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Customer identifier | |
|
8
|
+
| **name** | **String** | Name of the customer | |
|
9
|
+
| **primary_email** | **String** | Primary email of the customer | |
|
10
|
+
| **billing_address** | **String** | billing address of the customer | |
|
11
|
+
| **account** | [**CreateAccountRequest**](CreateAccountRequest.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'togai_client'
|
17
|
+
|
18
|
+
instance = TogaiClient::CreateCustomerRequest.new(
|
19
|
+
id: null,
|
20
|
+
name: null,
|
21
|
+
primary_email: null,
|
22
|
+
billing_address: null,
|
23
|
+
account: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# TogaiClient::CreateCustomerResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Identifier of customer | |
|
8
|
+
| **name** | **String** | Name of the customer | |
|
9
|
+
| **primary_email** | **String** | Primary email of the customer | |
|
10
|
+
| **billing_address** | **String** | billing address of the customer | |
|
11
|
+
| **account** | [**Account**](Account.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'togai_client'
|
17
|
+
|
18
|
+
instance = TogaiClient::CreateCustomerResponse.new(
|
19
|
+
id: null,
|
20
|
+
name: null,
|
21
|
+
primary_email: null,
|
22
|
+
billing_address: null,
|
23
|
+
account: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# TogaiClient::CreateEventSchemaRequest
|
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
|
+
| **attributes** | [**Array<EventAttributeSchema>**](EventAttributeSchema.md) | | |
|
10
|
+
| **dimensions** | [**Array<DimensionsSchema>**](DimensionsSchema.md) | | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'togai_client'
|
16
|
+
|
17
|
+
instance = TogaiClient::CreateEventSchemaRequest.new(
|
18
|
+
name: null,
|
19
|
+
description: null,
|
20
|
+
attributes: null,
|
21
|
+
dimensions: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# TogaiClient::CreatePricePlanRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the price plan | |
|
8
|
+
| **description** | **String** | Description of price plan | [optional] |
|
9
|
+
| **pricing_cycle** | [**PricingCycle**](PricingCycle.md) | | |
|
10
|
+
| **rate_card** | [**RateCard**](RateCard.md) | | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'togai_client'
|
16
|
+
|
17
|
+
instance = TogaiClient::CreatePricePlanRequest.new(
|
18
|
+
name: null,
|
19
|
+
description: null,
|
20
|
+
pricing_cycle: null,
|
21
|
+
rate_card: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# TogaiClient::CreateUsageMeterRequest
|
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
|
+
| **type** | **String** | Type of usage meter | |
|
10
|
+
| **aggregation** | **String** | Aggregation to be applied on usage meter result | |
|
11
|
+
| **computations** | [**Array<Computation>**](Computation.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'togai_client'
|
17
|
+
|
18
|
+
instance = TogaiClient::CreateUsageMeterRequest.new(
|
19
|
+
name: null,
|
20
|
+
description: null,
|
21
|
+
type: COUNTER,
|
22
|
+
aggregation: DRAFT,
|
23
|
+
computations: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/Customer.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# TogaiClient::Customer
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Identifier of customer | |
|
8
|
+
| **name** | **String** | Name of the customer | |
|
9
|
+
| **primary_email** | **String** | Primary email of the customer | |
|
10
|
+
| **billing_address** | **String** | billing address of the customer | |
|
11
|
+
| **status** | **String** | Status of the customer | |
|
12
|
+
| **created_at** | **Time** | | |
|
13
|
+
| **updated_at** | **Time** | | |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'togai_client'
|
19
|
+
|
20
|
+
instance = TogaiClient::Customer.new(
|
21
|
+
id: null,
|
22
|
+
name: null,
|
23
|
+
primary_email: null,
|
24
|
+
billing_address: null,
|
25
|
+
status: ACTIVE,
|
26
|
+
created_at: null,
|
27
|
+
updated_at: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TogaiClient::CustomerPaginatedResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data** | [**Array<Customer>**](Customer.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::CustomerPaginatedResponse.new(
|
17
|
+
data: null,
|
18
|
+
next_token: null,
|
19
|
+
context: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,363 @@
|
|
1
|
+
# TogaiClient::CustomersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://sandbox-api.togai.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_customer**](CustomersApi.md#create_customer) | **POST** /customers | Create a customer |
|
8
|
+
| [**delete_customer**](CustomersApi.md#delete_customer) | **DELETE** /customers/{customer_id} | Delete a customer |
|
9
|
+
| [**get_customer**](CustomersApi.md#get_customer) | **GET** /customers/{customer_id} | Get a customer |
|
10
|
+
| [**get_customers**](CustomersApi.md#get_customers) | **GET** /customers | List customers |
|
11
|
+
| [**update_customer**](CustomersApi.md#update_customer) | **PATCH** /customers/{customer_id} | Update a customer |
|
12
|
+
|
13
|
+
|
14
|
+
## create_customer
|
15
|
+
|
16
|
+
> <CreateCustomerResponse> create_customer(create_customer_request)
|
17
|
+
|
18
|
+
Create a customer
|
19
|
+
|
20
|
+
Create a customer and a default account corresponding to it
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'togai_client'
|
27
|
+
# setup authorization
|
28
|
+
TogaiClient.configure do |config|
|
29
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
30
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = TogaiClient::CustomersApi.new
|
34
|
+
create_customer_request = TogaiClient::CreateCustomerRequest.new({id: 'id_example', name: 'name_example', primary_email: 'primary_email_example', billing_address: 'billing_address_example'}) # CreateCustomerRequest | Payload to create customer
|
35
|
+
|
36
|
+
begin
|
37
|
+
# Create a customer
|
38
|
+
result = api_instance.create_customer(create_customer_request)
|
39
|
+
p result
|
40
|
+
rescue TogaiClient::ApiError => e
|
41
|
+
puts "Error when calling CustomersApi->create_customer: #{e}"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
#### Using the create_customer_with_http_info variant
|
46
|
+
|
47
|
+
This returns an Array which contains the response data, status code and headers.
|
48
|
+
|
49
|
+
> <Array(<CreateCustomerResponse>, Integer, Hash)> create_customer_with_http_info(create_customer_request)
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
begin
|
53
|
+
# Create a customer
|
54
|
+
data, status_code, headers = api_instance.create_customer_with_http_info(create_customer_request)
|
55
|
+
p status_code # => 2xx
|
56
|
+
p headers # => { ... }
|
57
|
+
p data # => <CreateCustomerResponse>
|
58
|
+
rescue TogaiClient::ApiError => e
|
59
|
+
puts "Error when calling CustomersApi->create_customer_with_http_info: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
### Parameters
|
64
|
+
|
65
|
+
| Name | Type | Description | Notes |
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
67
|
+
| **create_customer_request** | [**CreateCustomerRequest**](CreateCustomerRequest.md) | Payload to create customer | |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
[**CreateCustomerResponse**](CreateCustomerResponse.md)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[bearerAuth](../README.md#bearerAuth)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: application/json
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## delete_customer
|
84
|
+
|
85
|
+
> <BaseSuccessResponse> delete_customer(customer_id)
|
86
|
+
|
87
|
+
Delete a customer
|
88
|
+
|
89
|
+
Delete a customer by id
|
90
|
+
|
91
|
+
### Examples
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
require 'time'
|
95
|
+
require 'togai_client'
|
96
|
+
# setup authorization
|
97
|
+
TogaiClient.configure do |config|
|
98
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
99
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
100
|
+
end
|
101
|
+
|
102
|
+
api_instance = TogaiClient::CustomersApi.new
|
103
|
+
customer_id = 'customer_id_example' # String |
|
104
|
+
|
105
|
+
begin
|
106
|
+
# Delete a customer
|
107
|
+
result = api_instance.delete_customer(customer_id)
|
108
|
+
p result
|
109
|
+
rescue TogaiClient::ApiError => e
|
110
|
+
puts "Error when calling CustomersApi->delete_customer: #{e}"
|
111
|
+
end
|
112
|
+
```
|
113
|
+
|
114
|
+
#### Using the delete_customer_with_http_info variant
|
115
|
+
|
116
|
+
This returns an Array which contains the response data, status code and headers.
|
117
|
+
|
118
|
+
> <Array(<BaseSuccessResponse>, Integer, Hash)> delete_customer_with_http_info(customer_id)
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
begin
|
122
|
+
# Delete a customer
|
123
|
+
data, status_code, headers = api_instance.delete_customer_with_http_info(customer_id)
|
124
|
+
p status_code # => 2xx
|
125
|
+
p headers # => { ... }
|
126
|
+
p data # => <BaseSuccessResponse>
|
127
|
+
rescue TogaiClient::ApiError => e
|
128
|
+
puts "Error when calling CustomersApi->delete_customer_with_http_info: #{e}"
|
129
|
+
end
|
130
|
+
```
|
131
|
+
|
132
|
+
### Parameters
|
133
|
+
|
134
|
+
| Name | Type | Description | Notes |
|
135
|
+
| ---- | ---- | ----------- | ----- |
|
136
|
+
| **customer_id** | **String** | | |
|
137
|
+
|
138
|
+
### Return type
|
139
|
+
|
140
|
+
[**BaseSuccessResponse**](BaseSuccessResponse.md)
|
141
|
+
|
142
|
+
### Authorization
|
143
|
+
|
144
|
+
[bearerAuth](../README.md#bearerAuth)
|
145
|
+
|
146
|
+
### HTTP request headers
|
147
|
+
|
148
|
+
- **Content-Type**: Not defined
|
149
|
+
- **Accept**: application/json
|
150
|
+
|
151
|
+
|
152
|
+
## get_customer
|
153
|
+
|
154
|
+
> <Customer> get_customer(customer_id)
|
155
|
+
|
156
|
+
Get a customer
|
157
|
+
|
158
|
+
Get a customer by id
|
159
|
+
|
160
|
+
### Examples
|
161
|
+
|
162
|
+
```ruby
|
163
|
+
require 'time'
|
164
|
+
require 'togai_client'
|
165
|
+
# setup authorization
|
166
|
+
TogaiClient.configure do |config|
|
167
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
168
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
169
|
+
end
|
170
|
+
|
171
|
+
api_instance = TogaiClient::CustomersApi.new
|
172
|
+
customer_id = 'customer_id_example' # String |
|
173
|
+
|
174
|
+
begin
|
175
|
+
# Get a customer
|
176
|
+
result = api_instance.get_customer(customer_id)
|
177
|
+
p result
|
178
|
+
rescue TogaiClient::ApiError => e
|
179
|
+
puts "Error when calling CustomersApi->get_customer: #{e}"
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
#### Using the get_customer_with_http_info variant
|
184
|
+
|
185
|
+
This returns an Array which contains the response data, status code and headers.
|
186
|
+
|
187
|
+
> <Array(<Customer>, Integer, Hash)> get_customer_with_http_info(customer_id)
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
begin
|
191
|
+
# Get a customer
|
192
|
+
data, status_code, headers = api_instance.get_customer_with_http_info(customer_id)
|
193
|
+
p status_code # => 2xx
|
194
|
+
p headers # => { ... }
|
195
|
+
p data # => <Customer>
|
196
|
+
rescue TogaiClient::ApiError => e
|
197
|
+
puts "Error when calling CustomersApi->get_customer_with_http_info: #{e}"
|
198
|
+
end
|
199
|
+
```
|
200
|
+
|
201
|
+
### Parameters
|
202
|
+
|
203
|
+
| Name | Type | Description | Notes |
|
204
|
+
| ---- | ---- | ----------- | ----- |
|
205
|
+
| **customer_id** | **String** | | |
|
206
|
+
|
207
|
+
### Return type
|
208
|
+
|
209
|
+
[**Customer**](Customer.md)
|
210
|
+
|
211
|
+
### Authorization
|
212
|
+
|
213
|
+
[bearerAuth](../README.md#bearerAuth)
|
214
|
+
|
215
|
+
### HTTP request headers
|
216
|
+
|
217
|
+
- **Content-Type**: Not defined
|
218
|
+
- **Accept**: application/json
|
219
|
+
|
220
|
+
|
221
|
+
## get_customers
|
222
|
+
|
223
|
+
> <CustomerPaginatedResponse> get_customers(opts)
|
224
|
+
|
225
|
+
List customers
|
226
|
+
|
227
|
+
List customers with pagination and sort
|
228
|
+
|
229
|
+
### Examples
|
230
|
+
|
231
|
+
```ruby
|
232
|
+
require 'time'
|
233
|
+
require 'togai_client'
|
234
|
+
# setup authorization
|
235
|
+
TogaiClient.configure do |config|
|
236
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
237
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
238
|
+
end
|
239
|
+
|
240
|
+
api_instance = TogaiClient::CustomersApi.new
|
241
|
+
opts = {
|
242
|
+
next_token: 'eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ==', # String |
|
243
|
+
page_size: '10' # String |
|
244
|
+
}
|
245
|
+
|
246
|
+
begin
|
247
|
+
# List customers
|
248
|
+
result = api_instance.get_customers(opts)
|
249
|
+
p result
|
250
|
+
rescue TogaiClient::ApiError => e
|
251
|
+
puts "Error when calling CustomersApi->get_customers: #{e}"
|
252
|
+
end
|
253
|
+
```
|
254
|
+
|
255
|
+
#### Using the get_customers_with_http_info variant
|
256
|
+
|
257
|
+
This returns an Array which contains the response data, status code and headers.
|
258
|
+
|
259
|
+
> <Array(<CustomerPaginatedResponse>, Integer, Hash)> get_customers_with_http_info(opts)
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
begin
|
263
|
+
# List customers
|
264
|
+
data, status_code, headers = api_instance.get_customers_with_http_info(opts)
|
265
|
+
p status_code # => 2xx
|
266
|
+
p headers # => { ... }
|
267
|
+
p data # => <CustomerPaginatedResponse>
|
268
|
+
rescue TogaiClient::ApiError => e
|
269
|
+
puts "Error when calling CustomersApi->get_customers_with_http_info: #{e}"
|
270
|
+
end
|
271
|
+
```
|
272
|
+
|
273
|
+
### Parameters
|
274
|
+
|
275
|
+
| Name | Type | Description | Notes |
|
276
|
+
| ---- | ---- | ----------- | ----- |
|
277
|
+
| **next_token** | **String** | | [optional] |
|
278
|
+
| **page_size** | **String** | | [optional] |
|
279
|
+
|
280
|
+
### Return type
|
281
|
+
|
282
|
+
[**CustomerPaginatedResponse**](CustomerPaginatedResponse.md)
|
283
|
+
|
284
|
+
### Authorization
|
285
|
+
|
286
|
+
[bearerAuth](../README.md#bearerAuth)
|
287
|
+
|
288
|
+
### HTTP request headers
|
289
|
+
|
290
|
+
- **Content-Type**: Not defined
|
291
|
+
- **Accept**: application/json
|
292
|
+
|
293
|
+
|
294
|
+
## update_customer
|
295
|
+
|
296
|
+
> <Customer> update_customer(customer_id, update_customer_request)
|
297
|
+
|
298
|
+
Update a customer
|
299
|
+
|
300
|
+
Update a customer by id
|
301
|
+
|
302
|
+
### Examples
|
303
|
+
|
304
|
+
```ruby
|
305
|
+
require 'time'
|
306
|
+
require 'togai_client'
|
307
|
+
# setup authorization
|
308
|
+
TogaiClient.configure do |config|
|
309
|
+
# Configure Bearer authorization (Bearer <credential>): bearerAuth
|
310
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
311
|
+
end
|
312
|
+
|
313
|
+
api_instance = TogaiClient::CustomersApi.new
|
314
|
+
customer_id = 'customer_id_example' # String |
|
315
|
+
update_customer_request = TogaiClient::UpdateCustomerRequest.new # UpdateCustomerRequest | Payload to update customer
|
316
|
+
|
317
|
+
begin
|
318
|
+
# Update a customer
|
319
|
+
result = api_instance.update_customer(customer_id, update_customer_request)
|
320
|
+
p result
|
321
|
+
rescue TogaiClient::ApiError => e
|
322
|
+
puts "Error when calling CustomersApi->update_customer: #{e}"
|
323
|
+
end
|
324
|
+
```
|
325
|
+
|
326
|
+
#### Using the update_customer_with_http_info variant
|
327
|
+
|
328
|
+
This returns an Array which contains the response data, status code and headers.
|
329
|
+
|
330
|
+
> <Array(<Customer>, Integer, Hash)> update_customer_with_http_info(customer_id, update_customer_request)
|
331
|
+
|
332
|
+
```ruby
|
333
|
+
begin
|
334
|
+
# Update a customer
|
335
|
+
data, status_code, headers = api_instance.update_customer_with_http_info(customer_id, update_customer_request)
|
336
|
+
p status_code # => 2xx
|
337
|
+
p headers # => { ... }
|
338
|
+
p data # => <Customer>
|
339
|
+
rescue TogaiClient::ApiError => e
|
340
|
+
puts "Error when calling CustomersApi->update_customer_with_http_info: #{e}"
|
341
|
+
end
|
342
|
+
```
|
343
|
+
|
344
|
+
### Parameters
|
345
|
+
|
346
|
+
| Name | Type | Description | Notes |
|
347
|
+
| ---- | ---- | ----------- | ----- |
|
348
|
+
| **customer_id** | **String** | | |
|
349
|
+
| **update_customer_request** | [**UpdateCustomerRequest**](UpdateCustomerRequest.md) | Payload to update customer | |
|
350
|
+
|
351
|
+
### Return type
|
352
|
+
|
353
|
+
[**Customer**](Customer.md)
|
354
|
+
|
355
|
+
### Authorization
|
356
|
+
|
357
|
+
[bearerAuth](../README.md#bearerAuth)
|
358
|
+
|
359
|
+
### HTTP request headers
|
360
|
+
|
361
|
+
- **Content-Type**: application/json
|
362
|
+
- **Accept**: application/json
|
363
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TogaiClient::DimensionsSchema
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Name of the event dimension | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'togai_client'
|
13
|
+
|
14
|
+
instance = TogaiClient::DimensionsSchema.new(
|
15
|
+
name: city
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TogaiClient::ErrorResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **message** | **String** | error description | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'togai_client'
|
13
|
+
|
14
|
+
instance = TogaiClient::ErrorResponse.new(
|
15
|
+
message: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/Event.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# TogaiClient::Event
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **event_name** | **String** | Name of the event to be recorded. | |
|
8
|
+
| **id** | **String** | A unique value to identify the event instance. This unique value should be generated by the client and it acts as the **idempotency key**. Togai server will use this key to recognize subsequent retries of the same request and avoid metering multiple times for that same request. This id can be created in any format but we recommend using UUIDv4 to reduce collision occurance. NOTE1: Expiry time for idempotency validation will be until the end of the billing cycle. Any request which comes after the billing cycle with the same id will be treated as new request and ingested for metering. NOTE2: If the billing cycle is not configured for the idempotency validation will be until **10 days** of the event ingestion. | |
|
9
|
+
| **event_timestamp** | **Time** | Source time stamp of the event. This timestamp must be in ISO 8601 format. | |
|
10
|
+
| **account_id** | **String** | | |
|
11
|
+
| **event_attributes** | [**Array<EventAttribute>**](EventAttribute.md) | | |
|
12
|
+
| **dimensions** | **Hash<String, String>** | Dimensions are tags/labels associated with the events. This dimensions can be used to configure billing, for queries, analytics and reports. | |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'togai_client'
|
18
|
+
|
19
|
+
instance = TogaiClient::Event.new(
|
20
|
+
event_name: null,
|
21
|
+
id: null,
|
22
|
+
event_timestamp: null,
|
23
|
+
account_id: null,
|
24
|
+
event_attributes: null,
|
25
|
+
dimensions: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|