klaviyo_sdk 1.0.0.20220329 → 1.0.3.20220329

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +10 -0
  4. data/README.md +99 -99
  5. data/Rakefile +10 -0
  6. data/docs/Campaign.md +38 -0
  7. data/docs/CampaignsApi.md +707 -0
  8. data/docs/CheckMembershipRequest.md +22 -0
  9. data/docs/DataPrivacyApi.md +81 -0
  10. data/docs/DeleteEmail.md +18 -0
  11. data/docs/DeletePerson.md +18 -0
  12. data/docs/DeletePhone.md +18 -0
  13. data/docs/DeprecatedGetListResponse.md +30 -0
  14. data/docs/DeprecatedGetListResponseData.md +28 -0
  15. data/docs/GlobalExclusionResponseData.md +30 -0
  16. data/docs/IdentifyPayload.md +20 -0
  17. data/docs/IdentifyPayloadProperties.md +42 -0
  18. data/docs/InlineObject.md +18 -0
  19. data/docs/InlineObject3.md +18 -0
  20. data/docs/InlineObject4.md +18 -0
  21. data/docs/InlineObject5.md +22 -0
  22. data/docs/ListsSegmentsApi.md +1198 -0
  23. data/docs/Metric.md +28 -0
  24. data/docs/MetricExport.md +32 -0
  25. data/docs/MetricTimeline.md +24 -0
  26. data/docs/MetricTimelineData.md +34 -0
  27. data/docs/MetricsApi.md +329 -0
  28. data/docs/Person.md +56 -0
  29. data/docs/PrivacyEmail.md +18 -0
  30. data/docs/PrivacyId.md +18 -0
  31. data/docs/PrivacyPhone.md +18 -0
  32. data/docs/ProfilesApi.md +391 -0
  33. data/docs/RenderedTemplate.md +24 -0
  34. data/docs/Template.md +30 -0
  35. data/docs/TemplatesApi.md +541 -0
  36. data/docs/TrackIdentifyApi.md +267 -0
  37. data/docs/TrackPayload.md +24 -0
  38. data/docs/TrackPayloadCustomerProperties.md +20 -0
  39. data/docs/TrackPayloadProperties.md +22 -0
  40. data/git_push.sh +57 -0
  41. data/klaviyo_sdk-1.0.3.2022.03.29.gem +0 -0
  42. data/klaviyo_sdk.gemspec +6 -1
  43. data/lib/klaviyo_sdk/api/campaigns_api.rb +1 -1
  44. data/lib/klaviyo_sdk/api/data_privacy_api.rb +1 -1
  45. data/lib/klaviyo_sdk/api/lists_segments_api.rb +1 -1
  46. data/lib/klaviyo_sdk/api/metrics_api.rb +1 -1
  47. data/lib/klaviyo_sdk/api/profiles_api.rb +1 -1
  48. data/lib/klaviyo_sdk/api/templates_api.rb +1 -1
  49. data/lib/klaviyo_sdk/api/track_identify_api.rb +1 -1
  50. data/lib/klaviyo_sdk/api_client.rb +2 -2
  51. data/lib/klaviyo_sdk/api_error.rb +1 -1
  52. data/lib/klaviyo_sdk/configuration.rb +1 -1
  53. data/lib/klaviyo_sdk/models/campaign.rb +4 -4
  54. data/lib/klaviyo_sdk/models/check_membership_request.rb +4 -4
  55. data/lib/klaviyo_sdk/models/delete_email.rb +4 -4
  56. data/lib/klaviyo_sdk/models/delete_person.rb +4 -4
  57. data/lib/klaviyo_sdk/models/delete_phone.rb +4 -4
  58. data/lib/klaviyo_sdk/models/deprecated_get_list_response.rb +4 -4
  59. data/lib/klaviyo_sdk/models/deprecated_get_list_response_data.rb +4 -4
  60. data/lib/klaviyo_sdk/models/global_exclusion_response_data.rb +4 -4
  61. data/lib/klaviyo_sdk/models/identify_payload.rb +4 -4
  62. data/lib/klaviyo_sdk/models/identify_payload_properties.rb +4 -4
  63. data/lib/klaviyo_sdk/models/inline_object.rb +9 -4
  64. data/lib/klaviyo_sdk/models/inline_object3.rb +4 -4
  65. data/lib/klaviyo_sdk/models/inline_object4.rb +4 -4
  66. data/lib/klaviyo_sdk/models/inline_object5.rb +4 -4
  67. data/lib/klaviyo_sdk/models/metric.rb +4 -4
  68. data/lib/klaviyo_sdk/models/metric_export.rb +4 -4
  69. data/lib/klaviyo_sdk/models/metric_timeline.rb +4 -4
  70. data/lib/klaviyo_sdk/models/metric_timeline_data.rb +4 -4
  71. data/lib/klaviyo_sdk/models/person.rb +4 -4
  72. data/lib/klaviyo_sdk/models/person.rb.bak +4 -4
  73. data/lib/klaviyo_sdk/models/privacy_email.rb +4 -4
  74. data/lib/klaviyo_sdk/models/privacy_id.rb +4 -4
  75. data/lib/klaviyo_sdk/models/privacy_phone.rb +4 -4
  76. data/lib/klaviyo_sdk/models/rendered_template.rb +4 -4
  77. data/lib/klaviyo_sdk/models/template.rb +4 -4
  78. data/lib/klaviyo_sdk/models/track_payload.rb +4 -4
  79. data/lib/klaviyo_sdk/models/track_payload_customer_properties.rb +4 -4
  80. data/lib/klaviyo_sdk/models/track_payload_properties.rb +4 -4
  81. data/lib/klaviyo_sdk/version.rb +1 -1
  82. data/lib/klaviyo_sdk.rb +7 -7
  83. data/spec/api/campaigns_api_spec.rb +165 -0
  84. data/spec/api/data_privacy_api_spec.rb +47 -0
  85. data/spec/api/lists_segments_api_spec.rb +239 -0
  86. data/spec/api/metrics_api_spec.rb +96 -0
  87. data/spec/api/profiles_api_spec.rb +103 -0
  88. data/spec/api/templates_api_spec.rb +130 -0
  89. data/spec/api/track_identify_api_spec.rb +83 -0
  90. data/spec/api_client_spec.rb +226 -0
  91. data/spec/configuration_spec.rb +42 -0
  92. data/spec/models/campaign_spec.rb +94 -0
  93. data/spec/models/check_membership_request_spec.rb +46 -0
  94. data/spec/models/delete_email_spec.rb +34 -0
  95. data/spec/models/delete_person_spec.rb +34 -0
  96. data/spec/models/delete_phone_spec.rb +34 -0
  97. data/spec/models/deprecated_get_list_response_data_spec.rb +64 -0
  98. data/spec/models/deprecated_get_list_response_spec.rb +70 -0
  99. data/spec/models/global_exclusion_response_data_spec.rb +70 -0
  100. data/spec/models/identify_payload_properties_spec.rb +106 -0
  101. data/spec/models/identify_payload_spec.rb +40 -0
  102. data/spec/models/inline_object3_spec.rb +34 -0
  103. data/spec/models/inline_object4_spec.rb +34 -0
  104. data/spec/models/inline_object5_spec.rb +46 -0
  105. data/spec/models/inline_object_spec.rb +34 -0
  106. data/spec/models/metric_export_spec.rb +76 -0
  107. data/spec/models/metric_spec.rb +64 -0
  108. data/spec/models/metric_timeline_data_spec.rb +82 -0
  109. data/spec/models/metric_timeline_spec.rb +52 -0
  110. data/spec/models/person_spec.rb +148 -0
  111. data/spec/models/privacy_email_spec.rb +34 -0
  112. data/spec/models/privacy_id_spec.rb +34 -0
  113. data/spec/models/privacy_phone_spec.rb +34 -0
  114. data/spec/models/rendered_template_spec.rb +52 -0
  115. data/spec/models/template_spec.rb +70 -0
  116. data/spec/models/track_payload_customer_properties_spec.rb +40 -0
  117. data/spec/models/track_payload_properties_spec.rb +46 -0
  118. data/spec/models/track_payload_spec.rb +52 -0
  119. data/spec/spec_helper.rb +111 -0
  120. metadata +80 -3
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class PrivacyPhone
18
18
  attr_accessor :phone_number
