klaviyo_sdk 1.0.1.20220329 → 1.0.4.20220329

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +121 -99
  4. data/klaviyo_sdk.gemspec +1 -1
  5. data/lib/klaviyo_sdk/api/campaigns_api.rb +1 -1
  6. data/lib/klaviyo_sdk/api/data_privacy_api.rb +3 -3
  7. data/lib/klaviyo_sdk/api/lists_segments_api.rb +1 -1
  8. data/lib/klaviyo_sdk/api/metrics_api.rb +1 -1
  9. data/lib/klaviyo_sdk/api/profiles_api.rb +67 -1
  10. data/lib/klaviyo_sdk/api/templates_api.rb +1 -1
  11. data/lib/klaviyo_sdk/api/track_identify_api.rb +1 -1
  12. data/lib/klaviyo_sdk/api_client.rb +2 -2
  13. data/lib/klaviyo_sdk/api_error.rb +1 -1
  14. data/lib/klaviyo_sdk/configuration.rb +1 -1
  15. data/lib/klaviyo_sdk/models/campaign.rb +202 -22
  16. data/lib/klaviyo_sdk/models/campaign_lists.rb +318 -0
  17. data/lib/klaviyo_sdk/models/campaigns.rb +487 -0
  18. data/lib/klaviyo_sdk/models/check_membership_request.rb +4 -4
  19. data/lib/klaviyo_sdk/models/delete_email.rb +4 -4
  20. data/lib/klaviyo_sdk/models/delete_person.rb +4 -4
  21. data/lib/klaviyo_sdk/models/delete_phone.rb +4 -4
  22. data/lib/klaviyo_sdk/models/deprecated_get_list_response.rb +4 -4
  23. data/lib/klaviyo_sdk/models/deprecated_get_list_response_data.rb +4 -4
  24. data/lib/klaviyo_sdk/models/global_exclusion_response_data.rb +4 -4
  25. data/lib/klaviyo_sdk/models/identify_payload.rb +4 -4
  26. data/lib/klaviyo_sdk/models/identify_payload_properties.rb +4 -4
  27. data/lib/klaviyo_sdk/models/inline_object.rb +9 -4
  28. data/lib/klaviyo_sdk/models/inline_object3.rb +4 -4
  29. data/lib/klaviyo_sdk/models/inline_object4.rb +4 -4
  30. data/lib/klaviyo_sdk/models/inline_object5.rb +4 -5
  31. data/lib/klaviyo_sdk/models/inline_response200.rb +218 -0
  32. data/lib/klaviyo_sdk/models/metric.rb +4 -4
  33. data/lib/klaviyo_sdk/models/metric_export.rb +4 -4
  34. data/lib/klaviyo_sdk/models/metric_timeline.rb +4 -4
  35. data/lib/klaviyo_sdk/models/metric_timeline_data.rb +4 -4
  36. data/lib/klaviyo_sdk/models/person.rb +4 -4
  37. data/lib/klaviyo_sdk/models/person.rb.bak +4 -4
  38. data/lib/klaviyo_sdk/models/privacy_email.rb +4 -4
  39. data/lib/klaviyo_sdk/models/privacy_id.rb +4 -4
  40. data/lib/klaviyo_sdk/models/privacy_phone.rb +4 -4
  41. data/lib/klaviyo_sdk/models/rendered_template.rb +4 -4
  42. data/lib/klaviyo_sdk/models/template.rb +4 -4
  43. data/lib/klaviyo_sdk/models/track_payload.rb +4 -4
  44. data/lib/klaviyo_sdk/models/track_payload_customer_properties.rb +4 -4
  45. data/lib/klaviyo_sdk/models/track_payload_properties.rb +4 -4
  46. data/lib/klaviyo_sdk/version.rb +1 -1
  47. data/lib/klaviyo_sdk.rb +10 -7
  48. metadata +6 -76
  49. data/docs/Campaign.md +0 -38
  50. data/docs/CampaignsApi.md +0 -707
  51. data/docs/CheckMembershipRequest.md +0 -22
  52. data/docs/DataPrivacyApi.md +0 -81
  53. data/docs/DeleteEmail.md +0 -18
  54. data/docs/DeletePerson.md +0 -18
  55. data/docs/DeletePhone.md +0 -18
  56. data/docs/DeprecatedGetListResponse.md +0 -30
  57. data/docs/DeprecatedGetListResponseData.md +0 -28
  58. data/docs/GlobalExclusionResponseData.md +0 -30
  59. data/docs/IdentifyPayload.md +0 -20
  60. data/docs/IdentifyPayloadProperties.md +0 -42
  61. data/docs/InlineObject.md +0 -18
  62. data/docs/InlineObject3.md +0 -18
  63. data/docs/InlineObject4.md +0 -18
  64. data/docs/InlineObject5.md +0 -22
  65. data/docs/ListsSegmentsApi.md +0 -1198
  66. data/docs/Metric.md +0 -28
  67. data/docs/MetricExport.md +0 -32
  68. data/docs/MetricTimeline.md +0 -24
  69. data/docs/MetricTimelineData.md +0 -34
  70. data/docs/MetricsApi.md +0 -329
  71. data/docs/Person.md +0 -56
  72. data/docs/PrivacyEmail.md +0 -18
  73. data/docs/PrivacyId.md +0 -18
  74. data/docs/PrivacyPhone.md +0 -18
  75. data/docs/ProfilesApi.md +0 -391
  76. data/docs/RenderedTemplate.md +0 -24
  77. data/docs/Template.md +0 -30
  78. data/docs/TemplatesApi.md +0 -541
  79. data/docs/TrackIdentifyApi.md +0 -267
  80. data/docs/TrackPayload.md +0 -24
  81. data/docs/TrackPayloadCustomerProperties.md +0 -20
  82. data/docs/TrackPayloadProperties.md +0 -22
  83. data/git_push.sh +0 -57
  84. data/klaviyo_sdk-1.0.0.20220329.gem +0 -0
  85. data/spec/api/campaigns_api_spec.rb +0 -165
  86. data/spec/api/data_privacy_api_spec.rb +0 -47
  87. data/spec/api/lists_segments_api_spec.rb +0 -239
  88. data/spec/api/metrics_api_spec.rb +0 -96
  89. data/spec/api/profiles_api_spec.rb +0 -103
  90. data/spec/api/templates_api_spec.rb +0 -130
  91. data/spec/api/track_identify_api_spec.rb +0 -83
  92. data/spec/api_client_spec.rb +0 -226
  93. data/spec/configuration_spec.rb +0 -42
  94. data/spec/models/campaign_spec.rb +0 -94
  95. data/spec/models/check_membership_request_spec.rb +0 -46
  96. data/spec/models/delete_email_spec.rb +0 -34
  97. data/spec/models/delete_person_spec.rb +0 -34
  98. data/spec/models/delete_phone_spec.rb +0 -34
  99. data/spec/models/deprecated_get_list_response_data_spec.rb +0 -64
  100. data/spec/models/deprecated_get_list_response_spec.rb +0 -70
  101. data/spec/models/global_exclusion_response_data_spec.rb +0 -70
  102. data/spec/models/identify_payload_properties_spec.rb +0 -106
  103. data/spec/models/identify_payload_spec.rb +0 -40
  104. data/spec/models/inline_object3_spec.rb +0 -34
  105. data/spec/models/inline_object4_spec.rb +0 -34
  106. data/spec/models/inline_object5_spec.rb +0 -46
  107. data/spec/models/inline_object_spec.rb +0 -34
  108. data/spec/models/metric_export_spec.rb +0 -76
  109. data/spec/models/metric_spec.rb +0 -64
  110. data/spec/models/metric_timeline_data_spec.rb +0 -82
  111. data/spec/models/metric_timeline_spec.rb +0 -52
  112. data/spec/models/person_spec.rb +0 -148
  113. data/spec/models/privacy_email_spec.rb +0 -34
  114. data/spec/models/privacy_id_spec.rb +0 -34
  115. data/spec/models/privacy_phone_spec.rb +0 -34
  116. data/spec/models/rendered_template_spec.rb +0 -52
  117. data/spec/models/template_spec.rb +0 -70
  118. data/spec/models/track_payload_customer_properties_spec.rb +0 -40
  119. data/spec/models/track_payload_properties_spec.rb +0 -46
  120. data/spec/models/track_payload_spec.rb +0 -52
  121. data/spec/spec_helper.rb +0 -111
