ultracart_api 4.1.216 → 4.1.218

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.
@@ -2182,6 +2182,92 @@ module UltracartClient
2182
2182
  return data, status_code, headers
2183
2183
  end
2184
2184
 
2185
+ # Remove one step
2186
+ # Removes the step from its list and links the step before it to the step after it, in one transaction. An email, experiment or postcard step's email or postcard is archived with it. Refused while any customer is waiting on the step, for the begin, end, continue and merge markers, for a condition, split or inboxgeek step with steps on a side, and for a step whose email a resend step re-sends. Send the step's hash_sha256 as If-Match. A sequence whose campaign or flow is live needs sfvb_publish and an approved sequence_step.delete approval (Approval-Id); a draft or inactive one needs neither. An email or postcard another step still uses is left as it is.
2187
+ # @param storefront_oid [Integer]
2188
+ # @param sequence_uuid [String]
2189
+ # @param step_uuid [String]
2190
+ # @param if_match [String] The step's hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
2191
+ # @param [Hash] opts the optional parameters
2192
+ # @option opts [String] :approval_id When the sequence is live, the approval_id of an approved sequence_step.delete request for this step. See POST /sfvb/approvals.
2193
+ # @return [SfvbSequenceStepDeleteResponse]
2194
+ def delete_sfvb_sequence_step(storefront_oid, sequence_uuid, step_uuid, if_match, opts = {})
2195
+ data, _status_code, _headers = delete_sfvb_sequence_step_with_http_info(storefront_oid, sequence_uuid, step_uuid, if_match, opts)
2196
+ data
2197
+ end
2198
+
2199
+ # Remove one step
2200
+ # Removes the step from its list and links the step before it to the step after it, in one transaction. An email, experiment or postcard step's email or postcard is archived with it. Refused while any customer is waiting on the step, for the begin, end, continue and merge markers, for a condition, split or inboxgeek step with steps on a side, and for a step whose email a resend step re-sends. Send the step's hash_sha256 as If-Match. A sequence whose campaign or flow is live needs sfvb_publish and an approved sequence_step.delete approval (Approval-Id); a draft or inactive one needs neither. An email or postcard another step still uses is left as it is.
2201
+ # @param storefront_oid [Integer]
2202
+ # @param sequence_uuid [String]
2203
+ # @param step_uuid [String]
2204
+ # @param if_match [String] The step's hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
2205
+ # @param [Hash] opts the optional parameters
2206
+ # @option opts [String] :approval_id When the sequence is live, the approval_id of an approved sequence_step.delete request for this step. See POST /sfvb/approvals.
2207
+ # @return [Array<(SfvbSequenceStepDeleteResponse, Integer, Hash)>] SfvbSequenceStepDeleteResponse data, response status code and response headers
2208
+ def delete_sfvb_sequence_step_with_http_info(storefront_oid, sequence_uuid, step_uuid, if_match, opts = {})
2209
+ if @api_client.config.debugging
2210
+ @api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_sequence_step ...'
2211
+ end
2212
+ # verify the required parameter 'storefront_oid' is set
2213
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2214
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_sequence_step"
2215
+ end
2216
+ # verify the required parameter 'sequence_uuid' is set
2217
+ if @api_client.config.client_side_validation && sequence_uuid.nil?
2218
+ fail ArgumentError, "Missing the required parameter 'sequence_uuid' when calling SfvbApi.delete_sfvb_sequence_step"
2219
+ end
2220
+ # verify the required parameter 'step_uuid' is set
2221
+ if @api_client.config.client_side_validation && step_uuid.nil?
2222
+ fail ArgumentError, "Missing the required parameter 'step_uuid' when calling SfvbApi.delete_sfvb_sequence_step"
2223
+ end
2224
+ # verify the required parameter 'if_match' is set
2225
+ if @api_client.config.client_side_validation && if_match.nil?
2226
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.delete_sfvb_sequence_step"
2227
+ end
2228
+ # resource path
2229
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/sequences/{sequence_uuid}/steps/{step_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'sequence_uuid' + '}', CGI.escape(sequence_uuid.to_s)).sub('{' + 'step_uuid' + '}', CGI.escape(step_uuid.to_s))
2230
+
2231
+ # query parameters
2232
+ query_params = opts[:query_params] || {}
2233
+
2234
+ # header parameters
2235
+ header_params = opts[:header_params] || {}
2236
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2237
+ # HTTP header 'Accept' (if needed)
2238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2239
+ header_params[:'If-Match'] = if_match
2240
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
2241
+
2242
+ # form parameters
2243
+ form_params = opts[:form_params] || {}
2244
+
2245
+ # http body (model)
2246
+ post_body = opts[:debug_body]
2247
+
2248
+ # return_type
2249
+ return_type = opts[:debug_return_type] || 'SfvbSequenceStepDeleteResponse'
2250
+
2251
+ # auth_names
2252
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2253
+
2254
+ new_options = opts.merge(
2255
+ :operation => :"SfvbApi.delete_sfvb_sequence_step",
2256
+ :header_params => header_params,
2257
+ :query_params => query_params,
2258
+ :form_params => form_params,
2259
+ :body => post_body,
2260
+ :auth_names => auth_names,
2261
+ :return_type => return_type
2262
+ )
2263
+
2264
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2265
+ if @api_client.config.debugging
2266
+ @api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_sequence_step\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2267
+ end
2268
+ return data, status_code, headers
2269
+ end
2270
+
2185
2271
  # Detach an image from a blog post
