ultracart_api 4.1.231 → 4.1.232
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 +45 -2
- data/docs/ItemContentMultimedia.md +2 -0
- data/docs/SfvbApi.md +763 -39
- data/docs/SfvbApprovalCreateRequest.md +6 -0
- data/docs/SfvbCommsBranchStat.md +20 -0
- data/docs/SfvbCommsChange.md +22 -0
- data/docs/SfvbCommsClick.md +20 -0
- data/docs/SfvbCommsClicksResponse.md +26 -0
- data/docs/SfvbCommsDailyStat.md +30 -0
- data/docs/SfvbCommsDashboardResponse.md +24 -0
- data/docs/SfvbCommsDashboardRow.md +28 -0
- data/docs/SfvbCommsPlan.md +66 -0
- data/docs/SfvbCommsPlanResponse.md +20 -0
- data/docs/SfvbCommsProvider.md +28 -0
- data/docs/SfvbCommsProviderImportRequest.md +22 -0
- data/docs/SfvbCommsProviderImportResponse.md +26 -0
- data/docs/SfvbCommsProviderList.md +20 -0
- data/docs/SfvbCommsProvidersResponse.md +22 -0
- data/docs/SfvbCommsSender.md +24 -0
- data/docs/SfvbCommsSenderUpdate.md +22 -0
- data/docs/SfvbCommsSequenceStatsResponse.md +26 -0
- data/docs/SfvbCommsSettings.md +34 -0
- data/docs/SfvbCommsSettingsResponse.md +24 -0
- data/docs/SfvbCommsSettingsUpdateRequest.md +26 -0
- data/docs/SfvbCommsStat.md +54 -0
- data/docs/SfvbCommsStepStat.md +34 -0
- data/docs/SfvbCommsTemplate.md +30 -0
- data/docs/SfvbCommsTemplateResponse.md +24 -0
- data/docs/SfvbCommsTemplatesResponse.md +20 -0
- data/docs/SfvbCommsTestEmailRequest.md +24 -0
- data/docs/SfvbCommsTestPostcardRequest.md +36 -0
- data/docs/SfvbCommsTestSendResponse.md +32 -0
- data/docs/SfvbCommsTestSmsRequest.md +18 -0
- data/lib/ultracart_api/api/sfvb_api.rb +982 -10
- data/lib/ultracart_api/models/item_content_multimedia.rb +11 -1
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +30 -3
- data/lib/ultracart_api/models/sfvb_comms_branch_stat.rb +229 -0
- data/lib/ultracart_api/models/sfvb_comms_change.rb +240 -0
- data/lib/ultracart_api/models/sfvb_comms_click.rb +230 -0
- data/lib/ultracart_api/models/sfvb_comms_clicks_response.rb +264 -0
- data/lib/ultracart_api/models/sfvb_comms_daily_stat.rb +280 -0
- data/lib/ultracart_api/models/sfvb_comms_dashboard_response.rb +256 -0
- data/lib/ultracart_api/models/sfvb_comms_dashboard_row.rb +269 -0
- data/lib/ultracart_api/models/sfvb_comms_plan.rb +460 -0
- data/lib/ultracart_api/models/sfvb_comms_plan_response.rb +231 -0
- data/lib/ultracart_api/models/sfvb_comms_provider.rb +272 -0
- data/lib/ultracart_api/models/sfvb_comms_provider_import_request.rb +242 -0
- data/lib/ultracart_api/models/sfvb_comms_provider_import_response.rb +264 -0
- data/lib/ultracart_api/models/sfvb_comms_provider_list.rb +230 -0
- data/lib/ultracart_api/models/sfvb_comms_providers_response.rb +244 -0
- data/lib/ultracart_api/models/sfvb_comms_sender.rb +250 -0
- data/lib/ultracart_api/models/sfvb_comms_sender_update.rb +240 -0
- data/lib/ultracart_api/models/sfvb_comms_sequence_stats_response.rb +263 -0
- data/lib/ultracart_api/models/sfvb_comms_settings.rb +297 -0
- data/lib/ultracart_api/models/sfvb_comms_settings_response.rb +253 -0
- data/lib/ultracart_api/models/sfvb_comms_settings_update_request.rb +257 -0
- data/lib/ultracart_api/models/sfvb_comms_stat.rb +402 -0
- data/lib/ultracart_api/models/sfvb_comms_step_stat.rb +301 -0
- data/lib/ultracart_api/models/sfvb_comms_template.rb +280 -0
- data/lib/ultracart_api/models/sfvb_comms_template_response.rb +251 -0
- data/lib/ultracart_api/models/sfvb_comms_templates_response.rb +234 -0
- data/lib/ultracart_api/models/sfvb_comms_test_email_request.rb +252 -0
- data/lib/ultracart_api/models/sfvb_comms_test_postcard_request.rb +312 -0
- data/lib/ultracart_api/models/sfvb_comms_test_send_response.rb +292 -0
- data/lib/ultracart_api/models/sfvb_comms_test_sms_request.rb +220 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +29 -0
- metadata +59 -1
|
@@ -0,0 +1,292 @@
|
|
|
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 SfvbCommsTestSendResponse
|
|
18
|
+
# For an SMS, the message as sent.
|
|
19
|
+
attr_accessor :body
|
|
20
|
+
|
|
21
|
+
# email, sms or postcard.
|
|
22
|
+
attr_accessor :channel
|
|
23
|
+
|
|
24
|
+
# For a postcard, what this card costs the account.
|
|
25
|
+
attr_accessor :cost
|
|
26
|
+
|
|
27
|
+
# True when nothing was sent.
|
|
28
|
+
attr_accessor :dry_run
|
|
29
|
+
|
|
30
|
+
# What else happened, such as records created by the test.
|
|
31
|
+
attr_accessor :notes
|
|
32
|
+
|
|
33
|
+
# Who it went to, as a user on this account (their login), or the postcard's city and state.
|
|
34
|
+
attr_accessor :recipient
|
|
35
|
+
|
|
36
|
+
# True when it was sent or mailed. False on a dry run or when it was skipped.
|
|
37
|
+
attr_accessor :sent
|
|
38
|
+
|
|
39
|
+
# Why it wasn't sent or mailed, when it wasn't.
|
|
40
|
+
attr_accessor :skipped_reason
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'body' => :'body',
|
|
46
|
+
:'channel' => :'channel',
|
|
47
|
+
:'cost' => :'cost',
|
|
48
|
+
:'dry_run' => :'dry_run',
|
|
49
|
+
:'notes' => :'notes',
|
|
50
|
+
:'recipient' => :'recipient',
|
|
51
|
+
:'sent' => :'sent',
|
|
52
|
+
:'skipped_reason' => :'skipped_reason'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'body' => :'String',
|
|
65
|
+
:'channel' => :'String',
|
|
66
|
+
:'cost' => :'Float',
|
|
67
|
+
:'dry_run' => :'Boolean',
|
|
68
|
+
:'notes' => :'Array<String>',
|
|
69
|
+
:'recipient' => :'String',
|
|
70
|
+
:'sent' => :'Boolean',
|
|
71
|
+
:'skipped_reason' => :'String'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsTestSendResponse` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsTestSendResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'body')
|
|
97
|
+
self.body = attributes[:'body']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'channel')
|
|
101
|
+
self.channel = attributes[:'channel']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'cost')
|
|
105
|
+
self.cost = attributes[:'cost']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'dry_run')
|
|
109
|
+
self.dry_run = attributes[:'dry_run']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'notes')
|
|
113
|
+
if (value = attributes[:'notes']).is_a?(Array)
|
|
114
|
+
self.notes = value
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'recipient')
|
|
119
|
+
self.recipient = attributes[:'recipient']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'sent')
|
|
123
|
+
self.sent = attributes[:'sent']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'skipped_reason')
|
|
127
|
+
self.skipped_reason = attributes[:'skipped_reason']
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
132
|
+
# @return Array for valid properties with the reasons
|
|
133
|
+
def list_invalid_properties
|
|
134
|
+
invalid_properties = Array.new
|
|
135
|
+
invalid_properties
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Check to see if the all the properties in the model are valid
|
|
139
|
+
# @return true if the model is valid
|
|
140
|
+
def valid?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Checks equality by comparing each attribute.
|
|
145
|
+
# @param [Object] Object to be compared
|
|
146
|
+
def ==(o)
|
|
147
|
+
return true if self.equal?(o)
|
|
148
|
+
self.class == o.class &&
|
|
149
|
+
body == o.body &&
|
|
150
|
+
channel == o.channel &&
|
|
151
|
+
cost == o.cost &&
|
|
152
|
+
dry_run == o.dry_run &&
|
|
153
|
+
notes == o.notes &&
|
|
154
|
+
recipient == o.recipient &&
|
|
155
|
+
sent == o.sent &&
|
|
156
|
+
skipped_reason == o.skipped_reason
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def eql?(o)
|
|
162
|
+
self == o
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Calculates hash code according to all attributes.
|
|
166
|
+
# @return [Integer] Hash code
|
|
167
|
+
def hash
|
|
168
|
+
[body, channel, cost, dry_run, notes, recipient, sent, skipped_reason].hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Builds the object from hash
|
|
172
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
173
|
+
# @return [Object] Returns the model itself
|
|
174
|
+
def self.build_from_hash(attributes)
|
|
175
|
+
new.build_from_hash(attributes)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
185
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
186
|
+
self.send("#{key}=", nil)
|
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
|
+
# is documented as an array but the input is not
|
|
190
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
191
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
192
|
+
end
|
|
193
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
194
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
self
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Deserializes the data based on type
|
|
202
|
+
# @param string type Data type
|
|
203
|
+
# @param string value Value to be deserialized
|
|
204
|
+
# @return [Object] Deserialized data
|
|
205
|
+
def _deserialize(type, value)
|
|
206
|
+
case type.to_sym
|
|
207
|
+
when :Time
|
|
208
|
+
Time.parse(value)
|
|
209
|
+
when :Date
|
|
210
|
+
Date.parse(value)
|
|
211
|
+
when :String
|
|
212
|
+
value.to_s
|
|
213
|
+
when :Integer
|
|
214
|
+
value.to_i
|
|
215
|
+
when :Float
|
|
216
|
+
value.to_f
|
|
217
|
+
when :Boolean
|
|
218
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
219
|
+
true
|
|
220
|
+
else
|
|
221
|
+
false
|
|
222
|
+
end
|
|
223
|
+
when :Object
|
|
224
|
+
# generic object (usually a Hash), return directly
|
|
225
|
+
value
|
|
226
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
227
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
228
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
229
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
230
|
+
k_type = Regexp.last_match[:k_type]
|
|
231
|
+
v_type = Regexp.last_match[:v_type]
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each do |k, v|
|
|
234
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
else # model
|
|
238
|
+
# models (e.g. Pet) or oneOf
|
|
239
|
+
klass = UltracartClient.const_get(type)
|
|
240
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the string representation of the object
|
|
245
|
+
# @return [String] String presentation of the object
|
|
246
|
+
def to_s
|
|
247
|
+
to_hash.to_s
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_body
|
|
253
|
+
to_hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Outputs non-array value in the form of hash
|
|
273
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
274
|
+
# @param [Object] value Any valid value
|
|
275
|
+
# @return [Hash] Returns the value in the form of hash
|
|
276
|
+
def _to_hash(value)
|
|
277
|
+
if value.is_a?(Array)
|
|
278
|
+
value.compact.map { |v| _to_hash(v) }
|
|
279
|
+
elsif value.is_a?(Hash)
|
|
280
|
+
{}.tap do |hash|
|
|
281
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
282
|
+
end
|
|
283
|
+
elsif value.respond_to? :to_hash
|
|
284
|
+
value.to_hash
|
|
285
|
+
else
|
|
286
|
+
value
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
end
|
|
@@ -0,0 +1,220 @@
|
|
|
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 SfvbCommsTestSmsRequest
|
|
18
|
+
# The recipient in E.164 form, such as +14045550100. It must be the cell phone of a user on this account.
|
|
19
|
+
attr_accessor :to_phone
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'to_phone' => :'to_phone'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'to_phone' => :'String'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsTestSmsRequest` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsTestSmsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'to_phone')
|
|
62
|
+
self.to_phone = attributes[:'to_phone']
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
+
# @return Array for valid properties with the reasons
|
|
68
|
+
def list_invalid_properties
|
|
69
|
+
invalid_properties = Array.new
|
|
70
|
+
invalid_properties
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Check to see if the all the properties in the model are valid
|
|
74
|
+
# @return true if the model is valid
|
|
75
|
+
def valid?
|
|
76
|
+
true
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Checks equality by comparing each attribute.
|
|
80
|
+
# @param [Object] Object to be compared
|
|
81
|
+
def ==(o)
|
|
82
|
+
return true if self.equal?(o)
|
|
83
|
+
self.class == o.class &&
|
|
84
|
+
to_phone == o.to_phone
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @see the `==` method
|
|
88
|
+
# @param [Object] Object to be compared
|
|
89
|
+
def eql?(o)
|
|
90
|
+
self == o
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Calculates hash code according to all attributes.
|
|
94
|
+
# @return [Integer] Hash code
|
|
95
|
+
def hash
|
|
96
|
+
[to_phone].hash
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Builds the object from hash
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
# @return [Object] Returns the model itself
|
|
102
|
+
def self.build_from_hash(attributes)
|
|
103
|
+
new.build_from_hash(attributes)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
114
|
+
self.send("#{key}=", nil)
|
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
116
|
+
# check to ensure the input is an array given that the attribute
|
|
117
|
+
# is documented as an array but the input is not
|
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
120
|
+
end
|
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
self
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Deserializes the data based on type
|
|
130
|
+
# @param string type Data type
|
|
131
|
+
# @param string value Value to be deserialized
|
|
132
|
+
# @return [Object] Deserialized data
|
|
133
|
+
def _deserialize(type, value)
|
|
134
|
+
case type.to_sym
|
|
135
|
+
when :Time
|
|
136
|
+
Time.parse(value)
|
|
137
|
+
when :Date
|
|
138
|
+
Date.parse(value)
|
|
139
|
+
when :String
|
|
140
|
+
value.to_s
|
|
141
|
+
when :Integer
|
|
142
|
+
value.to_i
|
|
143
|
+
when :Float
|
|
144
|
+
value.to_f
|
|
145
|
+
when :Boolean
|
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
+
true
|
|
148
|
+
else
|
|
149
|
+
false
|
|
150
|
+
end
|
|
151
|
+
when :Object
|
|
152
|
+
# generic object (usually a Hash), return directly
|
|
153
|
+
value
|
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
|
160
|
+
{}.tap do |hash|
|
|
161
|
+
value.each do |k, v|
|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
else # model
|
|
166
|
+
# models (e.g. Pet) or oneOf
|
|
167
|
+
klass = UltracartClient.const_get(type)
|
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the string representation of the object
|
|
173
|
+
# @return [String] String presentation of the object
|
|
174
|
+
def to_s
|
|
175
|
+
to_hash.to_s
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
|
180
|
+
def to_body
|
|
181
|
+
to_hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns the object in the form of hash
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_hash
|
|
187
|
+
hash = {}
|
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
189
|
+
value = self.send(attr)
|
|
190
|
+
if value.nil?
|
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
hash[param] = _to_hash(value)
|
|
196
|
+
end
|
|
197
|
+
hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Outputs non-array value in the form of hash
|
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
+
# @param [Object] value Any valid value
|
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
|
204
|
+
def _to_hash(value)
|
|
205
|
+
if value.is_a?(Array)
|
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
|
207
|
+
elsif value.is_a?(Hash)
|
|
208
|
+
{}.tap do |hash|
|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
+
end
|
|
211
|
+
elsif value.respond_to? :to_hash
|
|
212
|
+
value.to_hash
|
|
213
|
+
else
|
|
214
|
+
value
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1006,6 +1006,13 @@ require 'ultracart_api/models/sfvb_campaign_write_request'
|
|
|
1006
1006
|
require 'ultracart_api/models/sfvb_campaigns_response'
|
|
1007
1007
|
require 'ultracart_api/models/sfvb_code_library_email'
|
|
1008
1008
|
require 'ultracart_api/models/sfvb_code_library_emails_response'
|
|
1009
|
+
require 'ultracart_api/models/sfvb_comms_branch_stat'
|
|
1010
|
+
require 'ultracart_api/models/sfvb_comms_change'
|
|
1011
|
+
require 'ultracart_api/models/sfvb_comms_click'
|
|
1012
|
+
require 'ultracart_api/models/sfvb_comms_clicks_response'
|
|
1013
|
+
require 'ultracart_api/models/sfvb_comms_daily_stat'
|
|
1014
|
+
require 'ultracart_api/models/sfvb_comms_dashboard_response'
|
|
1015
|
+
require 'ultracart_api/models/sfvb_comms_dashboard_row'
|
|
1009
1016
|
require 'ultracart_api/models/sfvb_comms_dns_record'
|
|
1010
1017
|
require 'ultracart_api/models/sfvb_comms_email'
|
|
1011
1018
|
require 'ultracart_api/models/sfvb_comms_folder'
|
|
@@ -1020,15 +1027,37 @@ require 'ultracart_api/models/sfvb_comms_list_write_request'
|
|
|
1020
1027
|
require 'ultracart_api/models/sfvb_comms_lists_response'
|
|
1021
1028
|
require 'ultracart_api/models/sfvb_comms_member'
|
|
1022
1029
|
require 'ultracart_api/models/sfvb_comms_members_response'
|
|
1030
|
+
require 'ultracart_api/models/sfvb_comms_plan'
|
|
1031
|
+
require 'ultracart_api/models/sfvb_comms_plan_response'
|
|
1023
1032
|
require 'ultracart_api/models/sfvb_comms_postcard'
|
|
1033
|
+
require 'ultracart_api/models/sfvb_comms_provider'
|
|
1034
|
+
require 'ultracart_api/models/sfvb_comms_provider_import_request'
|
|
1035
|
+
require 'ultracart_api/models/sfvb_comms_provider_import_response'
|
|
1036
|
+
require 'ultracart_api/models/sfvb_comms_provider_list'
|
|
1037
|
+
require 'ultracart_api/models/sfvb_comms_providers_response'
|
|
1024
1038
|
require 'ultracart_api/models/sfvb_comms_segment'
|
|
1025
1039
|
require 'ultracart_api/models/sfvb_comms_segment_detail'
|
|
1026
1040
|
require 'ultracart_api/models/sfvb_comms_segment_response'
|
|
1027
1041
|
require 'ultracart_api/models/sfvb_comms_segment_used_by'
|
|
1028
1042
|
require 'ultracart_api/models/sfvb_comms_segment_write_request'
|
|
1029
1043
|
require 'ultracart_api/models/sfvb_comms_segments_response'
|
|
1044
|
+
require 'ultracart_api/models/sfvb_comms_sender'
|
|
1045
|
+
require 'ultracart_api/models/sfvb_comms_sender_update'
|
|
1030
1046
|
require 'ultracart_api/models/sfvb_comms_sending_domain'
|
|
1031
1047
|
require 'ultracart_api/models/sfvb_comms_sending_domains_response'
|
|
1048
|
+
require 'ultracart_api/models/sfvb_comms_sequence_stats_response'
|
|
1049
|
+
require 'ultracart_api/models/sfvb_comms_settings'
|
|
1050
|
+
require 'ultracart_api/models/sfvb_comms_settings_response'
|
|
1051
|
+
require 'ultracart_api/models/sfvb_comms_settings_update_request'
|
|
1052
|
+
require 'ultracart_api/models/sfvb_comms_stat'
|
|
1053
|
+
require 'ultracart_api/models/sfvb_comms_step_stat'
|
|
1054
|
+
require 'ultracart_api/models/sfvb_comms_template'
|
|
1055
|
+
require 'ultracart_api/models/sfvb_comms_template_response'
|
|
1056
|
+
require 'ultracart_api/models/sfvb_comms_templates_response'
|
|
1057
|
+
require 'ultracart_api/models/sfvb_comms_test_email_request'
|
|
1058
|
+
require 'ultracart_api/models/sfvb_comms_test_postcard_request'
|
|
1059
|
+
require 'ultracart_api/models/sfvb_comms_test_send_response'
|
|
1060
|
+
require 'ultracart_api/models/sfvb_comms_test_sms_request'
|
|
1032
1061
|
require 'ultracart_api/models/sfvb_comms_twilio_account'
|
|
1033
1062
|
require 'ultracart_api/models/sfvb_comms_twilio_account_response'
|
|
1034
1063
|
require 'ultracart_api/models/sfvb_compile_request'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultracart_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.232
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
@@ -1068,6 +1068,13 @@ files:
|
|
|
1068
1068
|
- docs/SfvbCampaignsResponse.md
|
|
1069
1069
|
- docs/SfvbCodeLibraryEmail.md
|
|
1070
1070
|
- docs/SfvbCodeLibraryEmailsResponse.md
|
|
1071
|
+
- docs/SfvbCommsBranchStat.md
|
|
1072
|
+
- docs/SfvbCommsChange.md
|
|
1073
|
+
- docs/SfvbCommsClick.md
|
|
1074
|
+
- docs/SfvbCommsClicksResponse.md
|
|
1075
|
+
- docs/SfvbCommsDailyStat.md
|
|
1076
|
+
- docs/SfvbCommsDashboardResponse.md
|
|
1077
|
+
- docs/SfvbCommsDashboardRow.md
|
|
1071
1078
|
- docs/SfvbCommsDnsRecord.md
|
|
1072
1079
|
- docs/SfvbCommsEmail.md
|
|
1073
1080
|
- docs/SfvbCommsFolder.md
|
|
@@ -1082,15 +1089,37 @@ files:
|
|
|
1082
1089
|
- docs/SfvbCommsListsResponse.md
|
|
1083
1090
|
- docs/SfvbCommsMember.md
|
|
1084
1091
|
- docs/SfvbCommsMembersResponse.md
|
|
1092
|
+
- docs/SfvbCommsPlan.md
|
|
1093
|
+
- docs/SfvbCommsPlanResponse.md
|
|
1085
1094
|
- docs/SfvbCommsPostcard.md
|
|
1095
|
+
- docs/SfvbCommsProvider.md
|
|
1096
|
+
- docs/SfvbCommsProviderImportRequest.md
|
|
1097
|
+
- docs/SfvbCommsProviderImportResponse.md
|
|
1098
|
+
- docs/SfvbCommsProviderList.md
|
|
1099
|
+
- docs/SfvbCommsProvidersResponse.md
|
|
1086
1100
|
- docs/SfvbCommsSegment.md
|
|
1087
1101
|
- docs/SfvbCommsSegmentDetail.md
|
|
1088
1102
|
- docs/SfvbCommsSegmentResponse.md
|
|
1089
1103
|
- docs/SfvbCommsSegmentUsedBy.md
|
|
1090
1104
|
- docs/SfvbCommsSegmentWriteRequest.md
|
|
1091
1105
|
- docs/SfvbCommsSegmentsResponse.md
|
|
1106
|
+
- docs/SfvbCommsSender.md
|
|
1107
|
+
- docs/SfvbCommsSenderUpdate.md
|
|
1092
1108
|
- docs/SfvbCommsSendingDomain.md
|
|
1093
1109
|
- docs/SfvbCommsSendingDomainsResponse.md
|
|
1110
|
+
- docs/SfvbCommsSequenceStatsResponse.md
|
|
1111
|
+
- docs/SfvbCommsSettings.md
|
|
1112
|
+
- docs/SfvbCommsSettingsResponse.md
|
|
1113
|
+
- docs/SfvbCommsSettingsUpdateRequest.md
|
|
1114
|
+
- docs/SfvbCommsStat.md
|
|
1115
|
+
- docs/SfvbCommsStepStat.md
|
|
1116
|
+
- docs/SfvbCommsTemplate.md
|
|
1117
|
+
- docs/SfvbCommsTemplateResponse.md
|
|
1118
|
+
- docs/SfvbCommsTemplatesResponse.md
|
|
1119
|
+
- docs/SfvbCommsTestEmailRequest.md
|
|
1120
|
+
- docs/SfvbCommsTestPostcardRequest.md
|
|
1121
|
+
- docs/SfvbCommsTestSendResponse.md
|
|
1122
|
+
- docs/SfvbCommsTestSmsRequest.md
|
|
1094
1123
|
- docs/SfvbCommsTwilioAccount.md
|
|
1095
1124
|
- docs/SfvbCommsTwilioAccountResponse.md
|
|
1096
1125
|
- docs/SfvbCompileRequest.md
|
|
@@ -2489,6 +2518,13 @@ files:
|
|
|
2489
2518
|
- lib/ultracart_api/models/sfvb_campaigns_response.rb
|
|
2490
2519
|
- lib/ultracart_api/models/sfvb_code_library_email.rb
|
|
2491
2520
|
- lib/ultracart_api/models/sfvb_code_library_emails_response.rb
|
|
2521
|
+
- lib/ultracart_api/models/sfvb_comms_branch_stat.rb
|
|
2522
|
+
- lib/ultracart_api/models/sfvb_comms_change.rb
|
|
2523
|
+
- lib/ultracart_api/models/sfvb_comms_click.rb
|
|
2524
|
+
- lib/ultracart_api/models/sfvb_comms_clicks_response.rb
|
|
2525
|
+
- lib/ultracart_api/models/sfvb_comms_daily_stat.rb
|
|
2526
|
+
- lib/ultracart_api/models/sfvb_comms_dashboard_response.rb
|
|
2527
|
+
- lib/ultracart_api/models/sfvb_comms_dashboard_row.rb
|
|
2492
2528
|
- lib/ultracart_api/models/sfvb_comms_dns_record.rb
|
|
2493
2529
|
- lib/ultracart_api/models/sfvb_comms_email.rb
|
|
2494
2530
|
- lib/ultracart_api/models/sfvb_comms_folder.rb
|
|
@@ -2503,15 +2539,37 @@ files:
|
|
|
2503
2539
|
- lib/ultracart_api/models/sfvb_comms_lists_response.rb
|
|
2504
2540
|
- lib/ultracart_api/models/sfvb_comms_member.rb
|
|
2505
2541
|
- lib/ultracart_api/models/sfvb_comms_members_response.rb
|
|
2542
|
+
- lib/ultracart_api/models/sfvb_comms_plan.rb
|
|
2543
|
+
- lib/ultracart_api/models/sfvb_comms_plan_response.rb
|
|
2506
2544
|
- lib/ultracart_api/models/sfvb_comms_postcard.rb
|
|
2545
|
+
- lib/ultracart_api/models/sfvb_comms_provider.rb
|
|
2546
|
+
- lib/ultracart_api/models/sfvb_comms_provider_import_request.rb
|
|
2547
|
+
- lib/ultracart_api/models/sfvb_comms_provider_import_response.rb
|
|
2548
|
+
- lib/ultracart_api/models/sfvb_comms_provider_list.rb
|
|
2549
|
+
- lib/ultracart_api/models/sfvb_comms_providers_response.rb
|
|
2507
2550
|
- lib/ultracart_api/models/sfvb_comms_segment.rb
|
|
2508
2551
|
- lib/ultracart_api/models/sfvb_comms_segment_detail.rb
|
|
2509
2552
|
- lib/ultracart_api/models/sfvb_comms_segment_response.rb
|
|
2510
2553
|
- lib/ultracart_api/models/sfvb_comms_segment_used_by.rb
|
|
2511
2554
|
- lib/ultracart_api/models/sfvb_comms_segment_write_request.rb
|
|
2512
2555
|
- lib/ultracart_api/models/sfvb_comms_segments_response.rb
|
|
2556
|
+
- lib/ultracart_api/models/sfvb_comms_sender.rb
|
|
2557
|
+
- lib/ultracart_api/models/sfvb_comms_sender_update.rb
|
|
2513
2558
|
- lib/ultracart_api/models/sfvb_comms_sending_domain.rb
|
|
2514
2559
|
- lib/ultracart_api/models/sfvb_comms_sending_domains_response.rb
|
|
2560
|
+
- lib/ultracart_api/models/sfvb_comms_sequence_stats_response.rb
|
|
2561
|
+
- lib/ultracart_api/models/sfvb_comms_settings.rb
|
|
2562
|
+
- lib/ultracart_api/models/sfvb_comms_settings_response.rb
|
|
2563
|
+
- lib/ultracart_api/models/sfvb_comms_settings_update_request.rb
|
|
2564
|
+
- lib/ultracart_api/models/sfvb_comms_stat.rb
|
|
2565
|
+
- lib/ultracart_api/models/sfvb_comms_step_stat.rb
|
|
2566
|
+
- lib/ultracart_api/models/sfvb_comms_template.rb
|
|
2567
|
+
- lib/ultracart_api/models/sfvb_comms_template_response.rb
|
|
2568
|
+
- lib/ultracart_api/models/sfvb_comms_templates_response.rb
|
|
2569
|
+
- lib/ultracart_api/models/sfvb_comms_test_email_request.rb
|
|
2570
|
+
- lib/ultracart_api/models/sfvb_comms_test_postcard_request.rb
|
|
2571
|
+
- lib/ultracart_api/models/sfvb_comms_test_send_response.rb
|
|
2572
|
+
- lib/ultracart_api/models/sfvb_comms_test_sms_request.rb
|
|
2515
2573
|
- lib/ultracart_api/models/sfvb_comms_twilio_account.rb
|
|
2516
2574
|
- lib/ultracart_api/models/sfvb_comms_twilio_account_response.rb
|
|
2517
2575
|
- lib/ultracart_api/models/sfvb_compile_request.rb
|