ultracart_api 3.10.77 → 3.10.78

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationCannedMessagesSearch
17
+ attr_accessor :max_results
18
+
19
+ attr_accessor :short_code
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'max_results' => :'max_results',
25
+ :'short_code' => :'short_code'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'max_results' => :'Integer',
33
+ :'short_code' => :'String'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'max_results')
46
+ self.max_results = attributes[:'max_results']
47
+ end
48
+
49
+ if attributes.has_key?(:'short_code')
50
+ self.short_code = attributes[:'short_code']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ max_results == o.max_results &&
73
+ short_code == o.short_code
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [max_results, short_code].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :BOOLEAN
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = UltracartClient.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ # Outputs non-array value in the form of hash
175
+ # For object, use to_hash. Otherwise, just return the value
176
+ # @param [Object] value Any valid value
177
+ # @return [Hash] Returns the value in the form of hash
178
+ def _to_hash(value)
179
+ if value.is_a?(Array)
180
+ value.compact.map { |v| _to_hash(v) }
181
+ elsif value.is_a?(Hash)
182
+ {}.tap do |hash|
183
+ value.each { |k, v| hash[k] = _to_hash(v) }
184
+ end
185
+ elsif value.respond_to? :to_hash
186
+ value.to_hash
187
+ else
188
+ value
189
+ end
190
+ end
191
+
192
+ end
193
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.77'
14
+ VERSION = '3.10.78'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -138,6 +138,10 @@ require 'ultracart_api/models/city_state_zip'
138
138
  require 'ultracart_api/models/conversation'
139
139
  require 'ultracart_api/models/conversation_agent_auth'
140
140
  require 'ultracart_api/models/conversation_agent_auth_response'
141
+ require 'ultracart_api/models/conversation_canned_message'
142
+ require 'ultracart_api/models/conversation_canned_message_response'
143
+ require 'ultracart_api/models/conversation_canned_messages_response'
144
+ require 'ultracart_api/models/conversation_canned_messages_search'
141
145
  require 'ultracart_api/models/conversation_event_add_coupon'
142
146
  require 'ultracart_api/models/conversation_event_add_item'
143
147
  require 'ultracart_api/models/conversation_event_queue_position'
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: 3.10.77
4
+ version: 3.10.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -348,6 +348,10 @@ files:
348
348
  - docs/ConversationAgentAuth.md
349
349
  - docs/ConversationAgentAuthResponse.md
350
350
  - docs/ConversationApi.md
351
+ - docs/ConversationCannedMessage.md
352
+ - docs/ConversationCannedMessageResponse.md
353
+ - docs/ConversationCannedMessagesResponse.md
354
+ - docs/ConversationCannedMessagesSearch.md
351
355
  - docs/ConversationEventAddCoupon.md
352
356
  - docs/ConversationEventAddItem.md
353
357
  - docs/ConversationEventQueuePosition.md
@@ -1078,6 +1082,10 @@ files:
1078
1082
  - lib/ultracart_api/models/conversation.rb
1079
1083
  - lib/ultracart_api/models/conversation_agent_auth.rb
1080
1084
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
1085
+ - lib/ultracart_api/models/conversation_canned_message.rb
1086
+ - lib/ultracart_api/models/conversation_canned_message_response.rb
1087
+ - lib/ultracart_api/models/conversation_canned_messages_response.rb
1088
+ - lib/ultracart_api/models/conversation_canned_messages_search.rb
1081
1089
  - lib/ultracart_api/models/conversation_event_add_coupon.rb
1082
1090
  - lib/ultracart_api/models/conversation_event_add_item.rb
1083
1091
  - lib/ultracart_api/models/conversation_event_queue_position.rb