2186
2272
  # Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
2187
2273
  # @param storefront_oid [Integer]
@@ -3861,6 +3947,76 @@ module UltracartClient
3861
3947
  return data, status_code, headers
3862
3948
  end
3863
3949
 
3950
+ # Read one segment, with its rule
3951
+ # The segment's name, folder, rule, member count at its last rebuild, whether a rebuild is still due, and the campaigns and flows that use it, each with whether it is live. hash_sha256 is the If-Match for an update. Never its members, its Facebook audience, its ranking or its third party sync settings.
3952
+ # @param storefront_oid [Integer]
3953
+ # @param segment_uuid [String]
3954
+ # @param [Hash] opts the optional parameters
3955
+ # @return [SfvbCommsSegmentResponse]
3956
+ def get_sfvb_comms_segment(storefront_oid, segment_uuid, opts = {})
3957
+ data, _status_code, _headers = get_sfvb_comms_segment_with_http_info(storefront_oid, segment_uuid, opts)
3958
+ data
3959
+ end
3960
+
3961
+ # Read one segment, with its rule
3962
+ # The segment&#39;s name, folder, rule, member count at its last rebuild, whether a rebuild is still due, and the campaigns and flows that use it, each with whether it is live. hash_sha256 is the If-Match for an update. Never its members, its Facebook audience, its ranking or its third party sync settings.
3963
+ # @param storefront_oid [Integer]
3964
+ # @param segment_uuid [String]
3965
+ # @param [Hash] opts the optional parameters
3966
+ # @return [Array<(SfvbCommsSegmentResponse, Integer, Hash)>] SfvbCommsSegmentResponse data, response status code and response headers
3967
+ def get_sfvb_comms_segment_with_http_info(storefront_oid, segment_uuid, opts = {})
3968
+ if @api_client.config.debugging
3969
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_comms_segment ...'
3970
+ end
3971
+ # verify the required parameter 'storefront_oid' is set
3972
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3973
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_comms_segment"
3974
+ end
3975
+ # verify the required parameter 'segment_uuid' is set
3976
+ if @api_client.config.client_side_validation && segment_uuid.nil?
3977
+ fail ArgumentError, "Missing the required parameter 'segment_uuid' when calling SfvbApi.get_sfvb_comms_segment"
3978
+ end
3979
+ # resource path
3980
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/segments/{segment_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'segment_uuid' + '}', CGI.escape(segment_uuid.to_s))
3981
+
3982
+ # query parameters
3983
+ query_params = opts[:query_params] || {}
3984
+
3985
+ # header parameters
3986
+ header_params = opts[:header_params] || {}
3987
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3988
+ # HTTP header 'Accept' (if needed)
3989
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3990
+
3991
+ # form parameters
3992
+ form_params = opts[:form_params] || {}
3993
+
3994
+ # http body (model)
3995
+ post_body = opts[:debug_body]
3996
+
3997
+ # return_type
3998
+ return_type = opts[:debug_return_type] || 'SfvbCommsSegmentResponse'
3999
+
4000
+ # auth_names
4001
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4002
+
4003
+ new_options = opts.merge(
4004
+ :operation => :"SfvbApi.get_sfvb_comms_segment",
4005
+ :header_params => header_params,
4006
+ :query_params => query_params,
4007
+ :form_params => form_params,
4008
+ :body => post_body,
4009
+ :auth_names => auth_names,
4010
+ :return_type => return_type
4011
+ )
4012
+
4013
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4014
+ if @api_client.config.debugging
4015
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_comms_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4016
+ end
4017
+ return data, status_code, headers
4018
+ end
4019
+
3864
4020
  # Read a sending domain
