ultracart_api 4.1.231 → 4.1.233

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +72 -2
  3. data/docs/ItemContentMultimedia.md +2 -0
  4. data/docs/SfvbApi.md +1660 -162
  5. data/docs/SfvbApprovalCreateRequest.md +8 -0
  6. data/docs/SfvbCampaign.md +4 -0
  7. data/docs/SfvbCampaignWriteRequest.md +2 -0
  8. data/docs/SfvbCommsBranchStat.md +20 -0
  9. data/docs/SfvbCommsChange.md +22 -0
  10. data/docs/SfvbCommsClick.md +20 -0
  11. data/docs/SfvbCommsClicksResponse.md +26 -0
  12. data/docs/SfvbCommsDailyStat.md +30 -0
  13. data/docs/SfvbCommsDashboardResponse.md +24 -0
  14. data/docs/SfvbCommsDashboardRow.md +28 -0
  15. data/docs/SfvbCommsLookupOwner.md +26 -0
  16. data/docs/SfvbCommsLookupResponse.md +34 -0
  17. data/docs/SfvbCommsPlan.md +66 -0
  18. data/docs/SfvbCommsPlanResponse.md +20 -0
  19. data/docs/SfvbCommsProvider.md +28 -0
  20. data/docs/SfvbCommsProviderImportRequest.md +22 -0
  21. data/docs/SfvbCommsProviderImportResponse.md +26 -0
  22. data/docs/SfvbCommsProviderList.md +20 -0
  23. data/docs/SfvbCommsProvidersResponse.md +22 -0
  24. data/docs/SfvbCommsRulerValidateRequest.md +18 -0
  25. data/docs/SfvbCommsRulerValidateResponse.md +22 -0
  26. data/docs/SfvbCommsSender.md +24 -0
  27. data/docs/SfvbCommsSenderUpdate.md +22 -0
  28. data/docs/SfvbCommsSequenceFolder.md +28 -0
  29. data/docs/SfvbCommsSequenceFolderResponse.md +22 -0
  30. data/docs/SfvbCommsSequenceFoldersResponse.md +18 -0
  31. data/docs/SfvbCommsSequenceStatsResponse.md +26 -0
  32. data/docs/SfvbCommsSettings.md +34 -0
  33. data/docs/SfvbCommsSettingsResponse.md +24 -0
  34. data/docs/SfvbCommsSettingsUpdateRequest.md +26 -0
  35. data/docs/SfvbCommsStat.md +54 -0
  36. data/docs/SfvbCommsStepStat.md +34 -0
  37. data/docs/SfvbCommsTemplate.md +30 -0
  38. data/docs/SfvbCommsTemplateResponse.md +30 -0
  39. data/docs/SfvbCommsTemplatesResponse.md +20 -0
  40. data/docs/SfvbCommsTestEmailRequest.md +24 -0
  41. data/docs/SfvbCommsTestPostcardRequest.md +36 -0
  42. data/docs/SfvbCommsTestSendResponse.md +32 -0
  43. data/docs/SfvbCommsTestSmsRequest.md +18 -0
  44. data/docs/SfvbCommsUnreferencedEmail.md +30 -0
  45. data/docs/SfvbCommsUnreferencedPostcard.md +24 -0
  46. data/docs/SfvbCommsUnreferencedResponse.md +32 -0
  47. data/docs/SfvbEmail.md +8 -0
  48. data/docs/SfvbFlow.md +4 -0
  49. data/docs/SfvbFlowBackfillRequest.md +24 -0
  50. data/docs/SfvbFlowBackfillResponse.md +38 -0
  51. data/docs/SfvbFlowWriteRequest.md +2 -0
  52. data/docs/SfvbStepCounts.md +1 -1
  53. data/lib/ultracart_api/api/sfvb_api.rb +2356 -348
  54. data/lib/ultracart_api/models/item_content_multimedia.rb +11 -1
  55. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +39 -3
  56. data/lib/ultracart_api/models/sfvb_campaign.rb +21 -1
  57. data/lib/ultracart_api/models/sfvb_campaign_write_request.rb +11 -1
  58. data/lib/ultracart_api/models/sfvb_comms_branch_stat.rb +229 -0
  59. data/lib/ultracart_api/models/sfvb_comms_change.rb +240 -0
  60. data/lib/ultracart_api/models/sfvb_comms_click.rb +230 -0
  61. data/lib/ultracart_api/models/sfvb_comms_clicks_response.rb +264 -0
  62. data/lib/ultracart_api/models/sfvb_comms_daily_stat.rb +280 -0
  63. data/lib/ultracart_api/models/sfvb_comms_dashboard_response.rb +256 -0
  64. data/lib/ultracart_api/models/sfvb_comms_dashboard_row.rb +269 -0
  65. data/lib/ultracart_api/models/sfvb_comms_lookup_owner.rb +260 -0
  66. data/lib/ultracart_api/models/sfvb_comms_lookup_response.rb +301 -0
  67. data/lib/ultracart_api/models/sfvb_comms_plan.rb +460 -0
  68. data/lib/ultracart_api/models/sfvb_comms_plan_response.rb +231 -0
  69. data/lib/ultracart_api/models/sfvb_comms_provider.rb +272 -0
  70. data/lib/ultracart_api/models/sfvb_comms_provider_import_request.rb +242 -0
  71. data/lib/ultracart_api/models/sfvb_comms_provider_import_response.rb +264 -0
  72. data/lib/ultracart_api/models/sfvb_comms_provider_list.rb +230 -0
  73. data/lib/ultracart_api/models/sfvb_comms_providers_response.rb +244 -0
  74. data/lib/ultracart_api/models/sfvb_comms_ruler_validate_request.rb +220 -0
  75. data/lib/ultracart_api/models/sfvb_comms_ruler_validate_response.rb +242 -0
  76. data/lib/ultracart_api/models/sfvb_comms_sender.rb +250 -0
  77. data/lib/ultracart_api/models/sfvb_comms_sender_update.rb +240 -0
  78. data/lib/ultracart_api/models/sfvb_comms_sequence_folder.rb +270 -0
  79. data/lib/ultracart_api/models/sfvb_comms_sequence_folder_response.rb +243 -0
  80. data/lib/ultracart_api/models/sfvb_comms_sequence_folders_response.rb +222 -0
  81. data/lib/ultracart_api/models/sfvb_comms_sequence_stats_response.rb +263 -0
  82. data/lib/ultracart_api/models/sfvb_comms_settings.rb +297 -0
  83. data/lib/ultracart_api/models/sfvb_comms_settings_response.rb +253 -0
  84. data/lib/ultracart_api/models/sfvb_comms_settings_update_request.rb +257 -0
  85. data/lib/ultracart_api/models/sfvb_comms_stat.rb +402 -0
  86. data/lib/ultracart_api/models/sfvb_comms_step_stat.rb +301 -0
  87. data/lib/ultracart_api/models/sfvb_comms_template.rb +280 -0
  88. data/lib/ultracart_api/models/sfvb_comms_template_response.rb +281 -0
  89. data/lib/ultracart_api/models/sfvb_comms_templates_response.rb +234 -0
  90. data/lib/ultracart_api/models/sfvb_comms_test_email_request.rb +252 -0
  91. data/lib/ultracart_api/models/sfvb_comms_test_postcard_request.rb +312 -0
  92. data/lib/ultracart_api/models/sfvb_comms_test_send_response.rb +292 -0
  93. data/lib/ultracart_api/models/sfvb_comms_test_sms_request.rb +220 -0
  94. data/lib/ultracart_api/models/sfvb_comms_unreferenced_email.rb +280 -0
  95. data/lib/ultracart_api/models/sfvb_comms_unreferenced_postcard.rb +250 -0
  96. data/lib/ultracart_api/models/sfvb_comms_unreferenced_response.rb +296 -0
  97. data/lib/ultracart_api/models/sfvb_email.rb +41 -1
  98. data/lib/ultracart_api/models/sfvb_flow.rb +21 -1
  99. data/lib/ultracart_api/models/sfvb_flow_backfill_request.rb +250 -0
  100. data/lib/ultracart_api/models/sfvb_flow_backfill_response.rb +322 -0
  101. data/lib/ultracart_api/models/sfvb_flow_write_request.rb +11 -1
  102. data/lib/ultracart_api/models/sfvb_step_counts.rb +1 -1
  103. data/lib/ultracart_api/version.rb +1 -1
  104. data/lib/ultracart_api.rb +41 -0
  105. metadata +84 -2
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ItemContentMultimedia
18
+ # AI generated alt text for the image. StoreFront uses this when description is empty.
19
+ attr_accessor :ai_alt_text
20
+
18
21
  # URL where the image can be downloaded from the cloud
