klaviyo_sdk 1.0.3.20220329 → 1.0.4.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 +3 -0
- metadata +6 -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
@@ -1,22 +0,0 @@
|
|
1
|
-
# Klaviyo::CheckMembershipRequest
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **emails** | **Array<String>** | List of email addresses | [optional] |
|
8
|
-
| **phone_numbers** | **Array<String>** | List of phone numbers | [optional] |
|
9
|
-
| **push_tokens** | **Array<String>** | | [optional] |
|
10
|
-
|
11
|
-
## Example
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'klaviyo_sdk'
|
15
|
-
|
16
|
-
instance = Klaviyo::CheckMembershipRequest.new(
|
17
|
-
emails: ["george.washington@klaviyo.com","abraham.lincoln@klaviyo.com"],
|
18
|
-
phone_numbers: ["+13239169023","+12028837032"],
|
19
|
-
push_tokens: ["PUSH_TOKEN_1","PUSH_TOKEN_2"]
|
20
|
-
)
|
21
|
-
```
|
22
|
-
|
data/docs/DataPrivacyApi.md
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
# Klaviyo::DataPrivacyApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://a.klaviyo.com/api*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**request_deletion**](DataPrivacyApi.md#request_deletion) | **POST** /v2/data-privacy/deletion-request | Request a Deletion |
|
8
|
-
|
9
|
-
|
10
|
-
## request_deletion
|
11
|
-
|
12
|
-
> String request_deletion(opts)
|
13
|
-
|
14
|
-
Request a Deletion
|
15
|
-
|
16
|
-
Request a data privacy-compliant deletion for the person record corresponding to an email address, phone number, or person identifier. **If multiple person records exist for the provided identifier, only one of them will be deleted.** The arguments should be sent as content type application/json. Note that only **one** identifier (email, phone_number, or person_id) can be specified. In addition to your API key, you need to set exactly one of the following parameters: `email`, `phone_number`, `or person_id`, along with the associated `string` value. Examples: Email: `{\"email\":\"abraham.lincoln@klaviyo.com\"}` Phone Number: `{\"phone_number\":\"+13239169023\"}` Person ID: `{\"person_id\":\"PERSON_ID\"}`
|
17
|
-
|
18
|
-
### Examples
|
19
|
-
|
20
|
-
```ruby
|
21
|
-
require 'time'
|
22
|
-
require 'klaviyo_sdk'
|
23
|
-
# setup authorization
|
24
|
-
Klaviyo.configure do |config|
|
25
|
-
# Configure API key authorization: ApiKeyAuth
|
26
|
-
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
27
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
-
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
29
|
-
end
|
30
|
-
|
31
|
-
api_instance = Klaviyo::DataPrivacyApi.new
|
32
|
-
opts = {
|
33
|
-
body: '{"email":"abraham.lincoln@klaviyo.com"}' # String |
|
34
|
-
}
|
35
|
-
|
36
|
-
begin
|
37
|
-
# Request a Deletion
|
38
|
-
result = api_instance.request_deletion(opts)
|
39
|
-
p result
|
40
|
-
rescue Klaviyo::ApiError => e
|
41
|
-
puts "Error when calling DataPrivacyApi->request_deletion: #{e}"
|
42
|
-
end
|
43
|
-
```
|
44
|
-
|
45
|
-
#### Using the request_deletion_with_http_info variant
|
46
|
-
|
47
|
-
This returns an Array which contains the response data, status code and headers.
|
48
|
-
|
49
|
-
> <Array(String, Integer, Hash)> request_deletion_with_http_info(opts)
|
50
|
-
|
51
|
-
```ruby
|
52
|
-
begin
|
53
|
-
# Request a Deletion
|
54
|
-
data, status_code, headers = api_instance.request_deletion_with_http_info(opts)
|
55
|
-
p status_code # => 2xx
|
56
|
-
p headers # => { ... }
|
57
|
-
p data # => String
|
58
|
-
rescue Klaviyo::ApiError => e
|
59
|
-
puts "Error when calling DataPrivacyApi->request_deletion_with_http_info: #{e}"
|
60
|
-
end
|
61
|
-
```
|
62
|
-
|
63
|
-
### Parameters
|
64
|
-
|
65
|
-
| Name | Type | Description | Notes |
|
66
|
-
| ---- | ---- | ----------- | ----- |
|
67
|
-
| **body** | **String** | | [optional] |
|
68
|
-
|
69
|
-
### Return type
|
70
|
-
|
71
|
-
**String**
|
72
|
-
|
73
|
-
### Authorization
|
74
|
-
|
75
|
-
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
76
|
-
|
77
|
-
### HTTP request headers
|
78
|
-
|
79
|
-
- **Content-Type**: application/json
|
80
|
-
- **Accept**: application/json
|
81
|
-
|
data/docs/DeleteEmail.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::DeleteEmail
|
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::DeleteEmail.new(
|
15
|
-
email: example@klaviyo.com
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/DeletePerson.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::DeletePerson
|
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::DeletePerson.new(
|
15
|
-
person_id: PERSON_ID
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/DeletePhone.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::DeletePhone
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **phone_number** | **String** | Phone Number | [optional] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::DeletePhone.new(
|
15
|
-
phone_number: +13239169023
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Klaviyo::DeprecatedGetListResponse
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **start** | **Integer** | | [optional] |
|
9
|
-
| **_end** | **Integer** | | [optional] |
|
10
|
-
| **page** | **Integer** | | [optional] |
|
11
|
-
| **size** | **Integer** | | [optional] |
|
12
|
-
| **total** | **Integer** | | [optional] |
|
13
|
-
| **data** | [**Array<DeprecatedGetListResponseData>**](DeprecatedGetListResponseData.md) | | [optional] |
|
14
|
-
|
15
|
-
## Example
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'klaviyo_sdk'
|
19
|
-
|
20
|
-
instance = Klaviyo::DeprecatedGetListResponse.new(
|
21
|
-
object: null,
|
22
|
-
start: null,
|
23
|
-
_end: null,
|
24
|
-
page: null,
|
25
|
-
size: null,
|
26
|
-
total: null,
|
27
|
-
data: null
|
28
|
-
)
|
29
|
-
```
|
30
|
-
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Klaviyo::DeprecatedGetListResponseData
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **id** | **String** | | [optional] |
|
9
|
-
| **type** | **String** | | [optional] |
|
10
|
-
| **created** | **String** | | [optional] |
|
11
|
-
| **updated** | **String** | | [optional] |
|
12
|
-
| **person_count** | **Integer** | | [optional] |
|
13
|
-
|
14
|
-
## Example
|
15
|
-
|
16
|
-
```ruby
|
17
|
-
require 'klaviyo_sdk'
|
18
|
-
|
19
|
-
instance = Klaviyo::DeprecatedGetListResponseData.new(
|
20
|
-
object: null,
|
21
|
-
id: null,
|
22
|
-
type: null,
|
23
|
-
created: null,
|
24
|
-
updated: null,
|
25
|
-
person_count: null
|
26
|
-
)
|
27
|
-
```
|
28
|
-
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Klaviyo::GlobalExclusionResponseData
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **data** | **Array<Hash<String, Object>>** | | [optional] |
|
9
|
-
| **page** | **Integer** | | [optional] |
|
10
|
-
| **start** | **Integer** | | [optional] |
|
11
|
-
| **_end** | **Integer** | | [optional] |
|
12
|
-
| **total** | **Integer** | | [optional] |
|
13
|
-
| **page_size** | **Integer** | | [optional] |
|
14
|
-
|
15
|
-
## Example
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
require 'klaviyo_sdk'
|
19
|
-
|
20
|
-
instance = Klaviyo::GlobalExclusionResponseData.new(
|
21
|
-
object: $list,
|
22
|
-
data: null,
|
23
|
-
page: 0,
|
24
|
-
start: 0,
|
25
|
-
_end: 1,
|
26
|
-
total: 1,
|
27
|
-
page_size: 1
|
28
|
-
)
|
29
|
-
```
|
30
|
-
|
data/docs/IdentifyPayload.md
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# Klaviyo::IdentifyPayload
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **token** | **String** | | |
|
8
|
-
| **properties** | [**IdentifyPayloadProperties**](IdentifyPayloadProperties.md) | | |
|
9
|
-
|
10
|
-
## Example
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'klaviyo_sdk'
|
14
|
-
|
15
|
-
instance = Klaviyo::IdentifyPayload.new(
|
16
|
-
token: null,
|
17
|
-
properties: null
|
18
|
-
)
|
19
|
-
```
|
20
|
-
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# Klaviyo::IdentifyPayloadProperties
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **_email** | **String** | | [optional] |
|
8
|
-
| **_first_name** | **String** | | [optional] |
|
9
|
-
| **_last_name** | **String** | | [optional] |
|
10
|
-
| **_phone_number** | **String** | | [optional] |
|
11
|
-
| **_title** | **String** | | [optional] |
|
12
|
-
| **_organization** | **String** | | [optional] |
|
13
|
-
| **_city** | **String** | | [optional] |
|
14
|
-
| **_region** | **String** | | [optional] |
|
15
|
-
| **_country** | **String** | | [optional] |
|
16
|
-
| **_zip** | **String** | | [optional] |
|
17
|
-
| **image** | **String** | | [optional] |
|
18
|
-
| **consent** | **String** | | [optional] |
|
19
|
-
| **your_custom_field** | [**OneOfstringintegernumberbooleanarray**](OneOfstringintegernumberbooleanarray.md) | | [optional] |
|
20
|
-
|
21
|
-
## Example
|
22
|
-
|
23
|
-
```ruby
|
24
|
-
require 'klaviyo_sdk'
|
25
|
-
|
26
|
-
instance = Klaviyo::IdentifyPayloadProperties.new(
|
27
|
-
_email: null,
|
28
|
-
_first_name: null,
|
29
|
-
_last_name: null,
|
30
|
-
_phone_number: null,
|
31
|
-
_title: null,
|
32
|
-
_organization: null,
|
33
|
-
_city: null,
|
34
|
-
_region: null,
|
35
|
-
_country: null,
|
36
|
-
_zip: null,
|
37
|
-
image: null,
|
38
|
-
consent: null,
|
39
|
-
your_custom_field: null
|
40
|
-
)
|
41
|
-
```
|
42
|
-
|
data/docs/InlineObject.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::InlineObject
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **exchange_id** | **String** | | [default to 'EXCHANGE_ID'] |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::InlineObject.new(
|
15
|
-
exchange_id: EXCHANGE_ID
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/InlineObject3.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::InlineObject3
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **profiles** | **Array<Hash<String, Object>>** | | |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::InlineObject3.new(
|
15
|
-
profiles: [{"email":"george.washington@klaviyo.com"},{"phone_number":"+13239169023","sms_consent":true}]
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/InlineObject4.md
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# Klaviyo::InlineObject4
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **profiles** | **Array<Hash<String, Object>>** | | |
|
8
|
-
|
9
|
-
## Example
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'klaviyo_sdk'
|
13
|
-
|
14
|
-
instance = Klaviyo::InlineObject4.new(
|
15
|
-
profiles: [{"email":"george.washington@klaviyo.com"},{"phone_number":"+13239169023"}]
|
16
|
-
)
|
17
|
-
```
|
18
|
-
|
data/docs/InlineObject5.md
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Klaviyo::InlineObject5
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **emails** | **Array<String>** | | [optional] |
|
8
|
-
| **phone_numbers** | **Array<String>** | | [optional] |
|
9
|
-
| **push_tokens** | **Array<String>** | | [optional] |
|
10
|
-
|
11
|
-
## Example
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'klaviyo_sdk'
|
15
|
-
|
16
|
-
instance = Klaviyo::InlineObject5.new(
|
17
|
-
emails: ["george.washington@klaviyo.com","abraham.lincoln@klaviyo.com"],
|
18
|
-
phone_numbers: ["+13239169023"],
|
19
|
-
push_tokens: ["PUSH_TOKEN"]
|
20
|
-
)
|
21
|
-
```
|
22
|
-
|