3865
4021
  # One sending domain as stored. To check an amazon domain's DNS again, use the status call.
3866
4022
  # @param domain [String]
@@ -8013,6 +8169,81 @@ module UltracartClient
8013
8169
  return data, status_code, headers
8014
8170
  end
8015
8171
 
8172
+ # Create a segment
8173
+ # A new segment with the name, rule and folder given. The rule needs at least one group, each with at least one function of a rule type the segment rebuild knows, and any list or segment it names must be on this storefront. The segment starts empty and rebuilds in the background; member_count is out of date until rebuild_required is false.
8174
+ # @param storefront_oid [Integer]
8175
+ # @param segment_write_request [SfvbCommsSegmentWriteRequest] The new segment&#39;s name, rule and folder
8176
+ # @param [Hash] opts the optional parameters
8177
+ # @return [SfvbCommsSegmentResponse]
8178
+ def insert_sfvb_comms_segment(storefront_oid, segment_write_request, opts = {})
8179
+ data, _status_code, _headers = insert_sfvb_comms_segment_with_http_info(storefront_oid, segment_write_request, opts)
8180
+ data
8181
+ end
8182
+
8183
+ # Create a segment
8184
+ # A new segment with the name, rule and folder given. The rule needs at least one group, each with at least one function of a rule type the segment rebuild knows, and any list or segment it names must be on this storefront. The segment starts empty and rebuilds in the background; member_count is out of date until rebuild_required is false.
8185
+ # @param storefront_oid [Integer]
8186
+ # @param segment_write_request [SfvbCommsSegmentWriteRequest] The new segment&#39;s name, rule and folder
8187
+ # @param [Hash] opts the optional parameters
8188
+ # @return [Array<(SfvbCommsSegmentResponse, Integer, Hash)>] SfvbCommsSegmentResponse data, response status code and response headers
8189
+ def insert_sfvb_comms_segment_with_http_info(storefront_oid, segment_write_request, opts = {})
8190
+ if @api_client.config.debugging
8191
+ @api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_comms_segment ...'
8192
+ end
8193
+ # verify the required parameter 'storefront_oid' is set
8194
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8195
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_comms_segment"
8196
+ end
8197
+ # verify the required parameter 'segment_write_request' is set
8198
+ if @api_client.config.client_side_validation && segment_write_request.nil?
8199
+ fail ArgumentError, "Missing the required parameter 'segment_write_request' when calling SfvbApi.insert_sfvb_comms_segment"
8200
+ end
8201
+ # resource path
8202
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/segments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
8203
+
8204
+ # query parameters
8205
+ query_params = opts[:query_params] || {}
8206
+
8207
+ # header parameters
8208
+ header_params = opts[:header_params] || {}
8209
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8210
+ # HTTP header 'Accept' (if needed)
8211
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8212
+ # HTTP header 'Content-Type'
8213
+ content_type = @api_client.select_header_content_type(['application/json'])
8214
+ if !content_type.nil?
8215
+ header_params['Content-Type'] = content_type
8216
+ end
8217
+
8218
+ # form parameters
8219
+ form_params = opts[:form_params] || {}
8220
+
8221
+ # http body (model)
8222
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(segment_write_request)
8223
+
8224
+ # return_type
8225
+ return_type = opts[:debug_return_type] || 'SfvbCommsSegmentResponse'
8226
+
8227
+ # auth_names
8228
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8229
+
8230
+ new_options = opts.merge(
8231
+ :operation => :"SfvbApi.insert_sfvb_comms_segment",
8232
+ :header_params => header_params,
8233
+ :query_params => query_params,
8234
+ :form_params => form_params,
8235
+ :body => post_body,
8236
+ :auth_names => auth_names,
8237
+ :return_type => return_type
8238
+ )
8239
+
8240
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
8241
+ if @api_client.config.debugging
8242
+ @api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_comms_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8243
+ end
8244
+ return data, status_code, headers
8245
+ end
8246
+
8016
8247
  # Add a sending domain
