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
@@ -1,267 +0,0 @@
1
- # Client::TrackIdentifyApi
2
-
3
- All URIs are relative to *https://a.klaviyo.com/api*
4
-
5
- | Method | HTTP request | Description |
6
- | ------ | ------------ | ----------- |
7
- | [**identify_get**](TrackIdentifyApi.md#identify_get) | **GET** /identify | Identify Profile (Legacy) |
8
- | [**identify_post**](TrackIdentifyApi.md#identify_post) | **POST** /identify | Identify Profile |
9
- | [**track_get**](TrackIdentifyApi.md#track_get) | **GET** /track | Track Profile Activity (Legacy) |
10
- | [**track_post**](TrackIdentifyApi.md#track_post) | **POST** /track | Track Profile Activity |
11
-
12
-
13
- ## identify_get
14
-
15
- > String identify_get(data)
16
-
17
- Identify Profile (Legacy)
18
-
19
- This endpoint is also used to identify a profile and update its properties without an associated event. It takes as input the same payload as the above POST request, but as a base64-encoded string passed as a query parameter. NOTE: This is offered for backwards compatibility; we recommend all new implementations use the POST approach above. **EXAMPLE:** ``` { \"token\": \"PUBLIC_KEY\", \"properties\": { \"$email\": \"abraham.lincoln@klaviyo.com\", \"$first_name\": \"Abraham\", \"$last_name\": \"Lincoln\", \"$city\": \"Springfield\", \"$region\": \"Illinois\" } } ``` Gets encoded into the following string, which is passed into the `data` parameter: `eyJ0b2tlbiI6ICJQVUJMSUNfS0VZIiwicHJvcGVydGllcyI6IHsiJGVtYWlsIjogImFicmFoYW0ubGluY29sbkBrbGF2aXlvLmNvbSIsIiRmaXJzdF9uYW1lIjogIkFicmFoYW0iLCIkbGFzdF9uYW1lIjogIkxpbmNvbG4iLCIkY2l0eSI6ICJTcHJpbmdmaWVsZCIsIiRyZWdpb24iOiAiSWxsaW5vaXMifX0K`
20
-
21
- ### Examples
22
-
23
- ```ruby
24
- require 'time'
25
- require 'klaviyo_sdk'
26
-
27
- api_instance = Client::TrackIdentifyApi.new
28
- data = 'BASE_64_STRING' # String | String representation of base64 encoded JSON object
29
-
30
- begin
31
- # Identify Profile (Legacy)
32
- result = api_instance.identify_get(data)
33
- p result
34
- rescue Client::ApiError => e
35
- puts "Error when calling TrackIdentifyApi->identify_get: #{e}"
36
- end
37
- ```
38
-
39
- #### Using the identify_get_with_http_info variant
40
-
41
- This returns an Array which contains the response data, status code and headers.
42
-
43
- > <Array(String, Integer, Hash)> identify_get_with_http_info(data)
44
-
45
- ```ruby
46
- begin
47
- # Identify Profile (Legacy)
48
- data, status_code, headers = api_instance.identify_get_with_http_info(data)
49
- p status_code # => 2xx
50
- p headers # => { ... }
51
- p data # => String
52
- rescue Client::ApiError => e
53
- puts "Error when calling TrackIdentifyApi->identify_get_with_http_info: #{e}"
54
- end
55
- ```
56
-
57
- ### Parameters
58
-
59
- | Name | Type | Description | Notes |
60
- | ---- | ---- | ----------- | ----- |
61
- | **data** | **String** | String representation of base64 encoded JSON object | [default to &#39;BASE_64_STRING&#39;] |
62
-
63
- ### Return type
64
-
65
- **String**
66
-
67
- ### Authorization
68
-
69
- No authorization required
70
-
71
- ### HTTP request headers
72
-
73
- - **Content-Type**: Not defined
74
- - **Accept**: text/html
75
-
76
-
77
- ## identify_post
78
-
79
- > String identify_post(data)
80
-
81
- Identify Profile
82
-
83
- This endpoint is used to track and update properties about an individual without tracking an associated event. The following data is stored in a JSON object. **JSON OBJECT STRUCTURE:** __token: *string*__ This is your public API key. __properties: *JSON Object or null*__ Properties of the profile to track/update. You must identify the person by their email using a $email key (or by their phone number using a `$phone_number` key if you have SMS-only contacts). Other than that, you can include any data you want and it can then be used to create segments of people. For example, if you wanted to create a list of people on trial plans, include a person's plan type in this JSON object so you can use that information later. **SPECIAL FIELDS:** The Klaviyo CRM has the following special fields you can set for customer **properties** with the **Identify** endpoint, to unlock additional functionality: **$email:** _string_ **$first_name:** _string_ **$last_name:** _string_ **$phone_number:** _string; eg: \"+13239169023\"_ **$city:** _string_ **$region:** _string; state, or other region_ **$country:** _string_ **$zip:** _string_ **$image:** _string; url to a photo of a person_ **$consent:** _list of strings; eg: ['sms', 'email', 'web', 'directmail', 'mobile']_ **EXAMPLE:** ``` { \"token\": \"PUBLIC_KEY\", \"properties\": { \"$email\": \"abraham.lincoln@klaviyo.com\", \"$first_name\": \"Abraham\", \"$last_name\": \"Lincoln\", \"$city\": \"Springfield\", \"$region\": \"Illinois\" } }
84
-
85
- ### Examples
86
-
87
- ```ruby
88
- require 'time'
89
- require 'klaviyo_sdk'
90
-
91
- api_instance = Client::TrackIdentifyApi.new
92
- data = 'data_example' # String |
93
-
94
- begin
95
- # Identify Profile
96
- result = api_instance.identify_post(data)
97
- p result
98
- rescue Client::ApiError => e
99
- puts "Error when calling TrackIdentifyApi->identify_post: #{e}"
100
- end
101
- ```
102
-
103
- #### Using the identify_post_with_http_info variant
104
-
105
- This returns an Array which contains the response data, status code and headers.
106
-
107
- > <Array(String, Integer, Hash)> identify_post_with_http_info(data)
108
-
109
- ```ruby
110
- begin
111
- # Identify Profile
112
- data, status_code, headers = api_instance.identify_post_with_http_info(data)
113
- p status_code # => 2xx
114
- p headers # => { ... }
115
- p data # => String
116
- rescue Client::ApiError => e
117
- puts "Error when calling TrackIdentifyApi->identify_post_with_http_info: #{e}"
118
- end
119
- ```
120
-
121
- ### Parameters
122
-
123
- | Name | Type | Description | Notes |
124
- | ---- | ---- | ----------- | ----- |
125
- | **data** | **String** | | [default to &#39;{\&quot;token\&quot;: \&quot;PUBLIC_KEY\&quot;,\&quot;properties\&quot;: {\&quot;$email\&quot;:\&quot;ben.franklin@klaviyo.com\&quot;}}&#39;] |
126
-
127
- ### Return type
128
-
129
- **String**
130
-
131
- ### Authorization
132
-
133
- No authorization required
134
-
135
- ### HTTP request headers
136
-
137
- - **Content-Type**: application/x-www-form-urlencoded
138
- - **Accept**: text/html
139
-
140
-
141
- ## track_get
142
-
143
- > String track_get(data)
144
-
145
- Track Profile Activity (Legacy)
146
-
147
- This endpoint is also used to track a profile's activity. It takes as input the same payload as the above POST request, but as a base64-encoded string passed as a query parameter. NOTE: This is offered for backwards compatibility; we recommend all new implementations use the POST approach above. **EXAMPLE:** ``` { \"token\": \"PUBLIC_KEY\", \"event\": \"Ordered Product\", \"customer_properties\": { \"$email\": \"abraham.lincoln@klaviyo.com\" }, \"properties\": { \"item_name\": \"Boots\", \"$value\": 100 } } ``` Gets encoded into the following string, which is passed into the `data` parameter: `eyJ0b2tlbiI6ICJQVUJMSUNfS0VZIiwiZXZlbnQiOiAiT3JkZXJlZEl0ZW0iLCJjdXN0b21lcl9wcm9wZXJ0aWVzIjogeyIkZW1haWwiOiAiYWJyYWhhbS5saW5jb2xuQGtsYXZpeW8uY29tIn0sInByb3BlcnRpZXMiOiB7Iml0ZW1fbmFtZSI6ICJCb290cyIsIiR2YWx1ZSI6IDEwMH19`
148
-
149
- ### Examples
150
-
151
- ```ruby
152
- require 'time'
153
- require 'klaviyo_sdk'
154
-
155
- api_instance = Client::TrackIdentifyApi.new
156
- data = 'BASE_64_STRING' # String | String representation of base64 encoded JSON object
157
-
158
- begin
159
- # Track Profile Activity (Legacy)
160
- result = api_instance.track_get(data)
161
- p result
162
- rescue Client::ApiError => e
163
- puts "Error when calling TrackIdentifyApi->track_get: #{e}"
164
- end
165
- ```
166
-
167
- #### Using the track_get_with_http_info variant
168
-
169
- This returns an Array which contains the response data, status code and headers.
170
-
171
- > <Array(String, Integer, Hash)> track_get_with_http_info(data)
172
-
173
- ```ruby
174
- begin
175
- # Track Profile Activity (Legacy)
176
- data, status_code, headers = api_instance.track_get_with_http_info(data)
177
- p status_code # => 2xx
178
- p headers # => { ... }
179
- p data # => String
180
- rescue Client::ApiError => e
181
- puts "Error when calling TrackIdentifyApi->track_get_with_http_info: #{e}"
182
- end
183
- ```
184
-
185
- ### Parameters
186
-
187
- | Name | Type | Description | Notes |
188
- | ---- | ---- | ----------- | ----- |
189
- | **data** | **String** | String representation of base64 encoded JSON object | [default to &#39;BASE_64_STRING&#39;] |
190
-
191
- ### Return type
192
-
193
- **String**
194
-
195
- ### Authorization
196
-
197
- No authorization required
198
-
199
- ### HTTP request headers
200
-
201
- - **Content-Type**: Not defined
202
- - **Accept**: text/html
203
-
204
-
205
- ## track_post
206
-
207
- > String track_post(data)
208
-
209
- Track Profile Activity
210
-
211
- This endpoint is used to track a profile's activity. The following data is encoded in a JSON object. NOTE: an account can have up to 200 unique metrics (event types). This endpoint can accept payloads up to approximately 1MB. **JSON OBJECT STRUCTURE:** __token: *string*__ This is your public API key. __event: *string*__ Name of the event you want to track. __customer_properties: *JSON Object or null*__ Properties of the profile that triggered this event. You must identify the person by their email using a $email key (or by their phone number using a `$phone_number` key if you have SMS-only contacts). Other than that, you can include any data you want and it can then be used to create segments of people. For example, if you wanted to create a list of people on trial plans, include a person's plan type in this JSON object so you can use that information later. __properties: *optional; JSON Object or null*__ Properties of this event. Any properties included here can be used for creating segments later For example, if you track an event called \"Ordered Product\" you could include a property for item type (e.g. image, article, etc.), size, etc. __time: *optional; 10-digit UNIX timestamp or null*__ When this event occurred. By default, Klaviyo assumes events happen when a request is made. If you'd like to track an event that happened in past, use this property. **SPECIAL FIELDS:** The Klaviyo CRM has the following special fields you can set for **customer_properties** with the **Track** endpoint, to unlock additional functionality: **$email:** _string_ **$first_name:** _string_ **$last_name:** _string_ **$phone_number:** _string; eg: \"+13239169023\"_ **$city:** _string_ **$region:** _string; state, or other region_ **$country:** _string_ **$zip:** _string_ **$image:** _string; url to a photo of a person_ **$consent:** _list of strings; eg: ['sms', 'email', 'web', 'directmail', 'mobile']_ You can also set the following special fields in event **properties** with the **Track** endpoint: **$event_id:** _a unique identifier for an event_ **$value:** _a numeric value to associate with this event (e.g. the dollar value of a purchase)_ **EXAMPLE:** ``` { \"token\": \"PUBLIC_KEY\", \"event\": \"Ordered Product\", \"customer_properties\": { \"$email\": \"abraham.lincoln@klaviyo.com\" }, \"properties\": { \"item_name\": \"Boots\", \"$value\": 100 } }
212
-
213
- ### Examples
214
-
215
- ```ruby
216
- require 'time'
217
- require 'klaviyo_sdk'
218
-
219
- api_instance = Client::TrackIdentifyApi.new
220
- data = 'data_example' # String |
221
-
222
- begin
223
- # Track Profile Activity
224
- result = api_instance.track_post(data)
225
- p result
226
- rescue Client::ApiError => e
227
- puts "Error when calling TrackIdentifyApi->track_post: #{e}"
228
- end
229
- ```
230
-
231
- #### Using the track_post_with_http_info variant
232
-
233
- This returns an Array which contains the response data, status code and headers.
234
-
235
- > <Array(String, Integer, Hash)> track_post_with_http_info(data)
236
-
237
- ```ruby
238
- begin
239
- # Track Profile Activity
240
- data, status_code, headers = api_instance.track_post_with_http_info(data)
241
- p status_code # => 2xx
242
- p headers # => { ... }
243
- p data # => String
244
- rescue Client::ApiError => e
245
- puts "Error when calling TrackIdentifyApi->track_post_with_http_info: #{e}"
246
- end
247
- ```
248
-
249
- ### Parameters
250
-
251
- | Name | Type | Description | Notes |
252
- | ---- | ---- | ----------- | ----- |
253
- | **data** | **String** | | [default to &#39;{\&quot;token\&quot;: \&quot;PUBLIC_KEY\&quot;, \&quot;event\&quot;: \&quot;Ordered Product\&quot;, \&quot;customer_properties\&quot;: {\&quot;$email\&quot;: \&quot;abraham.lincoln@klaviyo.com\&quot;}, \&quot;properties\&quot;: {\&quot;item_name\&quot;: \&quot;Boots\&quot;,\&quot;$value\&quot;: 100}}&#39;] |
254
-
255
- ### Return type
256
-
257
- **String**
258
-
259
- ### Authorization
260
-
261
- No authorization required
262
-
263
- ### HTTP request headers
264
-
265
- - **Content-Type**: application/x-www-form-urlencoded
266
- - **Accept**: text/html
267
-
data/docs/TrackPayload.md DELETED
@@ -1,24 +0,0 @@
1
- # Client::TrackPayload
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **token** | **String** | | |
8
- | **customer_properties** | [**TrackPayloadCustomerProperties**](TrackPayloadCustomerProperties.md) | | |
9
- | **properties** | [**TrackPayloadProperties**](TrackPayloadProperties.md) | | |
10
- | **time** | [**OneOfstringinteger**](OneOfstringinteger.md) | | [optional] |
11
-
12
- ## Example
13
-
14
- ```ruby
15
- require 'klaviyo_sdk'
16
-
17
- instance = Client::TrackPayload.new(
18
- token: null,
19
- customer_properties: null,
20
- properties: null,
21
- time: null
22
- )
23
- ```
24
-
@@ -1,20 +0,0 @@
1
- # Client::TrackPayloadCustomerProperties
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **_email** | **String** | | [optional] |
8
- | **_phone_number** | **String** | | [optional] |
9
-
10
- ## Example
11
-
12
- ```ruby
13
- require 'klaviyo_sdk'
14
-
15
- instance = Client::TrackPayloadCustomerProperties.new(
16
- _email: null,
17
- _phone_number: null
18
- )
19
- ```
20
-
@@ -1,22 +0,0 @@
1
- # Client::TrackPayloadProperties
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **event_id** | **String** | | [optional] |
8
- | **value** | **String** | | [optional] |
9
- | **your_custom_field** | [**OneOfstringintegernumberbooleanarray**](OneOfstringintegernumberbooleanarray.md) | | [optional] |
10
-
11
- ## Example
12
-
13
- ```ruby
14
- require 'klaviyo_sdk'
15
-
16
- instance = Client::TrackPayloadProperties.new(
17
- event_id: null,
18
- value: null,
19
- your_custom_field: null
20
- )
21
- ```
22
-
data/git_push.sh DELETED
@@ -1,57 +0,0 @@
1
- #!/bin/sh
2
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
- #
4
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
-
6
- git_user_id=$1
7
- git_repo_id=$2
8
- release_note=$3
9
- git_host=$4
10
-
11
- if [ "$git_host" = "" ]; then
12
- git_host="github.com"
13
- echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
- fi
15
-
16
- if [ "$git_user_id" = "" ]; then
17
- git_user_id="GIT_USER_ID"
18
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
- fi
20
-
21
- if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="GIT_REPO_ID"
23
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
- fi
25
-
26
- if [ "$release_note" = "" ]; then
27
- release_note="Minor update"
28
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
- fi
30
-
31
- # Initialize the local directory as a Git repository
32
- git init
33
-
34
- # Adds the files in the local repository and stages them for commit.
35
- git add .
36
-
37
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
- git commit -m "$release_note"
39
-
40
- # Sets the new remote
41
- git_remote=$(git remote)
42
- if [ "$git_remote" = "" ]; then # git remote not defined
43
-
44
- if [ "$GIT_TOKEN" = "" ]; then
45
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
- git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
- else
48
- git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
- fi
50
-
51
- fi
52
-
53
- git pull origin master
54
-
55
- # Pushes (Forces) the changes in the local repository up to the remote repository
56
- echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
- git push origin master 2>&1 | grep -v 'To https'
Binary file
@@ -1,165 +0,0 @@
1
- =begin
2
- #Klaviyo API
3
-
4
- #Empowering creators to own their destiny
5
-
6
- The version of the OpenAPI document: 2022.03.29
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Client::CampaignsApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'CampaignsApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Client::CampaignsApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of CampaignsApi' do
30
- it 'should create an instance of CampaignsApi' do
31
- expect(@api_instance).to be_instance_of(Client::CampaignsApi)
32
- end
33
- end
34
-
35
- # unit tests for cancel_campaign
36
- # Cancel a Campaign
37
- # Cancels a campaign send. Marks a campaign as cancelled regardless of it&#39;s current status.
38
- # @param campaign_id
39
- # @param [Hash] opts the optional parameters
40
- # @return [Campaign]
41
- describe 'cancel_campaign test' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- # unit tests for clone_campaign
48
- # Clone a Campaign
49
- # Creates a copy of a campaign. The new campaign starts as a draft.
50
- # @param campaign_id
51
- # @param name The name for the new campaign. All other properties of the campaign will remain the same. Note, the template for the new campaign will be cloned from the existing template so changes to the existing campaign&#39;s content will not alter the content of the new campaign.
52
- # @param list_id The list you will send the campaign to.
53
- # @param [Hash] opts the optional parameters
54
- # @return [Campaign]
55
- describe 'clone_campaign test' do
56
- it 'should work' do
57
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
- end
59
- end
60
-
61
- # unit tests for create_campaign
62
- # Create New Campaign
63
- # Creates a new campaign. The created campaign is a draft and is not automatically sent.
64
- # @param list_id The list you will send the campaign to.
65
- # @param template_id The template that will define the content of the page. Note: the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.
66
- # @param from_email The email address your email will be sent from and will be used in the &#x60;reply-to&#x60; header.
67
- # @param from_name The name or label associated with the email address you&#39;re sending from.
68
- # @param subject The email subject of the campaign
69
- # @param [Hash] opts the optional parameters
70
- # @option opts [String] :name If not specified, this will default to the subject of the campaign.
71
- # @option opts [Boolean] :use_smart_sending If set, limits the number of emails sent to an individual within a short period. Valid values are &#x60;true&#x60; and &#x60;false&#x60;. If not specified, defaults to &#x60;true&#x60;.
72
- # @option opts [Boolean] :add_google_analytics If specified, adds Google Analytics tracking tags to links. Valid values are &#x60;true&#x60; and &#x60;false&#x60;. If not specified, defaults to &#x60;false&#x60;.
73
- # @return [Campaign]
74
- describe 'create_campaign test' do
75
- it 'should work' do
76
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
77
- end
78
- end
79
-
80
- # unit tests for get_campaign_info
81
- # Get Campaign Info
82
- # Returns summary information for the campaign specified.
83
- # @param campaign_id
84
- # @param [Hash] opts the optional parameters
85
- # @return [Campaign]
86
- describe 'get_campaign_info test' do
87
- it 'should work' do
88
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
89
- end
90
- end
91
-
92
- # unit tests for get_campaign_recipients
93
- # Get Campaign Recipients
94
- # Returns summary information about email recipients for the campaign specified that includes each recipients email, customer ID, and status.
95
- # @param campaign_id
96
- # @param [Hash] opts the optional parameters
97
- # @option opts [Integer] :count For pagination, the number of results to return. Max &#x3D; 25,000
98
- # @option opts [String] :sort Sort order to apply to results, either ascending or descending. Valid values are &#x60;asc&#x60; or &#x60;desc&#x60;. Defaults to &#x60;asc&#x60;.
99
- # @option opts [String] :offset For pagination, if a response to this endpoint includes a &#x60;next_offset&#x60;, use that value to get the next page of recipients.
100
- # @return [Hash<String, Object>]
101
- describe 'get_campaign_recipients test' do
102
- it 'should work' do
103
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
- end
105
- end
106
-
107
- # unit tests for get_campaigns
108
- # Get Campaigns
109
- # Returns a list of all the campaigns you&#39;ve created. The campaigns are returned in reverse sorted order by the time they were created.
110
- # @param [Hash] opts the optional parameters
111
- # @option opts [Integer] :page For pagination, which page of results to return. Default &#x3D; 0
112
- # @option opts [Integer] :count For pagination, the number of results to return. Max &#x3D; 100
113
- # @return [Hash<String, Object>]
114
- describe 'get_campaigns test' do
115
- it 'should work' do
116
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
117
- end
118
- end
119
-
120
- # unit tests for schedule_campaign
121
- # Schedule a Campaign
122
- # Schedules a campaign for a time in the future
123
- # @param campaign_id
124
- # @param send_time A timestamp of the format &#x60;%Y-%m-%d %H:%M:%S&#x60; in the UTC timezone. Ex: &#x60;2022-01-13 00:00:00&#x60;
125
- # @param [Hash] opts the optional parameters
126
- # @return [Hash<String, Object>]
127
- describe 'schedule_campaign test' do
128
- it 'should work' do
129
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
130
- end
131
- end
132
-
133
- # unit tests for send_campaign
134
- # Send a Campaign Immediately
135
- # Queues a campaign for immediate delivery
136
- # @param campaign_id
137
- # @param [Hash] opts the optional parameters
138
- # @return [Hash<String, Object>]
139
- describe 'send_campaign test' do
140
- it 'should work' do
141
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
142
- end
143
- end
144
-
145
- # unit tests for update_campaign
146
- # Update Campaign
147
- # Updates details of a campaign. You can update a campaign&#39;s name, subject, from email address, from name, template or list.
148
- # @param campaign_id
149
- # @param [Hash] opts the optional parameters
150
- # @option opts [String] :list_id The list you will send the campaign to.
151
- # @option opts [String] :template_id The ID of the Email Template object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign.
152
- # @option opts [String] :from_email The email address your email will be sent from and will be used in the reply-to header.
153
- # @option opts [String] :from_name The name or label associated with the email address you&#39;re sending from.
154
- # @option opts [String] :subject The email subject of the campaign
155
- # @option opts [String] :name A name for this campaign. If not specified, this will default to the subject of the campaign.
156
- # @option opts [Boolean] :use_smart_sending If set, limits the number of emails sent to an individual within a short period. Campaigns initially default to &#x60;true&#x60;.
157
- # @option opts [Boolean] :add_google_analytics If specified, adds Google Analytics tracking tags to links. Campaigns initially default to &#x60;false&#x60;.
158
- # @return [Campaign]
159
- describe 'update_campaign test' do
160
- it 'should work' do
161
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
162
- end
163
- end
164
-
165
- end
@@ -1,47 +0,0 @@
1
- =begin
2
- #Klaviyo API
3
-
4
- #Empowering creators to own their destiny
5
-
6
- The version of the OpenAPI document: 2022.03.29
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Client::DataPrivacyApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'DataPrivacyApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Client::DataPrivacyApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of DataPrivacyApi' do
30
- it 'should create an instance of DataPrivacyApi' do
31
- expect(@api_instance).to be_instance_of(Client::DataPrivacyApi)
32
- end
33
- end
34
-
35
- # unit tests for request_deletion
36
- # Request a Deletion
37
- # 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: &#x60;email&#x60;, &#x60;phone_number&#x60;, &#x60;or person_id&#x60;, along with the associated &#x60;string&#x60; value. Examples: Email: &#x60;{\&quot;email\&quot;:\&quot;abraham.lincoln@klaviyo.com\&quot;}&#x60; Phone Number: &#x60;{\&quot;phone_number\&quot;:\&quot;+13239169023\&quot;}&#x60; Person ID: &#x60;{\&quot;person_id\&quot;:\&quot;PERSON_ID\&quot;}&#x60;
38
- # @param [Hash] opts the optional parameters
39
- # @option opts [String] :body
40
- # @return [String]
41
- describe 'request_deletion test' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end