data/docs/Metric.md DELETED
@@ -1,28 +0,0 @@
1
- # Client::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 = Client::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
- # Client::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 = Client::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
-
@@ -1,24 +0,0 @@
1
- # Client::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 = Client::MetricTimeline.new(
18
- object: null,
19
- count: null,
20
- data: null,
21
- _next: null
22
- )
23
- ```
24
-
@@ -1,34 +0,0 @@
1
- # Client::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 = Client::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
- # Client::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
- Client.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 = Client::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 Client::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&lt;String, Object&gt;, 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&lt;String, Object&gt;
62
- rescue Client::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 &#x3D; 0 | [optional][default to 0] |
72
- | **count** | **Integer** | For pagination, the number of results to return. Default &#x3D; 50 ; Max &#x3D; 100 | [optional][default to 50] |
73
-
74
- ### Return type
75
-
76
- **Hash&lt;String, Object&gt;**
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
- Client.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 = Client::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 Client::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 Client::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 &#39;METRIC_ID&#39;] |
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 &#x60;start_date&#x60;, you must also send an &#x60;end_date&#x60; Ex: &#x60;1610524800&#x60; OR &#x60;2021-01-13&#x60; | [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 &#x60;end_date&#x60;, you must also send a &#x60;start_date&#x60;. Must be *at most* 31 days after &#x60;start_date&#x60; Ex: &#x60;1612080000&#x60; OR &#x60;2021-01-31&#x60; | [optional] |
155
- | **unit** | **String** | Granularity to bucket data points into - one of &#x60;day&#x60;, &#x60;week&#x60;, or &#x60;month&#x60;. Defaults to &#x60;day&#x60;. | [optional][default to &#39;day&#39;] |
156
- | **measurement** | **String** | Type of metric to fetch - one of &#x60;unique&#x60;, &#x60;count&#x60;, &#x60;value&#x60;, or &#x60;sum&#x60;. Defaults to &#x60;count&#x60;. For &#x60;sum&#x60; a property name to operate on must be supplied as a JSON-encoded list like &#x60;[\&quot;sum\&quot;,\&quot;ItemCount\&quot;]&#x60; | [optional][default to &#39;count&#39;] |
157
- | **where** | **String** | Optional, JSON-encoded list. Conditions to use to filter the set of events. A max of 1 condition can be given. &#x60;where&#x60; and &#x60;by&#x60; parameters cannot be specified at the same time. ex: &#x60;[[\&quot;$attributed_flow\&quot;,\&quot;&#x3D;\&quot;,\&quot;FLOW_ID\&quot;]]&#x60; | [optional] |
158
- | **by** | **String** | The name of a property to segment the event data on. &#x60;where&#x60; and &#x60;by&#x60; parameters cannot be specified at the same time. Cannot be used alongside &#x60;where&#x60; parameter. | [optional] |
159
- | **count** | **Integer** | Maximum number of segments to return. Default &#x3D; 25, **MAX &#x3D; 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
- Client.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 = Client::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 Client::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 Client::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 &#39;METRIC_ID&#39;] |
236
- | **since** | **String** | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the &#x60;next&#x60; 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 &#x3D; 100 | [optional][default to 50] |
238
- | **sort** | **String** | Sort order to apply to timeline, either descending or ascending. Valid values are &#x60;desc&#x60; or &#x60;asc&#x60;. Defaults to &#x60;desc&#x60;. Always descending when &#x60;since&#x60; is not sent, as &#x60;since&#x60; defaults to current time. | [optional][default to &#39;desc&#39;] |
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
- Client.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 = Client::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 Client::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 Client::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 &#x3D; 50, Max &#x3D; 100 | [optional][default to 50] |
315
- | **sort** | **String** | Sort order to apply to timeline, either descending or ascending. Valid values are &#x60;desc&#x60; or &#x60;asc&#x60;. Defaults to &#x60;desc&#x60;. Always descending when &#x60;since&#x60; is not sent, as &#x60;since&#x60; defaults to current time. | [optional][default to &#39;desc&#39;] |
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
- # Client::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 = Client::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
- # Client::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 = Client::PrivacyEmail.new(
15
- email: abraham.lincoln@klaviyo.com
16
- )
17
- ```
18
-
data/docs/PrivacyId.md DELETED
@@ -1,18 +0,0 @@
1
- # Client::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 = Client::PrivacyId.new(
15
- person_id: PERSON_ID
16
- )
17
- ```
18
-
data/docs/PrivacyPhone.md DELETED
@@ -1,18 +0,0 @@
1
- # Client::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 = Client::PrivacyPhone.new(
15
- phone_number: +13239169023
16
- )
17
- ```
18
-