8017
8248
  # Adds a domain to send email from. An amazon domain starts verification with Amazon SES and returns the DNS records to publish; the person signed in also gets them by email. A mailgun domain needs mailgun_api_key as a secret handle made for the domain (POST secrets, sink mailgun.domain.api_key), never the key itself. UltraCart sets up its webhooks on the Mailgun domain with the key; if Mailgun refuses, nothing is saved and the handle is given back unused.
8018
8249
  # @param sending_domain [SfvbCommsSendingDomain] The sending domain
@@ -8371,10 +8602,10 @@ module UltracartClient
8371
8602
  end
8372
8603
 
8373
8604
  # Add an email step, with its new email
8374
- # Creates a new email with the subject and preview text and adds the email step that sends it, together, so a failure leaves neither. It goes right after after_step_uuid, or first on one side of a condition, split or inboxgeek step (branch_step_uuid with side). Send that step's hash_sha256 as If-Match. The email has no body yet, and gets the content review flags the admin gives a new email here. A sequence whose campaign or flow is live needs sfvb_publish.
8605
+ # Creates a new email with the subject and preview text and adds the email step that sends it, together, so a failure leaves neither. It goes right after after_step_uuid, or first on one side of a condition, split or inboxgeek step (branch_step_uuid with side). Send that step's hash_sha256 as If-Match. A sequence with no steps yet takes neither place and If-Match *, and gets begin and end steps around the email, as the admin's editor adds them. The email has no body yet, and gets the content review flags the admin gives a new email here. A sequence whose campaign or flow is live needs sfvb_publish.
8375
8606
  # @param storefront_oid [Integer]
8376
8607
  # @param sequence_uuid [String]
8377
- # @param if_match [String] The hash_sha256 of the step it goes after, or of the branching step. Required; 428 when absent, 412 when stale.
8608
+ # @param if_match [String] The hash_sha256 of the step it goes after, or of the branching step, or * for the first step of a sequence with no steps. Required; 428 when absent, 412 when stale.
8378
8609
  # @param sequence_step_create_request [SfvbSequenceStepCreateRequest] Where the step goes, and the new email&#39;s subject and preview text
8379
8610
  # @param [Hash] opts the optional parameters
8380
8611
  # @return [SfvbSequenceStepCreateResponse]
@@ -8384,10 +8615,10 @@ module UltracartClient
8384
8615
  end
8385
8616
 
8386
8617
  # Add an email step, with its new email
8387
- # Creates a new email with the subject and preview text and adds the email step that sends it, together, so a failure leaves neither. It goes right after after_step_uuid, or first on one side of a condition, split or inboxgeek step (branch_step_uuid with side). Send that step&#39;s hash_sha256 as If-Match. The email has no body yet, and gets the content review flags the admin gives a new email here. A sequence whose campaign or flow is live needs sfvb_publish.
8618
+ # Creates a new email with the subject and preview text and adds the email step that sends it, together, so a failure leaves neither. It goes right after after_step_uuid, or first on one side of a condition, split or inboxgeek step (branch_step_uuid with side). Send that step&#39;s hash_sha256 as If-Match. A sequence with no steps yet takes neither place and If-Match *, and gets begin and end steps around the email, as the admin&#39;s editor adds them. The email has no body yet, and gets the content review flags the admin gives a new email here. A sequence whose campaign or flow is live needs sfvb_publish.
8388
8619
  # @param storefront_oid [Integer]
8389
8620
  # @param sequence_uuid [String]
8390
- # @param if_match [String] The hash_sha256 of the step it goes after, or of the branching step. Required; 428 when absent, 412 when stale.
8621
+ # @param if_match [String] The hash_sha256 of the step it goes after, or of the branching step, or * for the first step of a sequence with no steps. Required; 428 when absent, 412 when stale.
8391
8622
  # @param sequence_step_create_request [SfvbSequenceStepCreateRequest] Where the step goes, and the new email&#39;s subject and preview text
8392
8623
  # @param [Hash] opts the optional parameters
8393
8624
  # @return [Array<(SfvbSequenceStepCreateResponse, Integer, Hash)>] SfvbSequenceStepCreateResponse data, response status code and response headers
@@ -14123,6 +14354,97 @@ module UltracartClient
14123
14354
  return data, status_code, headers
14124
14355
  end
14125
14356
 