19
19
 
@@ -46,13 +46,13 @@ module Client
46
46
  # @param [Hash] attributes Model attributes in the form of hash
47
47
  def initialize(attributes = {})
48
48
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::PrivacyPhone` initialize method"
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::PrivacyPhone` initialize method"
50
50
  end
51
51
 
52
52
  # check to see if the attribute exists and convert string to symbol for hash key
53
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
54
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::PrivacyPhone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::PrivacyPhone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
56
  end
57
57
  h[k.to_sym] = v
58
58
  }
@@ -162,7 +162,7 @@ module Client
162
162
  end
163
163
  else # model
164
164
  # models (e.g. Pet) or oneOf
165
- klass = Client.const_get(type)
165
+ klass = Klaviyo.const_get(type)
166
166
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
167
  end
168
168
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class RenderedTemplate
18
18
  attr_accessor :object
19
19
 
@@ -58,13 +58,13 @@ module Client
58
58
  # @param [Hash] attributes Model attributes in the form of hash
59
59
  def initialize(attributes = {})
60
60
  if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::RenderedTemplate` initialize method"
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::RenderedTemplate` initialize method"
62
62
  end
63
63
 
64
64
  # check to see if the attribute exists and convert string to symbol for hash key
65
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
66
  if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::RenderedTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::RenderedTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
