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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +25 -3
  4. data/klaviyo_sdk.gemspec +1 -1
  5. data/lib/klaviyo_sdk/api/data_privacy_api.rb +2 -2
  6. data/lib/klaviyo_sdk/api/profiles_api.rb +66 -0
  7. data/lib/klaviyo_sdk/api_client.rb +1 -1
  8. data/lib/klaviyo_sdk/models/campaign.rb +198 -18
  9. data/lib/klaviyo_sdk/models/campaign_lists.rb +318 -0
  10. data/lib/klaviyo_sdk/models/campaigns.rb +487 -0
  11. data/lib/klaviyo_sdk/models/inline_object5.rb +0 -1
  12. data/lib/klaviyo_sdk/models/inline_response200.rb +218 -0
  13. data/lib/klaviyo_sdk.rb +3 -0
  14. metadata +6 -76
  15. data/docs/Campaign.md +0 -38
  16. data/docs/CampaignsApi.md +0 -707
  17. data/docs/CheckMembershipRequest.md +0 -22
  18. data/docs/DataPrivacyApi.md +0 -81
  19. data/docs/DeleteEmail.md +0 -18
  20. data/docs/DeletePerson.md +0 -18
  21. data/docs/DeletePhone.md +0 -18
  22. data/docs/DeprecatedGetListResponse.md +0 -30
  23. data/docs/DeprecatedGetListResponseData.md +0 -28
  24. data/docs/GlobalExclusionResponseData.md +0 -30
  25. data/docs/IdentifyPayload.md +0 -20
  26. data/docs/IdentifyPayloadProperties.md +0 -42
  27. data/docs/InlineObject.md +0 -18
  28. data/docs/InlineObject3.md +0 -18
  29. data/docs/InlineObject4.md +0 -18
  30. data/docs/InlineObject5.md +0 -22
  31. data/docs/ListsSegmentsApi.md +0 -1198
  32. data/docs/Metric.md +0 -28
  33. data/docs/MetricExport.md +0 -32
  34. data/docs/MetricTimeline.md +0 -24
  35. data/docs/MetricTimelineData.md +0 -34
  36. data/docs/MetricsApi.md +0 -329
  37. data/docs/Person.md +0 -56
  38. data/docs/PrivacyEmail.md +0 -18
  39. data/docs/PrivacyId.md +0 -18
  40. data/docs/PrivacyPhone.md +0 -18
  41. data/docs/ProfilesApi.md +0 -391
  42. data/docs/RenderedTemplate.md +0 -24
  43. data/docs/Template.md +0 -30
  44. data/docs/TemplatesApi.md +0 -541
  45. data/docs/TrackIdentifyApi.md +0 -267
  46. data/docs/TrackPayload.md +0 -24
  47. data/docs/TrackPayloadCustomerProperties.md +0 -20
  48. data/docs/TrackPayloadProperties.md +0 -22
  49. data/git_push.sh +0 -57
  50. data/klaviyo_sdk-1.0.3.2022.03.29.gem +0 -0
  51. data/spec/api/campaigns_api_spec.rb +0 -165
  52. data/spec/api/data_privacy_api_spec.rb +0 -47
  53. data/spec/api/lists_segments_api_spec.rb +0 -239
  54. data/spec/api/metrics_api_spec.rb +0 -96
  55. data/spec/api/profiles_api_spec.rb +0 -103
  56. data/spec/api/templates_api_spec.rb +0 -130
  57. data/spec/api/track_identify_api_spec.rb +0 -83
  58. data/spec/api_client_spec.rb +0 -226
  59. data/spec/configuration_spec.rb +0 -42
  60. data/spec/models/campaign_spec.rb +0 -94
  61. data/spec/models/check_membership_request_spec.rb +0 -46
  62. data/spec/models/delete_email_spec.rb +0 -34
  63. data/spec/models/delete_person_spec.rb +0 -34
  64. data/spec/models/delete_phone_spec.rb +0 -34
  65. data/spec/models/deprecated_get_list_response_data_spec.rb +0 -64
  66. data/spec/models/deprecated_get_list_response_spec.rb +0 -70
  67. data/spec/models/global_exclusion_response_data_spec.rb +0 -70
  68. data/spec/models/identify_payload_properties_spec.rb +0 -106
  69. data/spec/models/identify_payload_spec.rb +0 -40
  70. data/spec/models/inline_object3_spec.rb +0 -34
  71. data/spec/models/inline_object4_spec.rb +0 -34
  72. data/spec/models/inline_object5_spec.rb +0 -46
  73. data/spec/models/inline_object_spec.rb +0 -34
  74. data/spec/models/metric_export_spec.rb +0 -76
  75. data/spec/models/metric_spec.rb +0 -64
  76. data/spec/models/metric_timeline_data_spec.rb +0 -82
  77. data/spec/models/metric_timeline_spec.rb +0 -52
  78. data/spec/models/person_spec.rb +0 -148
  79. data/spec/models/privacy_email_spec.rb +0 -34
  80. data/spec/models/privacy_id_spec.rb +0 -34
  81. data/spec/models/privacy_phone_spec.rb +0 -34
  82. data/spec/models/rendered_template_spec.rb +0 -52
  83. data/spec/models/template_spec.rb +0 -70
  84. data/spec/models/track_payload_customer_properties_spec.rb +0 -40
  85. data/spec/models/track_payload_properties_spec.rb +0 -46
  86. data/spec/models/track_payload_spec.rb +0 -52
  87. 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
-
@@ -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&lt;DeprecatedGetListResponseData&gt;**](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&lt;Hash&lt;String, Object&gt;&gt;** | | [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
-
@@ -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 &#39;EXCHANGE_ID&#39;] |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'klaviyo_sdk'
13
-
14
- instance = Klaviyo::InlineObject.new(
15
- exchange_id: EXCHANGE_ID
16
- )
17
- ```
18
-
@@ -1,18 +0,0 @@
1
- # Klaviyo::InlineObject3
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **profiles** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'klaviyo_sdk'
13
-
14
- instance = Klaviyo::InlineObject3.new(
15
- profiles: [{&quot;email&quot;:&quot;george.washington@klaviyo.com&quot;},{&quot;phone_number&quot;:&quot;+13239169023&quot;,&quot;sms_consent&quot;:true}]
16
- )
17
- ```
18
-
@@ -1,18 +0,0 @@
1
- # Klaviyo::InlineObject4
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **profiles** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | |
8
-
9
- ## Example
10
-
11
- ```ruby
12
- require 'klaviyo_sdk'
13
-
14
- instance = Klaviyo::InlineObject4.new(
15
- profiles: [{&quot;email&quot;:&quot;george.washington@klaviyo.com&quot;},{&quot;phone_number&quot;:&quot;+13239169023&quot;}]
16
- )
17
- ```
18
-
@@ -1,22 +0,0 @@
1
- # Klaviyo::InlineObject5
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **emails** | **Array&lt;String&gt;** | | [optional] |
8
- | **phone_numbers** | **Array&lt;String&gt;** | | [optional] |
9
- | **push_tokens** | **Array&lt;String&gt;** | | [optional] |
10
-
11
- ## Example
12
-
13
- ```ruby
14
- require 'klaviyo_sdk'
15
-
16
- instance = Klaviyo::InlineObject5.new(
17
- emails: [&quot;george.washington@klaviyo.com&quot;,&quot;abraham.lincoln@klaviyo.com&quot;],
18
- phone_numbers: [&quot;+13239169023&quot;],
19
- push_tokens: [&quot;PUSH_TOKEN&quot;]
20
- )
21
- ```
22
-