ultracart_api 4.1.218 → 4.1.220
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.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/docs/ItemPaymentProcessing.md +2 -0
- data/docs/SfvbApi.md +124 -9
- data/docs/SfvbApprovalParams.md +8 -2
- data/docs/SfvbCodeLibraryEmail.md +28 -0
- data/docs/SfvbCodeLibraryEmailsResponse.md +20 -0
- data/docs/SfvbSequenceStepCreateRequest.md +11 -3
- data/docs/SfvbSequenceStepCreateResponse.md +14 -0
- data/docs/SfvbSequenceStepMoveRequest.md +24 -0
- data/docs/SfvbSequenceStepMoveResponse.md +20 -0
- data/docs/StorefrontApi.md +2 -0
- data/lib/ultracart_api/api/sfvb_api.rb +175 -8
- data/lib/ultracart_api/api/storefront_api.rb +2 -0
- data/lib/ultracart_api/models/item_payment_processing.rb +11 -1
- data/lib/ultracart_api/models/sfvb_approval_params.rb +33 -3
- data/lib/ultracart_api/models/sfvb_code_library_email.rb +270 -0
- data/lib/ultracart_api/models/sfvb_code_library_emails_response.rb +232 -0
- data/lib/ultracart_api/models/sfvb_sequence_step_create_request.rb +44 -4
- data/lib/ultracart_api/models/sfvb_sequence_step_create_response.rb +77 -1
- data/lib/ultracart_api/models/sfvb_sequence_step_move_request.rb +250 -0
- data/lib/ultracart_api/models/sfvb_sequence_step_move_response.rb +231 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
|
@@ -0,0 +1,270 @@
|
|
|
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 SfvbCodeLibraryEmail
|
|
18
|
+
# The item's description.
|
|
19
|
+
attr_accessor :description
|
|
20
|
+
|
|
21
|
+
# The item, to send as library_item_oid on the step insert.
|
|
22
|
+
attr_accessor :library_item_oid
|
|
23
|
+
|
|
24
|
+
# The preview text a new email takes from the item, or null when it has none and preview_text must be given.
|
|
25
|
+
attr_accessor :preview_text
|
|
26
|
+
|
|
27
|
+
# owned (this account's own), shared (shared with this account) or public (published and approved by UltraCart).
|
|
28
|
+
attr_accessor :source
|
|
29
|
+
|
|
30
|
+
# The subject a new email takes from the item, or null when it has none and subject must be given.
|
|
31
|
+
attr_accessor :subject
|
|
32
|
+
|
|
33
|
+
# The item's title.
|
|
34
|
+
attr_accessor :title
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'description' => :'description',
|
|
40
|
+
:'library_item_oid' => :'library_item_oid',
|
|
41
|
+
:'preview_text' => :'preview_text',
|
|
42
|
+
:'source' => :'source',
|
|
43
|
+
:'subject' => :'subject',
|
|
44
|
+
:'title' => :'title'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'description' => :'String',
|
|
57
|
+
:'library_item_oid' => :'Integer',
|
|
58
|
+
:'preview_text' => :'String',
|
|
59
|
+
:'source' => :'String',
|
|
60
|
+
:'subject' => :'String',
|
|
61
|
+
:'title' => :'String'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCodeLibraryEmail` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCodeLibraryEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'description')
|
|
87
|
+
self.description = attributes[:'description']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'library_item_oid')
|
|
91
|
+
self.library_item_oid = attributes[:'library_item_oid']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'preview_text')
|
|
95
|
+
self.preview_text = attributes[:'preview_text']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'source')
|
|
99
|
+
self.source = attributes[:'source']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'subject')
|
|
103
|
+
self.subject = attributes[:'subject']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'title')
|
|
107
|
+
self.title = attributes[:'title']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Checks equality by comparing each attribute.
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def ==(o)
|
|
127
|
+
return true if self.equal?(o)
|
|
128
|
+
self.class == o.class &&
|
|
129
|
+
description == o.description &&
|
|
130
|
+
library_item_oid == o.library_item_oid &&
|
|
131
|
+
preview_text == o.preview_text &&
|
|
132
|
+
source == o.source &&
|
|
133
|
+
subject == o.subject &&
|
|
134
|
+
title == o.title
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[description, library_item_oid, preview_text, source, subject, title].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
new.build_from_hash(attributes)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Builds the object from hash
|
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
+
# @return [Object] Returns the model itself
|
|
159
|
+
def build_from_hash(attributes)
|
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
164
|
+
self.send("#{key}=", nil)
|
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
166
|
+
# check to ensure the input is an array given that the attribute
|
|
167
|
+
# is documented as an array but the input is not
|
|
168
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
169
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
170
|
+
end
|
|
171
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
172
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
self
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Deserializes the data based on type
|
|
180
|
+
# @param string type Data type
|
|
181
|
+
# @param string value Value to be deserialized
|
|
182
|
+
# @return [Object] Deserialized data
|
|
183
|
+
def _deserialize(type, value)
|
|
184
|
+
case type.to_sym
|
|
185
|
+
when :Time
|
|
186
|
+
Time.parse(value)
|
|
187
|
+
when :Date
|
|
188
|
+
Date.parse(value)
|
|
189
|
+
when :String
|
|
190
|
+
value.to_s
|
|
191
|
+
when :Integer
|
|
192
|
+
value.to_i
|
|
193
|
+
when :Float
|
|
194
|
+
value.to_f
|
|
195
|
+
when :Boolean
|
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
197
|
+
true
|
|
198
|
+
else
|
|
199
|
+
false
|
|
200
|
+
end
|
|
201
|
+
when :Object
|
|
202
|
+
# generic object (usually a Hash), return directly
|
|
203
|
+
value
|
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each do |k, v|
|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
else # model
|
|
216
|
+
# models (e.g. Pet) or oneOf
|
|
217
|
+
klass = UltracartClient.const_get(type)
|
|
218
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the string representation of the object
|
|
223
|
+
# @return [String] String presentation of the object
|
|
224
|
+
def to_s
|
|
225
|
+
to_hash.to_s
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_body
|
|
231
|
+
to_hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the object in the form of hash
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_hash
|
|
237
|
+
hash = {}
|
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
239
|
+
value = self.send(attr)
|
|
240
|
+
if value.nil?
|
|
241
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
242
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
hash[param] = _to_hash(value)
|
|
246
|
+
end
|
|
247
|
+
hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Outputs non-array value in the form of hash
|
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
252
|
+
# @param [Object] value Any valid value
|
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
|
254
|
+
def _to_hash(value)
|
|
255
|
+
if value.is_a?(Array)
|
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
|
257
|
+
elsif value.is_a?(Hash)
|
|
258
|
+
{}.tap do |hash|
|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
260
|
+
end
|
|
261
|
+
elsif value.respond_to? :to_hash
|
|
262
|
+
value.to_hash
|
|
263
|
+
else
|
|
264
|
+
value
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
end
|
|
@@ -0,0 +1,232 @@
|
|
|
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 SfvbCodeLibraryEmailsResponse
|
|
18
|
+
# The items, by title.
|
|
19
|
+
attr_accessor :emails
|
|
20
|
+
|
|
21
|
+
# True when there were more items than listed. Narrow the search to see the rest.
|
|
22
|
+
attr_accessor :truncated
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'emails' => :'emails',
|
|
28
|
+
:'truncated' => :'truncated'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'emails' => :'Array<SfvbCodeLibraryEmail>',
|
|
41
|
+
:'truncated' => :'Boolean'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCodeLibraryEmailsResponse` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCodeLibraryEmailsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'emails')
|
|
67
|
+
if (value = attributes[:'emails']).is_a?(Array)
|
|
68
|
+
self.emails = value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'truncated')
|
|
73
|
+
self.truncated = attributes[:'truncated']
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
78
|
+
# @return Array for valid properties with the reasons
|
|
79
|
+
def list_invalid_properties
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
invalid_properties
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Check to see if the all the properties in the model are valid
|
|
85
|
+
# @return true if the model is valid
|
|
86
|
+
def valid?
|
|
87
|
+
true
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Checks equality by comparing each attribute.
|
|
91
|
+
# @param [Object] Object to be compared
|
|
92
|
+
def ==(o)
|
|
93
|
+
return true if self.equal?(o)
|
|
94
|
+
self.class == o.class &&
|
|
95
|
+
emails == o.emails &&
|
|
96
|
+
truncated == o.truncated
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# @see the `==` method
|
|
100
|
+
# @param [Object] Object to be compared
|
|
101
|
+
def eql?(o)
|
|
102
|
+
self == o
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Calculates hash code according to all attributes.
|
|
106
|
+
# @return [Integer] Hash code
|
|
107
|
+
def hash
|
|
108
|
+
[emails, truncated].hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Builds the object from hash
|
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
113
|
+
# @return [Object] Returns the model itself
|
|
114
|
+
def self.build_from_hash(attributes)
|
|
115
|
+
new.build_from_hash(attributes)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
125
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
126
|
+
self.send("#{key}=", nil)
|
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
|
+
# check to ensure the input is an array given that the attribute
|
|
129
|
+
# is documented as an array but the input is not
|
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
131
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
132
|
+
end
|
|
133
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
134
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
self
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Deserializes the data based on type
|
|
142
|
+
# @param string type Data type
|
|
143
|
+
# @param string value Value to be deserialized
|
|
144
|
+
# @return [Object] Deserialized data
|
|
145
|
+
def _deserialize(type, value)
|
|
146
|
+
case type.to_sym
|
|
147
|
+
when :Time
|
|
148
|
+
Time.parse(value)
|
|
149
|
+
when :Date
|
|
150
|
+
Date.parse(value)
|
|
151
|
+
when :String
|
|
152
|
+
value.to_s
|
|
153
|
+
when :Integer
|
|
154
|
+
value.to_i
|
|
155
|
+
when :Float
|
|
156
|
+
value.to_f
|
|
157
|
+
when :Boolean
|
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
159
|
+
true
|
|
160
|
+
else
|
|
161
|
+
false
|
|
162
|
+
end
|
|
163
|
+
when :Object
|
|
164
|
+
# generic object (usually a Hash), return directly
|
|
165
|
+
value
|
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
|
172
|
+
{}.tap do |hash|
|
|
173
|
+
value.each do |k, v|
|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
else # model
|
|
178
|
+
# models (e.g. Pet) or oneOf
|
|
179
|
+
klass = UltracartClient.const_get(type)
|
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the string representation of the object
|
|
185
|
+
# @return [String] String presentation of the object
|
|
186
|
+
def to_s
|
|
187
|
+
to_hash.to_s
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
|
192
|
+
def to_body
|
|
193
|
+
to_hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Returns the object in the form of hash
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_hash
|
|
199
|
+
hash = {}
|
|
200
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
201
|
+
value = self.send(attr)
|
|
202
|
+
if value.nil?
|
|
203
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
204
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Outputs non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
# @param [Object] value Any valid value
|
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
|
216
|
+
def _to_hash(value)
|
|
217
|
+
if value.is_a?(Array)
|
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
|
219
|
+
elsif value.is_a?(Hash)
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
+
end
|
|
223
|
+
elsif value.respond_to? :to_hash
|
|
224
|
+
value.to_hash
|
|
225
|
+
else
|
|
226
|
+
value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
@@ -15,29 +15,45 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module UltracartClient
|
|
17
17
|
class SfvbSequenceStepCreateRequest
|
|
18
|
+
# With library_item_oid, true once the caller has seen that the item carries executable content (script, html, embed, css or velocity elements) and still wants it. An item with any is refused without it.
|
|
19
|
+
attr_accessor :acknowledge_executable
|
|
20
|
+
|
|
18
21
|
# The step the new step follows, in the same list. Not an end, continue or merge step.
|
|
19
22
|
attr_accessor :after_step_uuid
|
|
20
23
|
|
|
21
24
|
# A condition, split or inboxgeek step. With side, the new step goes first on that side.
|
|
22
25
|
attr_accessor :branch_step_uuid
|
|
23
26
|
|
|
24
|
-
#
|
|
27
|
+
# A wait step's settings, as the admin saves them and set-config changes them, namely delay_duration and delay_duration_unit (minutes, hours, days, weeks or months), and optionally the delay_until_* options. Not for an email step.
|
|
28
|
+
attr_accessor :config_json
|
|
29
|
+
|
|
30
|
+
# An email item from the code library (#1589) to start the new email from, taking its body, with new element ids, and its subject and preview text unless subject or preview_text is given. The item must be this account's own, shared with it, or published, approved by UltraCart and free. Only for an email step. The items are listed by the code library email read.
|
|
31
|
+
attr_accessor :library_item_oid
|
|
32
|
+
|
|
33
|
+
# A post_card step's name, shown in the admin, 1 to 100 characters on one line. Postcard by default. Only for a post_card step.
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
|
|
36
|
+
# The new email's preview text, 5 to 150 characters. Optional with library_item_oid, whose preview text is used when this is left out.
|
|
25
37
|
attr_accessor :preview_text
|
|
26
38
|
|
|
27
39
|
# With branch_step_uuid, the side's label from the sequence read. yes or no for a condition, left or right for a split or inboxgeek step.
|
|
28
40
|
attr_accessor :side
|
|
29
41
|
|
|
30
|
-
# The new email's subject line, 5 to 150 characters.
|
|
42
|
+
# The new email's subject line, 5 to 150 characters. Optional with library_item_oid, whose subject is used when this is left out.
|
|
31
43
|
attr_accessor :subject
|
|
32
44
|
|
|
33
|
-
# The kind of step
|
|
45
|
+
# The kind of step, one of email (the default), wait or post_card.
|
|
34
46
|
attr_accessor :type
|
|
35
47
|
|
|
36
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
49
|
def self.attribute_map
|
|
38
50
|
{
|
|
51
|
+
:'acknowledge_executable' => :'acknowledge_executable',
|
|
39
52
|
:'after_step_uuid' => :'after_step_uuid',
|
|
40
53
|
:'branch_step_uuid' => :'branch_step_uuid',
|
|
54
|
+
:'config_json' => :'config_json',
|
|
55
|
+
:'library_item_oid' => :'library_item_oid',
|
|
56
|
+
:'name' => :'name',
|
|
41
57
|
:'preview_text' => :'preview_text',
|
|
42
58
|
:'side' => :'side',
|
|
43
59
|
:'subject' => :'subject',
|
|
@@ -53,8 +69,12 @@ module UltracartClient
|
|
|
53
69
|
# Attribute type mapping.
|
|
54
70
|
def self.openapi_types
|
|
55
71
|
{
|
|
72
|
+
:'acknowledge_executable' => :'Boolean',
|
|
56
73
|
:'after_step_uuid' => :'String',
|
|
57
74
|
:'branch_step_uuid' => :'String',
|
|
75
|
+
:'config_json' => :'String',
|
|
76
|
+
:'library_item_oid' => :'Integer',
|
|
77
|
+
:'name' => :'String',
|
|
58
78
|
:'preview_text' => :'String',
|
|
59
79
|
:'side' => :'String',
|
|
60
80
|
:'subject' => :'String',
|
|
@@ -83,6 +103,10 @@ module UltracartClient
|
|
|
83
103
|
h[k.to_sym] = v
|
|
84
104
|
}
|
|
85
105
|
|
|
106
|
+
if attributes.key?(:'acknowledge_executable')
|
|
107
|
+
self.acknowledge_executable = attributes[:'acknowledge_executable']
|
|
108
|
+
end
|
|
109
|
+
|
|
86
110
|
if attributes.key?(:'after_step_uuid')
|
|
87
111
|
self.after_step_uuid = attributes[:'after_step_uuid']
|
|
88
112
|
end
|
|
@@ -91,6 +115,18 @@ module UltracartClient
|
|
|
91
115
|
self.branch_step_uuid = attributes[:'branch_step_uuid']
|
|
92
116
|
end
|
|
93
117
|
|
|
118
|
+
if attributes.key?(:'config_json')
|
|
119
|
+
self.config_json = attributes[:'config_json']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'library_item_oid')
|
|
123
|
+
self.library_item_oid = attributes[:'library_item_oid']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'name')
|
|
127
|
+
self.name = attributes[:'name']
|
|
128
|
+
end
|
|
129
|
+
|
|
94
130
|
if attributes.key?(:'preview_text')
|
|
95
131
|
self.preview_text = attributes[:'preview_text']
|
|
96
132
|
end
|
|
@@ -126,8 +162,12 @@ module UltracartClient
|
|
|
126
162
|
def ==(o)
|
|
127
163
|
return true if self.equal?(o)
|
|
128
164
|
self.class == o.class &&
|
|
165
|
+
acknowledge_executable == o.acknowledge_executable &&
|
|
129
166
|
after_step_uuid == o.after_step_uuid &&
|
|
130
167
|
branch_step_uuid == o.branch_step_uuid &&
|
|
168
|
+
config_json == o.config_json &&
|
|
169
|
+
library_item_oid == o.library_item_oid &&
|
|
170
|
+
name == o.name &&
|
|
131
171
|
preview_text == o.preview_text &&
|
|
132
172
|
side == o.side &&
|
|
133
173
|
subject == o.subject &&
|
|
@@ -143,7 +183,7 @@ module UltracartClient
|
|
|
143
183
|
# Calculates hash code according to all attributes.
|
|
144
184
|
# @return [Integer] Hash code
|
|
145
185
|
def hash
|
|
146
|
-
[after_step_uuid, branch_step_uuid, preview_text, side, subject, type].hash
|
|
186
|
+
[acknowledge_executable, after_step_uuid, branch_step_uuid, config_json, library_item_oid, name, preview_text, side, subject, type].hash
|
|
147
187
|
end
|
|
148
188
|
|
|
149
189
|
# Builds the object from hash
|