19
22
  attr_accessor :cloud_url
20
23
 
@@ -88,6 +91,7 @@ module UltracartClient
88
91
  # Attribute mapping from ruby-style variable name to JSON key.
89
92
  def self.attribute_map
90
93
  {
94
+ :'ai_alt_text' => :'ai_alt_text',
91
95
  :'cloud_url' => :'cloud_url',
92
96
  :'cloud_url_expiration' => :'cloud_url_expiration',
93
97
  :'code' => :'code',
@@ -115,6 +119,7 @@ module UltracartClient
115
119
  # Attribute type mapping.
116
120
  def self.openapi_types
117
121
  {
122
+ :'ai_alt_text' => :'String',
118
123
  :'cloud_url' => :'String',
119
124
  :'cloud_url_expiration' => :'String',
120
125
  :'code' => :'String',
@@ -155,6 +160,10 @@ module UltracartClient
155
160
  h[k.to_sym] = v
156
161
  }
157
162
 
163
+ if attributes.key?(:'ai_alt_text')
164
+ self.ai_alt_text = attributes[:'ai_alt_text']
165
+ end
166
+
158
167
  if attributes.key?(:'cloud_url')
159
168
  self.cloud_url = attributes[:'cloud_url']
160
169
  end
@@ -297,6 +306,7 @@ module UltracartClient
297
306
  def ==(o)
298
307
  return true if self.equal?(o)
299
308
  self.class == o.class &&
309
+ ai_alt_text == o.ai_alt_text &&
300
310
  cloud_url == o.cloud_url &&
301
311
  cloud_url_expiration == o.cloud_url_expiration &&
302
312
  code == o.code &&
@@ -324,7 +334,7 @@ module UltracartClient
324
334
  # Calculates hash code according to all attributes.
325
335
  # @return [Integer] Hash code
326
336
  def hash
327
- [cloud_url, cloud_url_expiration, code, description, exclude_from_gallery, file_name, height, merchant_item_multimedia_oid, orphan, placeholder, size, temp_multimedia_oid, thumbnails, type, url, width].hash
337
+ [ai_alt_text, cloud_url, cloud_url_expiration, code, description, exclude_from_gallery, file_name, height, merchant_item_multimedia_oid, orphan, placeholder, size, temp_multimedia_oid, thumbnails, type, url, width].hash
328
338
  end
329
339
 
330
340
  # Builds the object from hash
@@ -20,11 +20,17 @@ module UltracartClient
20
20
 
21
21
  attr_accessor :affiliate_network
22
22
 
23
+ attr_accessor :comms_list_import
24
+
25
+ attr_accessor :comms_settings
26
+
23
27
  # For a file.put_script write, the exact script to be written, at most 256 KB. For tracking_html.put, the exact HTML the write will send, at most 256 KB. UltraCart reviews it and keeps only its hash, so send the same bytes again on the write. Leave it out for a revert, which names params.version.
24
28
  attr_accessor :content
25
29
 
26
30
  attr_accessor :experiment_start
27
31
 
32
+ attr_accessor :flow_backfill
33
+
28
34
  # For item.attribute_batch, exactly the rows the batch will send - the dry run's change rows, each with merchant_item_oid and current_sha256. UltraCart keeps only their hash.
29
35
  attr_accessor :item_attribute_rows
30
36
 
@@ -32,6 +38,8 @@ module UltracartClient
32
38
 
33
39
  attr_accessor :params
34
40
 
41
+ attr_accessor :postcard_test_mail
42
+
35
43
  # Why the agent wants to do this, in a sentence. Shown to the person as unverified text, capped at 500 characters.
36
44
  attr_accessor :reason
37
45
 
@@ -75,11 +83,15 @@ module UltracartClient
75
83
  {
76
84
  :'action' => :'action',
77
85
  :'affiliate_network' => :'affiliate_network',
86
+ :'comms_list_import' => :'comms_list_import',
87
+ :'comms_settings' => :'comms_settings',
78
88
  :'content' => :'content',
79
89
  :'experiment_start' => :'experiment_start',
90
+ :'flow_backfill' => :'flow_backfill',
80
91
  :'item_attribute_rows' => :'item_attribute_rows',
81
92
  :'item_pricing' => :'item_pricing',
82
93
  :'params' => :'params',
94
+ :'postcard_test_mail' => :'postcard_test_mail',
83
95
  :'reason' => :'reason',
84
96
  :'redirect_rows' => :'redirect_rows',
85
97
  :'segment_update' => :'segment_update',
@@ -100,11 +112,15 @@ module UltracartClient
100
112
  {
101
113
  :'action' => :'String',
102
114
  :'affiliate_network' => :'SfvbAffiliateNetworkRequest',
115
+ :'comms_list_import' => :'SfvbCommsProviderImportRequest',
116
+ :'comms_settings' => :'SfvbCommsSettingsUpdateRequest',
103
117
  :'content' => :'String',
104
118
  :'experiment_start' => :'SfvbExperimentStartRequest',
119
+ :'flow_backfill' => :'SfvbFlowBackfillRequest',
105
120
  :'item_attribute_rows' => :'Array<SfvbItemAttributeBatchRow>',
106
121
  :'item_pricing' => :'SfvbItemPricingRequest',
107
122
  :'params' => :'SfvbApprovalParams',
123
+ :'postcard_test_mail' => :'SfvbCommsTestPostcardRequest',
108
124
  :'reason' => :'String',
109
125
  :'redirect_rows' => :'Array<SfvbRedirectDeleteRow>',
110
126
  :'segment_update' => :'SfvbCommsSegmentWriteRequest',
@@ -144,6 +160,14 @@ module UltracartClient
144
160
  self.affiliate_network = attributes[:'affiliate_network']
145
161
  end
146
162
 
163
+ if attributes.key?(:'comms_list_import')
164
+ self.comms_list_import = attributes[:'comms_list_import']
165
+ end
166
+
167
+ if attributes.key?(:'comms_settings')
168
+ self.comms_settings = attributes[:'comms_settings']
169
+ end
170
+
147
171
  if attributes.key?(:'content')
148
172
  self.content = attributes[:'content']
149
173
  end
@@ -152,6 +176,10 @@ module UltracartClient
152
176
  self.experiment_start = attributes[:'experiment_start']
153
177
  end
154
178
 
179
+ if attributes.key?(:'flow_backfill')
180
+ self.flow_backfill = attributes[:'flow_backfill']
181
+ end
182
+
155
183
  if attributes.key?(:'item_attribute_rows')
156
184
  if (value = attributes[:'item_attribute_rows']).is_a?(Array)
157
185
  self.item_attribute_rows = value
@@ -166,6 +194,10 @@ module UltracartClient
166
194
  self.params = attributes[:'params']
167
195
  end
168
196
 
197
+ if attributes.key?(:'postcard_test_mail')
198
+ self.postcard_test_mail = attributes[:'postcard_test_mail']
199
+ end
200
+
169
201
  if attributes.key?(:'reason')
170
202
  self.reason = attributes[:'reason']
171
203
  end
@@ -207,7 +239,7 @@ module UltracartClient
207
239
  # Check to see if the all the properties in the model are valid
208
240
  # @return true if the model is valid
209
241
  def valid?
210
- action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update"])
242
+ action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
211
243
  return false unless action_validator.valid?(@action)
212
244
  true
213
245
  end
@@ -215,7 +247,7 @@ module UltracartClient
215
247
  # Custom attribute writer method checking allowed values (enum).
216
248
  # @param [Object] action Object to be assigned
217
249
  def action=(action)
218
- validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update"])
250
+ validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
219
251
  unless validator.valid?(action)
220
252
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
221
253
  end
@@ -229,11 +261,15 @@ module UltracartClient
229
261
  self.class == o.class &&
230
262
  action == o.action &&
231
263
  affiliate_network == o.affiliate_network &&
264
+ comms_list_import == o.comms_list_import &&
265
+ comms_settings == o.comms_settings &&
232
266
  content == o.content &&
233
267
  experiment_start == o.experiment_start &&
268
+ flow_backfill == o.flow_backfill &&
234
269
  item_attribute_rows == o.item_attribute_rows &&
235
270
  item_pricing == o.item_pricing &&
236
271
  params == o.params &&
272
+ postcard_test_mail == o.postcard_test_mail &&
237
273
  reason == o.reason &&
238
274
  redirect_rows == o.redirect_rows &&
239
275
  segment_update == o.segment_update &&
@@ -252,7 +288,7 @@ module UltracartClient
252
288
  # Calculates hash code according to all attributes.
253
289
  # @return [Integer] Hash code
254
290
  def hash
255
- [action, affiliate_network, content, experiment_start, item_attribute_rows, item_pricing, params, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
291
+ [action, affiliate_network, comms_list_import, comms_settings, content, experiment_start, flow_backfill, item_attribute_rows, item_pricing, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
256
292
  end
257
293
 
258
294
  # Builds the object from hash
@@ -36,6 +36,12 @@ module UltracartClient
36
36
  # True when a customer leaves the campaign once they buy from any source.
37
37
  attr_accessor :end_once_customer_purchases_anywhere
38
38
 
39
+ # That folder's name.
40
+ attr_accessor :folder_name
41
+
42
+ # The campaign folder it is filed in, or none.
43
+ attr_accessor :folder_uuid
44
+
39
45
  # Send this as If-Match when changing or archiving the campaign.
40
46
  attr_accessor :hash_sha256
41
47
 
@@ -85,6 +91,8 @@ module UltracartClient
85
91
  :'emails' => :'emails',
86
92
  :'end_once_customer_purchases' => :'end_once_customer_purchases',
87
93
  :'end_once_customer_purchases_anywhere' => :'end_once_customer_purchases_anywhere',
94
+ :'folder_name' => :'folder_name',
95
+ :'folder_uuid' => :'folder_uuid',
88
96
  :'hash_sha256' => :'hash_sha256',
89
97
  :'live' => :'live',
90
98
  :'memberships' => :'memberships',
@@ -116,6 +124,8 @@ module UltracartClient
116
124
  :'emails' => :'Array<SfvbCommsEmail>',
117
125
  :'end_once_customer_purchases' => :'Boolean',
118
126
  :'end_once_customer_purchases_anywhere' => :'Boolean',
127
+ :'folder_name' => :'String',
128
+ :'folder_uuid' => :'String',
119
129
  :'hash_sha256' => :'String',
120
130
  :'live' => :'Boolean',
121
131
  :'memberships' => :'Array<SfvbCampaignMembership>',
@@ -183,6 +193,14 @@ module UltracartClient
183
193
  self.end_once_customer_purchases_anywhere = attributes[:'end_once_customer_purchases_anywhere']
184
194
  end
185
195
 
196
+ if attributes.key?(:'folder_name')
197
+ self.folder_name = attributes[:'folder_name']
198
+ end
199
+
200
+ if attributes.key?(:'folder_uuid')
201
+ self.folder_uuid = attributes[:'folder_uuid']
202
+ end
203
+
186
204
  if attributes.key?(:'hash_sha256')
187
205
  self.hash_sha256 = attributes[:'hash_sha256']
188
206
  end
@@ -267,6 +285,8 @@ module UltracartClient
267
285
  emails == o.emails &&
268
286
  end_once_customer_purchases == o.end_once_customer_purchases &&
269
287
  end_once_customer_purchases_anywhere == o.end_once_customer_purchases_anywhere &&
288
+ folder_name == o.folder_name &&
289
+ folder_uuid == o.folder_uuid &&
270
290
  hash_sha256 == o.hash_sha256 &&
271
291
  live == o.live &&
272
292
  memberships == o.memberships &&
@@ -291,7 +311,7 @@ module UltracartClient
291
311
  # Calculates hash code according to all attributes.
292
312
  # @return [Integer] Hash code
293
313
  def hash
294
- [campaign_uuid, communication_sequence_uuid, created_dts, deleted, emails, end_once_customer_purchases, end_once_customer_purchases_anywhere, hash_sha256, live, memberships, name, notes, postcards, scheduled_dts, sending_domain_uuid, sending_name, sending_user, sms_phone_number, status, status_dts].hash
314
+ [campaign_uuid, communication_sequence_uuid, created_dts, deleted, emails, end_once_customer_purchases, end_once_customer_purchases_anywhere, folder_name, folder_uuid, hash_sha256, live, memberships, name, notes, postcards, scheduled_dts, sending_domain_uuid, sending_name, sending_user, sms_phone_number, status, status_dts].hash
295
315
  end
296
316
 
297
317
  # Builds the object from hash
@@ -21,6 +21,9 @@ module UltracartClient
21
21
  # True to end the campaign for a customer once they buy from any source.
22
22
  attr_accessor :end_once_customer_purchases_anywhere
23
23
 
24
+ # File it in this campaign folder. An empty value takes it out of its folder.
25
+ attr_accessor :folder_uuid
26
+
24
27
  # The lists and segments it sends to or leaves out. Replaces the whole set. An empty array clears it.
25
28
  attr_accessor :memberships
26
29
 
@@ -44,6 +47,7 @@ module UltracartClient
44
47
  {
45
48
  :'end_once_customer_purchases' => :'end_once_customer_purchases',
46
49
  :'end_once_customer_purchases_anywhere' => :'end_once_customer_purchases_anywhere',
50
+ :'folder_uuid' => :'folder_uuid',
47
51
  :'memberships' => :'memberships',
48
52
  :'name' => :'name',
49
53
  :'scheduled_dts' => :'scheduled_dts',
@@ -63,6 +67,7 @@ module UltracartClient
63
67
  {
64
68
  :'end_once_customer_purchases' => :'Boolean',
65
69
  :'end_once_customer_purchases_anywhere' => :'Boolean',
70
+ :'folder_uuid' => :'String',
66
71
  :'memberships' => :'Array<SfvbCampaignMembership>',
67
72
  :'name' => :'String',
68
73
  :'scheduled_dts' => :'String',
@@ -101,6 +106,10 @@ module UltracartClient
101
106
  self.end_once_customer_purchases_anywhere = attributes[:'end_once_customer_purchases_anywhere']
102
107
  end
103
108
 
109
+ if attributes.key?(:'folder_uuid')
110
+ self.folder_uuid = attributes[:'folder_uuid']
111
+ end
112
+
104
113
  if attributes.key?(:'memberships')
105
114
  if (value = attributes[:'memberships']).is_a?(Array)
106
115
  self.memberships = value
@@ -148,6 +157,7 @@ module UltracartClient
148
157
  self.class == o.class &&
149
158
  end_once_customer_purchases == o.end_once_customer_purchases &&
150
159
  end_once_customer_purchases_anywhere == o.end_once_customer_purchases_anywhere &&
160
+ folder_uuid == o.folder_uuid &&
151
161
  memberships == o.memberships &&
152
162
  name == o.name &&
153
163
  scheduled_dts == o.scheduled_dts &&
@@ -165,7 +175,7 @@ module UltracartClient
165
175
  # Calculates hash code according to all attributes.
166
176
  # @return [Integer] Hash code
167
177
  def hash
168
- [end_once_customer_purchases, end_once_customer_purchases_anywhere, memberships, name, scheduled_dts, sending_domain_uuid, sending_name, sending_user].hash
178
+ [end_once_customer_purchases, end_once_customer_purchases_anywhere, folder_uuid, memberships, name, scheduled_dts, sending_domain_uuid, sending_name, sending_user].hash
169
179
  end
170
180
 
171
181
  # Builds the object from hash
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbCommsBranchStat
18
+ # The side, as the admin names it (yes or no, left or right).
19
+ attr_accessor :label
20
+
21
+ attr_accessor :stats
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'label' => :'label',
27
+ :'stats' => :'stats'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'label' => :'String',
40
+ :'stats' => :'SfvbCommsStat'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsBranchStat` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsBranchStat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'label')
66
+ self.label = attributes[:'label']
67
+ end
68
+
69
+ if attributes.key?(:'stats')
70
+ self.stats = attributes[:'stats']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ label == o.label &&
93
+ stats == o.stats
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [label, stats].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ self.class.openapi_types.each_pair do |key, type|
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
123
+ self.send("#{key}=", nil)
124
+ elsif type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :Time
145
+ Time.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ # models (e.g. Pet) or oneOf
176
+ klass = UltracartClient.const_get(type)
177
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+
229
+ end