14357
+ # Change a segment's name, rule or folder
14358
+ # A field left out stays as it is. Send the segment's hash_sha256 as If-Match; the change applies only while the name, rule and folder are still what was read. A changed rule is checked as on a create and starts a rebuild. Changing the rule of a segment a live campaign or flow uses needs sfvb_publish and an approved segment.update approval (Approval-Id); a name or folder change, or a segment nothing live uses, needs neither.
14359
+ # @param storefront_oid [Integer]
14360
+ # @param segment_uuid [String]
14361
+ # @param if_match [String] The segment&#39;s hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
14362
+ # @param segment_write_request [SfvbCommsSegmentWriteRequest] The fields to change
14363
+ # @param [Hash] opts the optional parameters
14364
+ # @option opts [String] :approval_id When the rule changes and a live campaign or flow uses the segment, the approval_id of an approved segment.update request for this change. See POST /sfvb/approvals.
14365
+ # @return [SfvbCommsSegmentResponse]
14366
+ def update_sfvb_comms_segment(storefront_oid, segment_uuid, if_match, segment_write_request, opts = {})
14367
+ data, _status_code, _headers = update_sfvb_comms_segment_with_http_info(storefront_oid, segment_uuid, if_match, segment_write_request, opts)
14368
+ data
14369
+ end
14370
+
14371
+ # Change a segment&#39;s name, rule or folder
14372
+ # A field left out stays as it is. Send the segment&#39;s hash_sha256 as If-Match; the change applies only while the name, rule and folder are still what was read. A changed rule is checked as on a create and starts a rebuild. Changing the rule of a segment a live campaign or flow uses needs sfvb_publish and an approved segment.update approval (Approval-Id); a name or folder change, or a segment nothing live uses, needs neither.
14373
+ # @param storefront_oid [Integer]
14374
+ # @param segment_uuid [String]
14375
+ # @param if_match [String] The segment&#39;s hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
14376
+ # @param segment_write_request [SfvbCommsSegmentWriteRequest] The fields to change
14377
+ # @param [Hash] opts the optional parameters
14378
+ # @option opts [String] :approval_id When the rule changes and a live campaign or flow uses the segment, the approval_id of an approved segment.update request for this change. See POST /sfvb/approvals.
14379
+ # @return [Array<(SfvbCommsSegmentResponse, Integer, Hash)>] SfvbCommsSegmentResponse data, response status code and response headers
14380
+ def update_sfvb_comms_segment_with_http_info(storefront_oid, segment_uuid, if_match, segment_write_request, opts = {})
14381
+ if @api_client.config.debugging
14382
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_comms_segment ...'
14383
+ end
14384
+ # verify the required parameter 'storefront_oid' is set
14385
+ if @api_client.config.client_side_validation && storefront_oid.nil?
14386
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_comms_segment"
14387
+ end
14388
+ # verify the required parameter 'segment_uuid' is set
14389
+ if @api_client.config.client_side_validation && segment_uuid.nil?
14390
+ fail ArgumentError, "Missing the required parameter 'segment_uuid' when calling SfvbApi.update_sfvb_comms_segment"
14391
+ end
14392
+ # verify the required parameter 'if_match' is set
14393
+ if @api_client.config.client_side_validation && if_match.nil?
14394
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_comms_segment"
14395
+ end
14396
+ # verify the required parameter 'segment_write_request' is set
14397
+ if @api_client.config.client_side_validation && segment_write_request.nil?
14398
+ fail ArgumentError, "Missing the required parameter 'segment_write_request' when calling SfvbApi.update_sfvb_comms_segment"
14399
+ end
14400
+ # resource path
14401
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/segments/{segment_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'segment_uuid' + '}', CGI.escape(segment_uuid.to_s))
14402
+
14403
+ # query parameters
14404
+ query_params = opts[:query_params] || {}
14405
+
14406
+ # header parameters
14407
+ header_params = opts[:header_params] || {}
14408
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
14409
+ # HTTP header 'Accept' (if needed)
14410
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
14411
+ # HTTP header 'Content-Type'
14412
+ content_type = @api_client.select_header_content_type(['application/json'])
14413
+ if !content_type.nil?
14414
+ header_params['Content-Type'] = content_type
14415
+ end
14416
+ header_params[:'If-Match'] = if_match
14417
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
14418
+
14419
+ # form parameters
14420
+ form_params = opts[:form_params] || {}
14421
+
14422
+ # http body (model)
14423
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(segment_write_request)
14424
+
14425
+ # return_type
14426
+ return_type = opts[:debug_return_type] || 'SfvbCommsSegmentResponse'
14427
+
14428
+ # auth_names
14429
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
14430
+
14431
+ new_options = opts.merge(
14432
+ :operation => :"SfvbApi.update_sfvb_comms_segment",
14433
+ :header_params => header_params,
14434
+ :query_params => query_params,
14435
+ :form_params => form_params,
14436
+ :body => post_body,
14437
+ :auth_names => auth_names,
14438
+ :return_type => return_type
14439
+ )
14440
+
14441
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
14442
+ if @api_client.config.debugging
14443
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_comms_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
14444
+ end
14445
+ return data, status_code, headers
14446
+ end
14447
+
14126
14448
  # Update a sending domain
