smooch-api 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -4
  3. data/docs/AppUserApi.md +0 -62
  4. data/lib/smooch-api/api/app_api.rb +1 -1
  5. data/lib/smooch-api/api/app_user_api.rb +1 -74
  6. data/lib/smooch-api/api/attachments_api.rb +1 -1
  7. data/lib/smooch-api/api/conversation_api.rb +1 -1
  8. data/lib/smooch-api/api/integration_api.rb +1 -1
  9. data/lib/smooch-api/api/menu_api.rb +1 -1
  10. data/lib/smooch-api/api/webhook_api.rb +1 -1
  11. data/lib/smooch-api/api_client.rb +1 -1
  12. data/lib/smooch-api/api_error.rb +1 -1
  13. data/lib/smooch-api/configuration.rb +1 -1
  14. data/lib/smooch-api/models/action.rb +1 -1
  15. data/lib/smooch-api/models/app.rb +1 -1
  16. data/lib/smooch-api/models/app_create.rb +1 -1
  17. data/lib/smooch-api/models/app_response.rb +1 -1
  18. data/lib/smooch-api/models/app_settings.rb +1 -1
  19. data/lib/smooch-api/models/app_update.rb +1 -1
  20. data/lib/smooch-api/models/app_user.rb +1 -1
  21. data/lib/smooch-api/models/app_user_link.rb +1 -1
  22. data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
  23. data/lib/smooch-api/models/app_user_response.rb +1 -1
  24. data/lib/smooch-api/models/app_user_update.rb +1 -1
  25. data/lib/smooch-api/models/attachment_response.rb +1 -1
  26. data/lib/smooch-api/models/client.rb +1 -1
  27. data/lib/smooch-api/models/client_info.rb +1 -1
  28. data/lib/smooch-api/models/confirmation.rb +1 -1
  29. data/lib/smooch-api/models/conversation.rb +1 -1
  30. data/lib/smooch-api/models/destination.rb +1 -1
  31. data/lib/smooch-api/models/display_settings.rb +1 -1
  32. data/lib/smooch-api/models/get_messages_response.rb +1 -1
  33. data/lib/smooch-api/models/integration.rb +1 -1
  34. data/lib/smooch-api/models/integration_create.rb +1 -1
  35. data/lib/smooch-api/models/integration_response.rb +1 -1
  36. data/lib/smooch-api/models/jwt_response.rb +1 -1
  37. data/lib/smooch-api/models/list_apps_response.rb +1 -1
  38. data/lib/smooch-api/models/list_integrations_response.rb +1 -1
  39. data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
  40. data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
  41. data/lib/smooch-api/models/menu.rb +1 -1
  42. data/lib/smooch-api/models/menu_item.rb +1 -1
  43. data/lib/smooch-api/models/menu_response.rb +1 -1
  44. data/lib/smooch-api/models/message.rb +1 -1
  45. data/lib/smooch-api/models/message_item.rb +1 -1
  46. data/lib/smooch-api/models/message_post.rb +1 -1
  47. data/lib/smooch-api/models/message_response.rb +1 -1
  48. data/lib/smooch-api/models/secret_key.rb +1 -1
  49. data/lib/smooch-api/models/secret_key_create.rb +1 -1
  50. data/lib/smooch-api/models/secret_key_response.rb +1 -1
  51. data/lib/smooch-api/models/source.rb +1 -1
  52. data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
  53. data/lib/smooch-api/models/webhook.rb +1 -1
  54. data/lib/smooch-api/models/webhook_create.rb +1 -1
  55. data/lib/smooch-api/models/webhook_response.rb +1 -1
  56. data/lib/smooch-api/models/webhook_update.rb +1 -1
  57. data/lib/smooch-api/version.rb +2 -2
  58. data/lib/smooch-api.rb +1 -3
  59. data/smooch-api.gemspec +1 -1
  60. data/spec/api_client_spec.rb +1 -1
  61. data/spec/configuration_spec.rb +1 -1
  62. data/spec/spec_helper.rb +1 -1
  63. metadata +2 -6
  64. data/docs/DeviceResponse.md +0 -8
  65. data/docs/DeviceUpdate.md +0 -10
  66. data/lib/smooch-api/models/device_response.rb +0 -189
  67. data/lib/smooch-api/models/device_update.rb +0 -208