68
  end
69
69
  h[k.to_sym] = v
70
70
  }
@@ -191,7 +191,7 @@ module Client
191
191
  end
192
192
  else # model
193
193
  # models (e.g. Pet) or oneOf
194
- klass = Client.const_get(type)
194
+ klass = Klaviyo.const_get(type)
195
195
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
196
  end
197
197
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class Template
18
18
  attr_accessor :object
19
19
 
@@ -70,13 +70,13 @@ module Client
70
70
  # @param [Hash] attributes Model attributes in the form of hash
71
71
  def initialize(attributes = {})
72
72
  if (!attributes.is_a?(Hash))
73
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::Template` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::Template` initialize method"
74
74
  end
75
75
 
76
76
  # check to see if the attribute exists and convert string to symbol for hash key
77
77
  attributes = attributes.each_with_object({}) { |(k, v), h|
78
78
  if (!self.class.attribute_map.key?(k.to_sym))
79
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::Template`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::Template`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
80
  end
81
81
  h[k.to_sym] = v
82
82
  }
@@ -216,7 +216,7 @@ module Client
216
216
  end
217
217
  else # model
218
218
  # models (e.g. Pet) or oneOf
219
- klass = Client.const_get(type)
219
+ klass = Klaviyo.const_get(type)
220
220
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
221
221
  end
222
222
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class TrackPayload
18
18
  attr_accessor :token
19
19
 
@@ -59,13 +59,13 @@ module Client
59
59
  # @param [Hash] attributes Model attributes in the form of hash
60
60
  def initialize(attributes = {})
61
61
  if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::TrackPayload` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayload` initialize method"
63
63
  end
64
64
 
65
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
66
  attributes = attributes.each_with_object({}) { |(k, v), h|
67
67
  if (!self.class.attribute_map.key?(k.to_sym))
68
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::TrackPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
69
  end
70
70
  h[k.to_sym] = v
71
71
  }
@@ -205,7 +205,7 @@ module Client
205
205
  end
206
206
  else # model
207
207
  # models (e.g. Pet) or oneOf
208
- klass = Client.const_get(type)
208
+ klass = Klaviyo.const_get(type)
209
209
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
210
210
  end
211
211
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class TrackPayloadCustomerProperties
18
18
  attr_accessor :_email
19
19
 
@@ -50,13 +50,13 @@ module Client
50
50
  # @param [Hash] attributes Model attributes in the form of hash