14127
14449
  # Only a mailgun domain's mailgun_api_key can change. Send it as a secret handle made for the domain to replace it, or as the mask it was read with to keep it. A new key sets up UltraCart's webhooks again with it; if Mailgun refuses, nothing is saved and the handle is given back unused.
14128
14450
  # @param domain [String]
@@ -36,6 +36,8 @@ module UltracartClient
36
36
  # For redirect.delete_batch, exactly the rows the batch delete will send, up to 5,000, each with its hash_sha256. UltraCart keeps only their hash.
37
37
  attr_accessor :redirect_rows
38
38
 
39
+ attr_accessor :segment_update
40
+
39
41
  class EnumAttributeValidator
40
42
  attr_reader :datatype
41
43
  attr_reader :allowable_values
@@ -68,7 +70,8 @@ module UltracartClient
68
70
  :'item_pricing' => :'item_pricing',
69
71
  :'params' => :'params',
70
72
  :'reason' => :'reason',
71
- :'redirect_rows' => :'redirect_rows'
73
+ :'redirect_rows' => :'redirect_rows',
74
+ :'segment_update' => :'segment_update'
72
75
  }
73
76
  end
74
77
 
@@ -87,7 +90,8 @@ module UltracartClient
87
90
  :'item_pricing' => :'SfvbItemPricingRequest',
88
91
  :'params' => :'SfvbApprovalParams',
89
92
  :'reason' => :'String',
90
- :'redirect_rows' => :'Array<SfvbRedirectDeleteRow>'
93
+ :'redirect_rows' => :'Array<SfvbRedirectDeleteRow>',
94
+ :'segment_update' => :'SfvbCommsSegmentWriteRequest'
91
95
  }
92
96
  end
93
97
 
@@ -147,6 +151,10 @@ module UltracartClient
147
151
  self.redirect_rows = value
148
152
  end
149
153
  end
154
+
155
+ if attributes.key?(:'segment_update')
156
+ self.segment_update = attributes[:'segment_update']
157
+ end
150
158
  end
151
159
 
152
160
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -159,7 +167,7 @@ module UltracartClient
159
167
  # Check to see if the all the properties in the model are valid
160
168
  # @return true if the model is valid
161
169
  def valid?
162
- 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"])
170
+ 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", "segment.update"])
163
171
  return false unless action_validator.valid?(@action)
164
172
  true
165
173
  end
@@ -167,7 +175,7 @@ module UltracartClient
167
175
  # Custom attribute writer method checking allowed values (enum).
168
176
  # @param [Object] action Object to be assigned
169
177
  def action=(action)
170
- 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"])
178
+ 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", "segment.update"])
171
179
  unless validator.valid?(action)
172
180
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
173
181
  end
@@ -186,7 +194,8 @@ module UltracartClient
186
194
  item_pricing == o.item_pricing &&
187
195
  params == o.params &&
188
196
  reason == o.reason &&
189
- redirect_rows == o.redirect_rows
197
+ redirect_rows == o.redirect_rows &&
198
+ segment_update == o.segment_update
190
199
  end
191
200
 
192
201
  # @see the `==` method
@@ -198,7 +207,7 @@ module UltracartClient
198
207
  # Calculates hash code according to all attributes.
199
208
  # @return [Integer] Hash code
200
209
  def hash
201
- [action, content, experiment_start, item_attribute_rows, item_pricing, params, reason, redirect_rows].hash
210
+ [action, content, experiment_start, item_attribute_rows, item_pricing, params, reason, redirect_rows, segment_update].hash
202
211
  end
