ultracart_api 4.1.206 → 4.1.207

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.
@@ -0,0 +1,252 @@
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 SfvbFlowsResponse
18
+ # The flows on this page, newest first.
19
+ attr_accessor :flows
20
+
21
+ # This page number, starting at 1.
22
+ attr_accessor :page
23
+
24
+ # The page size.
25
+ attr_accessor :page_size
26
+
27
+ # How many match, across every page.
28
+ attr_accessor :total
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'flows' => :'flows',
34
+ :'page' => :'page',
35
+ :'page_size' => :'page_size',
36
+ :'total' => :'total'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'flows' => :'Array<SfvbFlow>',
49
+ :'page' => :'Integer',
50
+ :'page_size' => :'Integer',
51
+ :'total' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbFlowsResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbFlowsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'flows')
77
+ if (value = attributes[:'flows']).is_a?(Array)
78
+ self.flows = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'page')
83
+ self.page = attributes[:'page']
84
+ end
85
+
86
+ if attributes.key?(:'page_size')
87
+ self.page_size = attributes[:'page_size']
88
+ end
89
+
90
+ if attributes.key?(:'total')
91
+ self.total = attributes[:'total']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ flows == o.flows &&
114
+ page == o.page &&
115
+ page_size == o.page_size &&
116
+ total == o.total
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [flows, page, page_size, total].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = UltracartClient.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.206'
14
+ VERSION = '4.1.207'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -996,7 +996,11 @@ require 'ultracart_api/models/sfvb_blog_post_image'
996
996
  require 'ultracart_api/models/sfvb_blog_post_image_request'
997
997
  require 'ultracart_api/models/sfvb_blog_post_request'
998
998
  require 'ultracart_api/models/sfvb_blog_posts_response'
999
+ require 'ultracart_api/models/sfvb_campaign'
1000
+ require 'ultracart_api/models/sfvb_campaigns_response'
999
1001
  require 'ultracart_api/models/sfvb_comms_dns_record'
1002
+ require 'ultracart_api/models/sfvb_comms_email'
1003
+ require 'ultracart_api/models/sfvb_comms_postcard'
1000
1004
  require 'ultracart_api/models/sfvb_comms_sending_domain'
1001
1005
  require 'ultracart_api/models/sfvb_comms_sending_domains_response'
1002
1006
  require 'ultracart_api/models/sfvb_comms_twilio_account'
@@ -1038,6 +1042,8 @@ require 'ultracart_api/models/sfvb_file_versions_response'
1038
1042
  require 'ultracart_api/models/sfvb_file_write_request'
1039
1043
  require 'ultracart_api/models/sfvb_file_write_response'
1040
1044
  require 'ultracart_api/models/sfvb_files_response'
1045
+ require 'ultracart_api/models/sfvb_flow'
1046
+ require 'ultracart_api/models/sfvb_flows_response'
1041
1047
  require 'ultracart_api/models/sfvb_i18n_glossary'
1042
1048
  require 'ultracart_api/models/sfvb_i18n_glossary_request'
1043
1049
  require 'ultracart_api/models/sfvb_i18n_language'
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.206
4
+ version: 4.1.207
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1058,7 +1058,11 @@ files:
1058
1058
  - docs/SfvbBlogPostImageRequest.md
1059
1059
  - docs/SfvbBlogPostRequest.md
1060
1060
  - docs/SfvbBlogPostsResponse.md
1061
+ - docs/SfvbCampaign.md
1062
+ - docs/SfvbCampaignsResponse.md
1061
1063
  - docs/SfvbCommsDnsRecord.md
1064
+ - docs/SfvbCommsEmail.md
1065
+ - docs/SfvbCommsPostcard.md
1062
1066
  - docs/SfvbCommsSendingDomain.md
1063
1067
  - docs/SfvbCommsSendingDomainsResponse.md
1064
1068
  - docs/SfvbCommsTwilioAccount.md
@@ -1100,6 +1104,8 @@ files:
1100
1104
  - docs/SfvbFileWriteRequest.md
1101
1105
  - docs/SfvbFileWriteResponse.md
1102
1106
  - docs/SfvbFilesResponse.md
1107
+ - docs/SfvbFlow.md
1108
+ - docs/SfvbFlowsResponse.md
1103
1109
  - docs/SfvbI18nGlossary.md
1104
1110
  - docs/SfvbI18nGlossaryRequest.md
1105
1111
  - docs/SfvbI18nLanguage.md
@@ -2383,7 +2389,11 @@ files:
2383
2389
  - lib/ultracart_api/models/sfvb_blog_post_image_request.rb
2384
2390
  - lib/ultracart_api/models/sfvb_blog_post_request.rb
2385
2391
  - lib/ultracart_api/models/sfvb_blog_posts_response.rb
2392
+ - lib/ultracart_api/models/sfvb_campaign.rb
2393
+ - lib/ultracart_api/models/sfvb_campaigns_response.rb
2386
2394
  - lib/ultracart_api/models/sfvb_comms_dns_record.rb
2395
+ - lib/ultracart_api/models/sfvb_comms_email.rb
2396
+ - lib/ultracart_api/models/sfvb_comms_postcard.rb
2387
2397
  - lib/ultracart_api/models/sfvb_comms_sending_domain.rb
2388
2398
  - lib/ultracart_api/models/sfvb_comms_sending_domains_response.rb
2389
2399
  - lib/ultracart_api/models/sfvb_comms_twilio_account.rb
@@ -2425,6 +2435,8 @@ files:
2425
2435
  - lib/ultracart_api/models/sfvb_file_write_request.rb
2426
2436
  - lib/ultracart_api/models/sfvb_file_write_response.rb
2427
2437
  - lib/ultracart_api/models/sfvb_files_response.rb
2438
+ - lib/ultracart_api/models/sfvb_flow.rb
2439
+ - lib/ultracart_api/models/sfvb_flows_response.rb
2428
2440
  - lib/ultracart_api/models/sfvb_i18n_glossary.rb
2429
2441
  - lib/ultracart_api/models/sfvb_i18n_glossary_request.rb
2430
2442
  - lib/ultracart_api/models/sfvb_i18n_language.rb