51
51
  def initialize(attributes = {})
52
52
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::TrackPayloadCustomerProperties` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayloadCustomerProperties` initialize method"
54
54
  end
55
55
 
56
56
  # check to see if the attribute exists and convert string to symbol for hash key
57
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
58
  if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::TrackPayloadCustomerProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayloadCustomerProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
60
  end
61
61
  h[k.to_sym] = v
62
62
  }
@@ -171,7 +171,7 @@ module Client
171
171
  end
172
172
  else # model
173
173
  # models (e.g. Pet) or oneOf
174
- klass = Client.const_get(type)
174
+ klass = Klaviyo.const_get(type)
175
175
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
176
  end
177
177
  end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
13
13
  require 'date'
14
14
  require 'time'
15
15
 
16
- module Client
16
+ module Klaviyo
17
17
  class TrackPayloadProperties
18
18
  attr_accessor :event_id
19
19
 
@@ -55,13 +55,13 @@ module Client
55
55
  # @param [Hash] attributes Model attributes in the form of hash
56
56
  def initialize(attributes = {})
57
57
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Client::TrackPayloadProperties` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayloadProperties` initialize method"
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
63
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `Client::TrackPayloadProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayloadProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
65
  end
66
66
  h[k.to_sym] = v
67
67
  }
@@ -181,7 +181,7 @@ module Client
181
181
  end
182
182
  else # model
183
183
  # models (e.g. Pet) or oneOf
184
- klass = Client.const_get(type)
184
+ klass = Klaviyo.const_get(type)
185
185
  klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
186
  end
187
187
  end
@@ -10,6 +10,6 @@ OpenAPI Generator version: 5.4.0
10
10
 
11
11
  =end
12
12
 
13
- module Client
13
+ module Klaviyo
14
14
  VERSION = '1.0.0'
15
15
  end
data/lib/klaviyo_sdk.rb CHANGED
@@ -57,12 +57,12 @@ require 'klaviyo_sdk/api/track_identify_api'
57
57
  # retry logic
58
58
  require 'retriable'
59
59
 
60
- module Client
60
+ module Klaviyo
61
61
  @is_initialized = false
62
62
 
63
63
  class << self
64
64
  # Customize default settings for the SDK using block.
65
- # Client.configure do |config|
65
+ # Klaviyo.configure do |config|
66
66
  # config.username = "xxx"
67
67
  # config.password = "xxx"
68
68
  # end
@@ -85,8 +85,8 @@ module Client
85
85
  self.constants.each do |c|
86
86
  if c[-3..-1] == "Api"
87
87
  attributes = [:attr1]
88
- wrapper_class = Client.const_set(c[0..-4], Struct.new(*attributes))
89
- original_class = Client.const_get(c)
88
+ wrapper_class = Klaviyo.const_set(c[0..-4], Struct.new(*attributes))
89
+ original_class = Klaviyo.const_get(c)
90
90
 
91
91
  # recreate methods
92
92
  original_class.public_instance_methods(false).each do |m|
@@ -103,14 +103,14 @@ module Client
103
103
  c.tries = max_retries
104
104
  c.max_elapsed_time = max_delay
105
105
  c.on = {
106
- Client::ApiError => [/400/, /503/, /504/]
106
+ Klaviyo::ApiError => [/429/, /503/, /504/]
107
107
  }
108
108
  end
109
109
  Retriable.retriable do
110
- Client.const_get(c).new.send(m, *arg)
110
+ Klaviyo.const_get(c).new.send(m, *arg)
111
111
  end
112
112
  else
113
- Client.const_get(c).new.send(m, *arg)
113
+ Klaviyo.const_get(c).new.send(m, *arg)
114
114
  end
115
115
  end
116
116
  }
@@ -0,0 +1,165 @@
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 Klaviyo::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 = Klaviyo::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(Klaviyo::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
@@ -0,0 +1,47 @@
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 Klaviyo::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 = Klaviyo::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(Klaviyo::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