203
212
 
204
213
  # Builds the object from hash
@@ -51,9 +51,18 @@ module UltracartClient
51
51
  # For redirect.delete_batch, how many rules the batch would delete when it was requested. Set by the server.
52
52
  attr_accessor :rule_count
53
53
 
54
+ # The segment whose rule changes, for segment.update.
55
+ attr_accessor :segment_uuid
56
+
57
+ # The communication sequence, for sequence_step.delete.
58
+ attr_accessor :sequence_uuid
59
+
54
60
  # For experiment.start of a page experiment, the page body name. Defaults to body.
55
61
  attr_accessor :slot
56
62
 
63
+ # The step to remove, for sequence_step.delete.
64
+ attr_accessor :step_uuid
65
+
57
66
  # For upsell.enable, what to switch on.
58
67
  attr_accessor :upsell_kind
59
68
 
@@ -106,7 +115,10 @@ module UltracartClient
106
115
  :'request_sha256' => :'request_sha256',
107
116
  :'rows_sha256' => :'rows_sha256',
108
117
  :'rule_count' => :'rule_count',
118
+ :'segment_uuid' => :'segment_uuid',
119
+ :'sequence_uuid' => :'sequence_uuid',
109
120
  :'slot' => :'slot',
121
+ :'step_uuid' => :'step_uuid',
110
122
  :'upsell_kind' => :'upsell_kind',
111
123
  :'upsell_oid' => :'upsell_oid',
112
124
  :'version' => :'version',
@@ -135,7 +147,10 @@ module UltracartClient
135
147
  :'request_sha256' => :'String',
136
148
  :'rows_sha256' => :'String',
137
149
  :'rule_count' => :'Integer',
150
+ :'segment_uuid' => :'String',
151
+ :'sequence_uuid' => :'String',
138
152
  :'slot' => :'String',
153
+ :'step_uuid' => :'String',
139
154
  :'upsell_kind' => :'String',
140
155
  :'upsell_oid' => :'Integer',
141
156
  :'version' => :'Integer',
@@ -215,10 +230,22 @@ module UltracartClient
215
230
  self.rule_count = attributes[:'rule_count']
216
231
  end
217
232
 
233
+ if attributes.key?(:'segment_uuid')
234
+ self.segment_uuid = attributes[:'segment_uuid']
235
+ end
236
+
237
+ if attributes.key?(:'sequence_uuid')
238
+ self.sequence_uuid = attributes[:'sequence_uuid']
239
+ end
240
+
218
241
  if attributes.key?(:'slot')
219
242
  self.slot = attributes[:'slot']
220
243
  end
221
244
 
245
+ if attributes.key?(:'step_uuid')
246
+ self.step_uuid = attributes[:'step_uuid']
247
+ end
248
+
222
249
  if attributes.key?(:'upsell_kind')
223
250
  self.upsell_kind = attributes[:'upsell_kind']
224
251
  end
@@ -282,7 +309,10 @@ module UltracartClient
282
309
  request_sha256 == o.request_sha256 &&
283
310
  rows_sha256 == o.rows_sha256 &&
284
311
  rule_count == o.rule_count &&
312
+ segment_uuid == o.segment_uuid &&
313
+ sequence_uuid == o.sequence_uuid &&
285
314
  slot == o.slot &&
315
+ step_uuid == o.step_uuid &&
286
316
  upsell_kind == o.upsell_kind &&
287
317
  upsell_oid == o.upsell_oid &&
288
318
  version == o.version &&
@@ -299,7 +329,7 @@ module UltracartClient
299
329
  # Calculates hash code according to all attributes.
300
330
  # @return [Integer] Hash code
301
331
  def hash
302
- [attribute_names, blog_post_oid, content_sha256, domain, esp_twilio_uuid, experiment_oid, item_count, merchant_item_oid, path, request_sha256, rows_sha256, rule_count, slot, upsell_kind, upsell_oid, version, widget_id, winner_variation_number].hash
332
+ [attribute_names, blog_post_oid, content_sha256, domain, esp_twilio_uuid, experiment_oid, item_count, merchant_item_oid, path, request_sha256, rows_sha256, rule_count, segment_uuid, sequence_uuid, slot, step_uuid, upsell_kind, upsell_oid, version, widget_id, winner_variation_number].hash
303
333
  end
304
334
 
305
335
  # Builds the object from hash