klaviyo_sdk 1.0.3.20220329 → 1.0.5.20220329
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +25 -3
- data/klaviyo_sdk.gemspec +1 -1
- data/lib/klaviyo_sdk/api/data_privacy_api.rb +2 -2
- data/lib/klaviyo_sdk/api/profiles_api.rb +66 -0
- data/lib/klaviyo_sdk/api_client.rb +1 -1
- data/lib/klaviyo_sdk/models/campaign.rb +198 -18
- data/lib/klaviyo_sdk/models/campaign_lists.rb +318 -0
- data/lib/klaviyo_sdk/models/campaigns.rb +487 -0
- data/lib/klaviyo_sdk/models/inline_object5.rb +0 -1
- data/lib/klaviyo_sdk/models/inline_response200.rb +218 -0
- data/lib/klaviyo_sdk.rb +0 -29
- data/test.rb +9 -0
- metadata +7 -76
- data/docs/Campaign.md +0 -38
- data/docs/CampaignsApi.md +0 -707
- data/docs/CheckMembershipRequest.md +0 -22
- data/docs/DataPrivacyApi.md +0 -81
- data/docs/DeleteEmail.md +0 -18
- data/docs/DeletePerson.md +0 -18
- data/docs/DeletePhone.md +0 -18
- data/docs/DeprecatedGetListResponse.md +0 -30
- data/docs/DeprecatedGetListResponseData.md +0 -28
- data/docs/GlobalExclusionResponseData.md +0 -30
- data/docs/IdentifyPayload.md +0 -20
- data/docs/IdentifyPayloadProperties.md +0 -42
- data/docs/InlineObject.md +0 -18
- data/docs/InlineObject3.md +0 -18
- data/docs/InlineObject4.md +0 -18
- data/docs/InlineObject5.md +0 -22
- data/docs/ListsSegmentsApi.md +0 -1198
- data/docs/Metric.md +0 -28
- data/docs/MetricExport.md +0 -32
- data/docs/MetricTimeline.md +0 -24
- data/docs/MetricTimelineData.md +0 -34
- data/docs/MetricsApi.md +0 -329
- data/docs/Person.md +0 -56
- data/docs/PrivacyEmail.md +0 -18
- data/docs/PrivacyId.md +0 -18
- data/docs/PrivacyPhone.md +0 -18
- data/docs/ProfilesApi.md +0 -391
- data/docs/RenderedTemplate.md +0 -24
- data/docs/Template.md +0 -30
- data/docs/TemplatesApi.md +0 -541
- data/docs/TrackIdentifyApi.md +0 -267
- data/docs/TrackPayload.md +0 -24
- data/docs/TrackPayloadCustomerProperties.md +0 -20
- data/docs/TrackPayloadProperties.md +0 -22
- data/git_push.sh +0 -57
- data/klaviyo_sdk-1.0.3.2022.03.29.gem +0 -0
- data/spec/api/campaigns_api_spec.rb +0 -165
- data/spec/api/data_privacy_api_spec.rb +0 -47
- data/spec/api/lists_segments_api_spec.rb +0 -239
- data/spec/api/metrics_api_spec.rb +0 -96
- data/spec/api/profiles_api_spec.rb +0 -103
- data/spec/api/templates_api_spec.rb +0 -130
- data/spec/api/track_identify_api_spec.rb +0 -83
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/campaign_spec.rb +0 -94
- data/spec/models/check_membership_request_spec.rb +0 -46
- data/spec/models/delete_email_spec.rb +0 -34
- data/spec/models/delete_person_spec.rb +0 -34
- data/spec/models/delete_phone_spec.rb +0 -34
- data/spec/models/deprecated_get_list_response_data_spec.rb +0 -64
- data/spec/models/deprecated_get_list_response_spec.rb +0 -70
- data/spec/models/global_exclusion_response_data_spec.rb +0 -70
- data/spec/models/identify_payload_properties_spec.rb +0 -106
- data/spec/models/identify_payload_spec.rb +0 -40
- data/spec/models/inline_object3_spec.rb +0 -34
- data/spec/models/inline_object4_spec.rb +0 -34
- data/spec/models/inline_object5_spec.rb +0 -46
- data/spec/models/inline_object_spec.rb +0 -34
- data/spec/models/metric_export_spec.rb +0 -76
- data/spec/models/metric_spec.rb +0 -64
- data/spec/models/metric_timeline_data_spec.rb +0 -82
- data/spec/models/metric_timeline_spec.rb +0 -52
- data/spec/models/person_spec.rb +0 -148
- data/spec/models/privacy_email_spec.rb +0 -34
- data/spec/models/privacy_id_spec.rb +0 -34
- data/spec/models/privacy_phone_spec.rb +0 -34
- data/spec/models/rendered_template_spec.rb +0 -52
- data/spec/models/template_spec.rb +0 -70
- data/spec/models/track_payload_customer_properties_spec.rb +0 -40
- data/spec/models/track_payload_properties_spec.rb +0 -46
- data/spec/models/track_payload_spec.rb +0 -52
- data/spec/spec_helper.rb +0 -111
data/docs/Metric.md
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Klaviyo::Metric
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **id** | **String** | | [optional] |
|
9
|
-
| **name** | **String** | | [optional] |
|
10
|
-
| **integration** | **Hash<String, Object>** | | [optional] |
|
11
|
-
| **created** | **String** | | [optional] |
|
12
|
-
| **updated** | **String** | | [optional] |
|
13
|
-
|
14
|
-
## Example
|
15
|
-
|
16
|
-
```ruby
|
17
|
-
require 'klaviyo_sdk'
|
18
|
-
|
19
|
-
instance = Klaviyo::Metric.new(
|
20
|
-
object: null,
|
21
|
-
id: null,
|
22
|
-
name: null,
|
23
|
-
integration: null,
|
24
|
-
created: null,
|
25
|
-
updated: null
|
26
|
-
)
|
27
|
-
```
|
28
|
-
|
data/docs/MetricExport.md
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# Klaviyo::MetricExport
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **metric** | **Hash<String, Object>** | | [optional] |
|
8
|
-
| **start_date** | **String** | | [optional] |
|
9
|
-
| **end_date** | **String** | | [optional] |
|
10
|
-
| **unit** | **String** | | [optional] |
|
11
|
-
| **measurement** | **String** | | [optional] |
|
12
|
-
| **by** | **String** | | [optional] |
|
13
|
-
| **where** | **String** | | [optional] |
|
14
|
-
| **results** | **Array<Hash<String, Object>>** | | [optional] |
|
15
|
-
|
16
|
-
## Example
|
17
|
-
|
18
|
-
```ruby
|
19
|
-
require 'klaviyo_sdk'
|
20
|
-
|
21
|
-
instance = Klaviyo::MetricExport.new(
|
22
|
-
metric: null,
|
23
|
-
start_date: null,
|
24
|
-
end_date: null,
|
25
|
-
unit: null,
|
26
|
-
measurement: null,
|
27
|
-
by: null,
|
28
|
-
where: null,
|
29
|
-
results: null
|
30
|
-
)
|
31
|
-
```
|
32
|
-
|
data/docs/MetricTimeline.md
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# Klaviyo::MetricTimeline
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **count** | **Integer** | | [optional] |
|
9
|
-
| **data** | [**Array<MetricTimelineData>**](MetricTimelineData.md) | | [optional] |
|
10
|
-
| **_next** | **String** | | [optional] |
|
11
|
-
|
12
|
-
## Example
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
require 'klaviyo_sdk'
|
16
|
-
|
17
|
-
instance = Klaviyo::MetricTimeline.new(
|
18
|
-
object: null,
|
19
|
-
count: null,
|
20
|
-
data: null,
|
21
|
-
_next: null
|
22
|
-
)
|
23
|
-
```
|
24
|
-
|
data/docs/MetricTimelineData.md
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# Klaviyo::MetricTimelineData
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **id** | **String** | | [optional] |
|
9
|
-
| **statistic_id** | **String** | | [optional] |
|
10
|
-
| **timestamp** | **Integer** | | [optional] |
|
11
|
-
| **event_name** | **String** | | [optional] |
|
12
|
-
| **event_properties** | **Hash<String, Object>** | | [optional] |
|
13
|
-
| **datetime** | **String** | | [optional] |
|
14
|
-
| **uuid** | **String** | | [optional] |
|
15
|
-
| **person** | **Hash<String, Object>** | | [optional] |
|
16
|
-
|
17
|
-
## Example
|
18
|
-
|
19
|
-
```ruby
|
20
|
-
require 'klaviyo_sdk'
|
21
|
-
|
22
|
-
instance = Klaviyo::MetricTimelineData.new(
|
23
|
-
object: null,
|
24
|
-
id: null,
|
25
|
-
statistic_id: null,
|
26
|
-
timestamp: null,
|
27
|
-
event_name: null,
|
28
|
-
event_properties: null,
|
29
|
-
datetime: null,
|
30
|
-
uuid: null,
|
31
|
-
person: null
|
32
|
-
)
|
33
|
-
```
|
34
|
-
|
data/docs/MetricsApi.md
DELETED
@@ -1,329 +0,0 @@
|
|
1
|
-
# Klaviyo::MetricsApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://a.klaviyo.com/api*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**get_metrics**](MetricsApi.md#get_metrics) | **GET** /v1/metrics | Get Metrics Info |
|
8
|
-
| [**metric_export**](MetricsApi.md#metric_export) | **GET** /v1/metric/{metric_id}/export | Query Event Data |
|
9
|
-
| [**metric_timeline**](MetricsApi.md#metric_timeline) | **GET** /v1/metric/{metric_id}/timeline | Get Events for a Specific Metric |
|
10
|
-
| [**metrics_timeline**](MetricsApi.md#metrics_timeline) | **GET** /v1/metrics/timeline | Get Events for All Metrics |
|
11
|
-
|
12
|
-
|
13
|
-
## get_metrics
|
14
|
-
|
15
|
-
> Hash<String, Object> get_metrics(opts)
|
16
|
-
|
17
|
-
Get Metrics Info
|
18
|
-
|
19
|
-
Returns a list of all the metrics in your account.
|
20
|
-
|
21
|
-
### Examples
|
22
|
-
|
23
|
-
```ruby
|
24
|
-
require 'time'
|
25
|
-
require 'klaviyo_sdk'
|
26
|
-
# setup authorization
|
27
|
-
Klaviyo.configure do |config|
|
28
|
-
# Configure API key authorization: ApiKeyAuth
|
29
|
-
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
30
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
|
-
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
32
|
-
end
|
33
|
-
|
34
|
-
api_instance = Klaviyo::MetricsApi.new
|
35
|
-
opts = {
|
36
|
-
page: 0, # Integer | For pagination, which page of results to return. Default = 0
|
37
|
-
count: 50 # Integer | For pagination, the number of results to return. Default = 50 ; Max = 100
|
38
|
-
}
|
39
|
-
|
40
|
-
begin
|
41
|
-
# Get Metrics Info
|
42
|
-
result = api_instance.get_metrics(opts)
|
43
|
-
p result
|
44
|
-
rescue Klaviyo::ApiError => e
|
45
|
-
puts "Error when calling MetricsApi->get_metrics: #{e}"
|
46
|
-
end
|
47
|
-
```
|
48
|
-
|
49
|
-
#### Using the get_metrics_with_http_info variant
|
50
|
-
|
51
|
-
This returns an Array which contains the response data, status code and headers.
|
52
|
-
|
53
|
-
> <Array(Hash<String, Object>, Integer, Hash)> get_metrics_with_http_info(opts)
|
54
|
-
|
55
|
-
```ruby
|
56
|
-
begin
|
57
|
-
# Get Metrics Info
|
58
|
-
data, status_code, headers = api_instance.get_metrics_with_http_info(opts)
|
59
|
-
p status_code # => 2xx
|
60
|
-
p headers # => { ... }
|
61
|
-
p data # => Hash<String, Object>
|
62
|
-
rescue Klaviyo::ApiError => e
|
63
|
-
puts "Error when calling MetricsApi->get_metrics_with_http_info: #{e}"
|
64
|
-
end
|
65
|
-
```
|
66
|
-
|
67
|
-
### Parameters
|
68
|
-
|
69
|
-
| Name | Type | Description | Notes |
|
70
|
-
| ---- | ---- | ----------- | ----- |
|
71
|
-
| **page** | **Integer** | For pagination, which page of results to return. Default = 0 | [optional][default to 0] |
|
72
|
-
| **count** | **Integer** | For pagination, the number of results to return. Default = 50 ; Max = 100 | [optional][default to 50] |
|
73
|
-
|
74
|
-
### Return type
|
75
|
-
|
76
|
-
**Hash<String, Object>**
|
77
|
-
|
78
|
-
### Authorization
|
79
|
-
|
80
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
81
|
-
|
82
|
-
### HTTP request headers
|
83
|
-
|
84
|
-
- **Content-Type**: Not defined
|
85
|
-
- **Accept**: application/json
|
86
|
-
|
87
|
-
|
88
|
-
## metric_export
|
89
|
-
|
90
|
-
> <MetricExport> metric_export(metric_id, opts)
|
91
|
-
|
92
|
-
Query Event Data
|
93
|
-
|
94
|
-
Exports event data from Klaviyo, optionally filtering and segmenting on available event properties. Note that the only comparison operator currently supported is `=`. To ensure a correct response, enter parameters in the curl request as they are ordered below:
|
95
|
-
|
96
|
-
### Examples
|
97
|
-
|
98
|
-
```ruby
|
99
|
-
require 'time'
|
100
|
-
require 'klaviyo_sdk'
|
101
|
-
# setup authorization
|
102
|
-
Klaviyo.configure do |config|
|
103
|
-
# Configure API key authorization: ApiKeyAuth
|
104
|
-
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
105
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
106
|
-
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
107
|
-
end
|
108
|
-
|
109
|
-
api_instance = Klaviyo::MetricsApi.new
|
110
|
-
metric_id = 'METRIC_ID' # String |
|
111
|
-
opts = {
|
112
|
-
start_date: 'start_date_example', # String | Beginning of timeframe to pull event data for. The default value is 1 month ago. Can also accept a 10-digit UNIX timestamp. When sending a `start_date`, you must also send an `end_date` Ex: `1610524800` OR `2021-01-13`
|
113
|
-
end_date: 'end_date_example', # String | End of timeframe to pull event data for. The default is the current day, or 1 month from start_date, whichever is sooner. Can also accept a 10-digit UNIX timestamp. When sending an `end_date`, you must also send a `start_date`. Must be *at most* 31 days after `start_date` Ex: `1612080000` OR `2021-01-31`
|
114
|
-
unit: 'day', # String | Granularity to bucket data points into - one of `day`, `week`, or `month`. Defaults to `day`.
|
115
|
-
measurement: 'count', # String | Type of metric to fetch - one of `unique`, `count`, `value`, or `sum`. Defaults to `count`. For `sum` a property name to operate on must be supplied as a JSON-encoded list like `[\"sum\",\"ItemCount\"]`
|
116
|
-
where: '[["$attributed_flow","=","FLOW_ID"]]', # String | Optional, JSON-encoded list. Conditions to use to filter the set of events. A max of 1 condition can be given. `where` and `by` parameters cannot be specified at the same time. ex: `[[\"$attributed_flow\",\"=\",\"FLOW_ID\"]]`
|
117
|
-
by: '$attributed_flow', # String | The name of a property to segment the event data on. `where` and `by` parameters cannot be specified at the same time. Cannot be used alongside `where` parameter.
|
118
|
-
count: 25 # Integer | Maximum number of segments to return. Default = 25, **MAX = 1000**
|
119
|
-
}
|
120
|
-
|
121
|
-
begin
|
122
|
-
# Query Event Data
|
123
|
-
result = api_instance.metric_export(metric_id, opts)
|
124
|
-
p result
|
125
|
-
rescue Klaviyo::ApiError => e
|
126
|
-
puts "Error when calling MetricsApi->metric_export: #{e}"
|
127
|
-
end
|
128
|
-
```
|
129
|
-
|
130
|
-
#### Using the metric_export_with_http_info variant
|
131
|
-
|
132
|
-
This returns an Array which contains the response data, status code and headers.
|
133
|
-
|
134
|
-
> <Array(<MetricExport>, Integer, Hash)> metric_export_with_http_info(metric_id, opts)
|
135
|
-
|
136
|
-
```ruby
|
137
|
-
begin
|
138
|
-
# Query Event Data
|
139
|
-
data, status_code, headers = api_instance.metric_export_with_http_info(metric_id, opts)
|
140
|
-
p status_code # => 2xx
|
141
|
-
p headers # => { ... }
|
142
|
-
p data # => <MetricExport>
|
143
|
-
rescue Klaviyo::ApiError => e
|
144
|
-
puts "Error when calling MetricsApi->metric_export_with_http_info: #{e}"
|
145
|
-
end
|
146
|
-
```
|
147
|
-
|
148
|
-
### Parameters
|
149
|
-
|
150
|
-
| Name | Type | Description | Notes |
|
151
|
-
| ---- | ---- | ----------- | ----- |
|
152
|
-
| **metric_id** | **String** | | [default to 'METRIC_ID'] |
|
153
|
-
| **start_date** | **String** | Beginning of timeframe to pull event data for. The default value is 1 month ago. Can also accept a 10-digit UNIX timestamp. When sending a `start_date`, you must also send an `end_date` Ex: `1610524800` OR `2021-01-13` | [optional] |
|
154
|
-
| **end_date** | **String** | End of timeframe to pull event data for. The default is the current day, or 1 month from start_date, whichever is sooner. Can also accept a 10-digit UNIX timestamp. When sending an `end_date`, you must also send a `start_date`. Must be *at most* 31 days after `start_date` Ex: `1612080000` OR `2021-01-31` | [optional] |
|
155
|
-
| **unit** | **String** | Granularity to bucket data points into - one of `day`, `week`, or `month`. Defaults to `day`. | [optional][default to 'day'] |
|
156
|
-
| **measurement** | **String** | Type of metric to fetch - one of `unique`, `count`, `value`, or `sum`. Defaults to `count`. For `sum` a property name to operate on must be supplied as a JSON-encoded list like `[\"sum\",\"ItemCount\"]` | [optional][default to 'count'] |
|
157
|
-
| **where** | **String** | Optional, JSON-encoded list. Conditions to use to filter the set of events. A max of 1 condition can be given. `where` and `by` parameters cannot be specified at the same time. ex: `[[\"$attributed_flow\",\"=\",\"FLOW_ID\"]]` | [optional] |
|
158
|
-
| **by** | **String** | The name of a property to segment the event data on. `where` and `by` parameters cannot be specified at the same time. Cannot be used alongside `where` parameter. | [optional] |
|
159
|
-
| **count** | **Integer** | Maximum number of segments to return. Default = 25, **MAX = 1000** | [optional][default to 25] |
|
160
|
-
|
161
|
-
### Return type
|
162
|
-
|
163
|
-
[**MetricExport**](MetricExport.md)
|
164
|
-
|
165
|
-
### Authorization
|
166
|
-
|
167
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
168
|
-
|
169
|
-
### HTTP request headers
|
170
|
-
|
171
|
-
- **Content-Type**: Not defined
|
172
|
-
- **Accept**: application/json
|
173
|
-
|
174
|
-
|
175
|
-
## metric_timeline
|
176
|
-
|
177
|
-
> <MetricTimeline> metric_timeline(metric_id, opts)
|
178
|
-
|
179
|
-
Get Events for a Specific Metric
|
180
|
-
|
181
|
-
Returns a batched timeline for one specific metric.
|
182
|
-
|
183
|
-
### Examples
|
184
|
-
|
185
|
-
```ruby
|
186
|
-
require 'time'
|
187
|
-
require 'klaviyo_sdk'
|
188
|
-
# setup authorization
|
189
|
-
Klaviyo.configure do |config|
|
190
|
-
# Configure API key authorization: ApiKeyAuth
|
191
|
-
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
192
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
193
|
-
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
194
|
-
end
|
195
|
-
|
196
|
-
api_instance = Klaviyo::MetricsApi.new
|
197
|
-
metric_id = 'METRIC_ID' # String |
|
198
|
-
opts = {
|
199
|
-
since: 'since_example', # String | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the `next` attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time.
|
200
|
-
count: 100, # Integer | Number of events to return in a batch. Max = 100
|
201
|
-
sort: 'desc' # String | Sort order to apply to timeline, either descending or ascending. Valid values are `desc` or `asc`. Defaults to `desc`. Always descending when `since` is not sent, as `since` defaults to current time.
|
202
|
-
}
|
203
|
-
|
204
|
-
begin
|
205
|
-
# Get Events for a Specific Metric
|
206
|
-
result = api_instance.metric_timeline(metric_id, opts)
|
207
|
-
p result
|
208
|
-
rescue Klaviyo::ApiError => e
|
209
|
-
puts "Error when calling MetricsApi->metric_timeline: #{e}"
|
210
|
-
end
|
211
|
-
```
|
212
|
-
|
213
|
-
#### Using the metric_timeline_with_http_info variant
|
214
|
-
|
215
|
-
This returns an Array which contains the response data, status code and headers.
|
216
|
-
|
217
|
-
> <Array(<MetricTimeline>, Integer, Hash)> metric_timeline_with_http_info(metric_id, opts)
|
218
|
-
|
219
|
-
```ruby
|
220
|
-
begin
|
221
|
-
# Get Events for a Specific Metric
|
222
|
-
data, status_code, headers = api_instance.metric_timeline_with_http_info(metric_id, opts)
|
223
|
-
p status_code # => 2xx
|
224
|
-
p headers # => { ... }
|
225
|
-
p data # => <MetricTimeline>
|
226
|
-
rescue Klaviyo::ApiError => e
|
227
|
-
puts "Error when calling MetricsApi->metric_timeline_with_http_info: #{e}"
|
228
|
-
end
|
229
|
-
```
|
230
|
-
|
231
|
-
### Parameters
|
232
|
-
|
233
|
-
| Name | Type | Description | Notes |
|
234
|
-
| ---- | ---- | ----------- | ----- |
|
235
|
-
| **metric_id** | **String** | | [default to 'METRIC_ID'] |
|
236
|
-
| **since** | **String** | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the `next` attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time. | [optional] |
|
237
|
-
| **count** | **Integer** | Number of events to return in a batch. Max = 100 | [optional][default to 50] |
|
238
|
-
| **sort** | **String** | Sort order to apply to timeline, either descending or ascending. Valid values are `desc` or `asc`. Defaults to `desc`. Always descending when `since` is not sent, as `since` defaults to current time. | [optional][default to 'desc'] |
|
239
|
-
|
240
|
-
### Return type
|
241
|
-
|
242
|
-
[**MetricTimeline**](MetricTimeline.md)
|
243
|
-
|
244
|
-
### Authorization
|
245
|
-
|
246
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
247
|
-
|
248
|
-
### HTTP request headers
|
249
|
-
|
250
|
-
- **Content-Type**: Not defined
|
251
|
-
- **Accept**: application/json
|
252
|
-
|
253
|
-
|
254
|
-
## metrics_timeline
|
255
|
-
|
256
|
-
> <MetricTimeline> metrics_timeline(opts)
|
257
|
-
|
258
|
-
Get Events for All Metrics
|
259
|
-
|
260
|
-
Returns a batched timeline of all events in your account.
|
261
|
-
|
262
|
-
### Examples
|
263
|
-
|
264
|
-
```ruby
|
265
|
-
require 'time'
|
266
|
-
require 'klaviyo_sdk'
|
267
|
-
# setup authorization
|
268
|
-
Klaviyo.configure do |config|
|
269
|
-
# Configure API key authorization: ApiKeyAuth
|
270
|
-
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
271
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
272
|
-
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
273
|
-
end
|
274
|
-
|
275
|
-
api_instance = Klaviyo::MetricsApi.new
|
276
|
-
opts = {
|
277
|
-
since: 'since_example', # String | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the next attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time.
|
278
|
-
count: 50, # Integer | Number of events to return in a batch. Default = 50, Max = 100
|
279
|
-
sort: 'desc' # String | Sort order to apply to timeline, either descending or ascending. Valid values are `desc` or `asc`. Defaults to `desc`. Always descending when `since` is not sent, as `since` defaults to current time.
|
280
|
-
}
|
281
|
-
|
282
|
-
begin
|
283
|
-
# Get Events for All Metrics
|
284
|
-
result = api_instance.metrics_timeline(opts)
|
285
|
-
p result
|
286
|
-
rescue Klaviyo::ApiError => e
|
287
|
-
puts "Error when calling MetricsApi->metrics_timeline: #{e}"
|
288
|
-
end
|
289
|
-
```
|
290
|
-
|
291
|
-
#### Using the metrics_timeline_with_http_info variant
|
292
|
-
|
293
|
-
This returns an Array which contains the response data, status code and headers.
|
294
|
-
|
295
|
-
> <Array(<MetricTimeline>, Integer, Hash)> metrics_timeline_with_http_info(opts)
|
296
|
-
|
297
|
-
```ruby
|
298
|
-
begin
|
299
|
-
# Get Events for All Metrics
|
300
|
-
data, status_code, headers = api_instance.metrics_timeline_with_http_info(opts)
|
301
|
-
p status_code # => 2xx
|
302
|
-
p headers # => { ... }
|
303
|
-
p data # => <MetricTimeline>
|
304
|
-
rescue Klaviyo::ApiError => e
|
305
|
-
puts "Error when calling MetricsApi->metrics_timeline_with_http_info: #{e}"
|
306
|
-
end
|
307
|
-
```
|
308
|
-
|
309
|
-
### Parameters
|
310
|
-
|
311
|
-
| Name | Type | Description | Notes |
|
312
|
-
| ---- | ---- | ----------- | ----- |
|
313
|
-
| **since** | **String** | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the next attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time. | [optional] |
|
314
|
-
| **count** | **Integer** | Number of events to return in a batch. Default = 50, Max = 100 | [optional][default to 50] |
|
315
|
-
| **sort** | **String** | Sort order to apply to timeline, either descending or ascending. Valid values are `desc` or `asc`. Defaults to `desc`. Always descending when `since` is not sent, as `since` defaults to current time. | [optional][default to 'desc'] |
|
316
|
-
|
317
|
-
### Return type
|
318
|
-
|
319
|
-
[**MetricTimeline**](MetricTimeline.md)
|
320
|
-
|
321
|
-
### Authorization
|
322
|
-
|
323
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
324
|
-
|
325
|
-
### HTTP request headers
|
326
|
-
|
327
|
-
- **Content-Type**: Not defined
|
328
|
-
- **Accept**: application/json
|
329
|
-
|
data/docs/Person.md
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# Klaviyo::Person
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **id** | **String** | | [optional] |
|
9
|
-
| **_address1** | **String** | | [optional] |
|
10
|
-
| **_address2** | **String** | | [optional] |
|
11
|
-
| **_city** | **String** | | [optional] |
|
12
|
-
| **_country** | **String** | | [optional] |
|
13
|
-
| **_latitude** | **String** | | [optional] |
|
14
|
-
| **_longitude** | **String** | | [optional] |
|
15
|
-
| **_region** | **String** | | [optional] |
|
16
|
-
| **_zip** | **String** | | [optional] |
|
17
|
-
| **_email** | **String** | | [optional] |
|
18
|
-
| **_title** | **String** | | [optional] |
|
19
|
-
| **_phone_number** | **String** | | [optional] |
|
20
|
-
| **_organization** | **String** | | [optional] |
|
21
|
-
| **_first_name** | **String** | | [optional] |
|
22
|
-
| **_last_name** | **String** | | [optional] |
|
23
|
-
| **_timezone** | **String** | | [optional] |
|
24
|
-
| **_id** | **String** | | [optional] |
|
25
|
-
| **created** | **String** | | [optional] |
|
26
|
-
| **updated** | **String** | | [optional] |
|
27
|
-
|
28
|
-
## Example
|
29
|
-
|
30
|
-
```ruby
|
31
|
-
require 'klaviyo_sdk'
|
32
|
-
|
33
|
-
instance = Klaviyo::Person.new(
|
34
|
-
object: person,
|
35
|
-
id: PERSON_ID,
|
36
|
-
_address1: ,
|
37
|
-
_address2: ,
|
38
|
-
_city: Mount Vernon,
|
39
|
-
_country: United States,
|
40
|
-
_latitude: ,
|
41
|
-
_longitude: ,
|
42
|
-
_region: Virginia,
|
43
|
-
_zip: 22121,
|
44
|
-
_email: george.washington@klaviyo.com,
|
45
|
-
_title: President,
|
46
|
-
_phone_number: +13239169023,
|
47
|
-
_organization: U.S. Government,
|
48
|
-
_first_name: George,
|
49
|
-
_last_name: Washington,
|
50
|
-
_timezone: US/Eastern,
|
51
|
-
_id: CUSTOM_ID,
|
52
|
-
created: 2021-11-04 09:06:13,
|
53
|
-
updated: 2021-11-23 11:21:03
|
54
|
-
)
|
55
|
-
```
|
56
|
-
|
data/docs/PrivacyEmail.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::PrivacyEmail
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **email** | **String** | | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::PrivacyEmail.new(
|
15
|
-
email: abraham.lincoln@klaviyo.com
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/PrivacyId.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::PrivacyId
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **person_id** | **String** | | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::PrivacyId.new(
|
15
|
-
person_id: PERSON_ID
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/PrivacyPhone.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::PrivacyPhone
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **phone_number** | **String** | | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::PrivacyPhone.new(
|
15
|
-
phone_number: +13239169023
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|