@@ -1,208 +0,0 @@
1
- =begin
2
- #Smooch
3
-
4
- #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
-
6
- OpenAPI spec version: 2
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.2.3-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module SmoochApi
16
-
17
- class DeviceUpdate
18
- # The GCM or APN token to be used for sending push notifications to the device. Applies to only *android* and *ios* clients.
19
- attr_accessor :push_notification_token
20
-
21
- # A reserved string field for reporting the app version running on the device.
22
- attr_accessor :app_version
23
-
24
- attr_accessor :info
25
-
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'push_notification_token' => :'pushNotificationToken',
31
- :'app_version' => :'appVersion',
32
- :'info' => :'info'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.swagger_types
38
- {
39
- :'push_notification_token' => :'String',
40
- :'app_version' => :'String',
41
- :'info' => :'ClientInfo'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
52
-
53
- if attributes.has_key?(:'pushNotificationToken')
54
- self.push_notification_token = attributes[:'pushNotificationToken']
55
- end
56
-
57
- if attributes.has_key?(:'appVersion')
58
- self.app_version = attributes[:'appVersion']
59
- end
60
-
61
- if attributes.has_key?(:'info')
62
- self.info = attributes[:'info']
63
- end
64
-
65
- end
66
-
67
- # Show invalid properties with the reasons. Usually used together with valid?
68
- # @return Array for valid properies with the reasons
69
- def list_invalid_properties
70
- invalid_properties = Array.new
71
- return invalid_properties
72
- end
73
-
74
- # Check to see if the all the properties in the model are valid
75
- # @return true if the model is valid
76
- def valid?
77
- return true
78
- end
79
-
80
- # Checks equality by comparing each attribute.
81
- # @param [Object] Object to be compared
82
- def ==(o)
83
- return true if self.equal?(o)
84
- self.class == o.class &&
85
- push_notification_token == o.push_notification_token &&
86
- app_version == o.app_version &&
87
- info == o.info
88
- end
89
-
90
- # @see the `==` method
91
- # @param [Object] Object to be compared
92
- def eql?(o)
93
- self == o
94
- end
95
-
96
- # Calculates hash code according to all attributes.
97
- # @return [Fixnum] Hash code
98
- def hash
99
- [push_notification_token, app_version, info].hash
100
- end
101
-
102
- # Builds the object from hash
103
- # @param [Hash] attributes Model attributes in the form of hash
104
- # @return [Object] Returns the model itself
105
- def build_from_hash(attributes)
106
- return nil unless attributes.is_a?(Hash)
107
- self.class.swagger_types.each_pair do |key, type|
108
- if type =~ /\AArray<(.*)>/i
109
- # check to ensure the input is an array given that the the attribute
110
- # is documented as an array but the input is not
111
- if attributes[self.class.attribute_map[key]].is_a?(Array)
112
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
113
- end
114
- elsif !attributes[self.class.attribute_map[key]].nil?
115
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
- end # or else data not found in attributes(hash), not an issue as the data can be optional
117
- end
118
-
119
- self
120
- end
121
-
122
- # Deserializes the data based on type
123
- # @param string type Data type
124
- # @param string value Value to be deserialized
125
- # @return [Object] Deserialized data
126
- def _deserialize(type, value)
127
- case type.to_sym
128
- when :DateTime
129
- DateTime.parse(value)
130
- when :Date
131
- Date.parse(value)
132
- when :String
133
- value.to_s
134
- when :Integer
135
- value.to_i
136
- when :Float
137
- value.to_f
138
- when :BOOLEAN
139
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
140
- true
141
- else
142
- false
143
- end
144
- when :Object
145
- # generic object (usually a Hash), return directly
146
- value
147
- when /\AArray<(?<inner_type>.+)>\z/
148
- inner_type = Regexp.last_match[:inner_type]
149
- value.map { |v| _deserialize(inner_type, v) }
150
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
151
- k_type = Regexp.last_match[:k_type]
152
- v_type = Regexp.last_match[:v_type]
153
- {}.tap do |hash|
154
- value.each do |k, v|
155
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
- end
157
- end
158
- else # model
159
- temp_model = SmoochApi.const_get(type).new
160
- temp_model.build_from_hash(value)
161
- end
162
- end
163
-
164
- # Returns the string representation of the object
165
- # @return [String] String presentation of the object
166
- def to_s
167
- to_hash.to_s
168
- end
169
-
170
- # to_body is an alias to to_hash (backward compatibility)
171
- # @return [Hash] Returns the object in the form of hash
172
- def to_body
173
- to_hash
174
- end
175
-
176
- # Returns the object in the form of hash
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_hash
179
- hash = {}
180
- self.class.attribute_map.each_pair do |attr, param|
181
- value = self.send(attr)
182
- next if value.nil?
183
- hash[param] = _to_hash(value)
184
- end
185
- hash
186
- end
187
-
188
- # Outputs non-array value in the form of hash
189
- # For object, use to_hash. Otherwise, just return the value
190
- # @param [Object] value Any valid value
191
- # @return [Hash] Returns the value in the form of hash
192
- def _to_hash(value)
193
- if value.is_a?(Array)
194
- value.compact.map{ |v| _to_hash(v) }
195
- elsif value.is_a?(Hash)
196
- {}.tap do |hash|
197
- value.each { |k, v| hash[k] = _to_hash(v) }
198
- end
199
- elsif value.respond_to? :to_hash
200
- value.to_hash
201
- else
202
- value
203
- end
204
- end
205
-
206
- end
207
-
208
- end