late-sdk 0.0.84 → 0.0.85

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -0
  3. data/docs/AddWhatsAppGroupParticipantsRequest.md +18 -0
  4. data/docs/ApproveWhatsAppGroupJoinRequestsRequest.md +18 -0
  5. data/docs/CreateWhatsAppGroupChat201Response.md +20 -0
  6. data/docs/CreateWhatsAppGroupChat201ResponseGroup.md +20 -0
  7. data/docs/CreateWhatsAppGroupChatRequest.md +24 -0
  8. data/docs/CreateWhatsAppGroupInviteLink200Response.md +20 -0
  9. data/docs/GetWhatsAppGroupChat200Response.md +20 -0
  10. data/docs/GetWhatsAppGroupChat200ResponseGroup.md +32 -0
  11. data/docs/GetWhatsAppGroupChat200ResponseGroupParticipantsInner.md +20 -0
  12. data/docs/ListWhatsAppGroupChats200Response.md +20 -0
  13. data/docs/ListWhatsAppGroupChats200ResponseGroupsInner.md +22 -0
  14. data/docs/ListWhatsAppGroupChats200ResponsePaging.md +18 -0
  15. data/docs/ListWhatsAppGroupChats200ResponsePagingCursors.md +20 -0
  16. data/docs/ListWhatsAppGroupJoinRequests200Response.md +20 -0
  17. data/docs/ListWhatsAppGroupJoinRequests200ResponseJoinRequestsInner.md +20 -0
  18. data/docs/RejectWhatsAppGroupJoinRequestsRequest.md +18 -0
  19. data/docs/RemoveWhatsAppGroupParticipantsRequest.md +18 -0
  20. data/docs/UpdateWhatsAppGroupChatRequest.md +22 -0
  21. data/docs/WhatsAppApi.md +958 -154
  22. data/lib/late-sdk/api/whats_app_api.rb +945 -118
  23. data/lib/late-sdk/models/add_whats_app_group_participants_request.rb +176 -0
  24. data/lib/late-sdk/models/approve_whats_app_group_join_requests_request.rb +167 -0
  25. data/lib/late-sdk/models/create_whats_app_group_chat201_response.rb +156 -0
  26. data/lib/late-sdk/models/create_whats_app_group_chat201_response_group.rb +156 -0
  27. data/lib/late-sdk/models/create_whats_app_group_chat_request.rb +274 -0
  28. data/lib/late-sdk/models/create_whats_app_group_invite_link200_response.rb +156 -0
  29. data/lib/late-sdk/models/get_whats_app_group_chat200_response.rb +156 -0
  30. data/lib/late-sdk/models/get_whats_app_group_chat200_response_group.rb +213 -0
  31. data/lib/late-sdk/models/get_whats_app_group_chat200_response_group_participants_inner.rb +157 -0
  32. data/lib/late-sdk/models/list_whats_app_group_chats200_response.rb +158 -0
  33. data/lib/late-sdk/models/list_whats_app_group_chats200_response_groups_inner.rb +168 -0
  34. data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging.rb +147 -0
  35. data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging_cursors.rb +156 -0
  36. data/lib/late-sdk/models/list_whats_app_group_join_requests200_response.rb +158 -0
  37. data/lib/late-sdk/models/list_whats_app_group_join_requests200_response_join_requests_inner.rb +158 -0
  38. data/lib/late-sdk/models/reject_whats_app_group_join_requests_request.rb +167 -0
  39. data/lib/late-sdk/models/remove_whats_app_group_participants_request.rb +167 -0
  40. data/lib/late-sdk/models/update_whats_app_group_chat_request.rb +237 -0
  41. data/lib/late-sdk/version.rb +1 -1
  42. data/lib/late-sdk.rb +18 -0
  43. data/openapi.yaml +371 -0
  44. data/spec/api/whats_app_api_spec.rb +148 -0
  45. data/spec/models/add_whats_app_group_participants_request_spec.rb +36 -0
  46. data/spec/models/approve_whats_app_group_join_requests_request_spec.rb +36 -0
  47. data/spec/models/create_whats_app_group_chat201_response_group_spec.rb +42 -0
  48. data/spec/models/create_whats_app_group_chat201_response_spec.rb +42 -0
  49. data/spec/models/create_whats_app_group_chat_request_spec.rb +58 -0
  50. data/spec/models/create_whats_app_group_invite_link200_response_spec.rb +42 -0
  51. data/spec/models/get_whats_app_group_chat200_response_group_participants_inner_spec.rb +42 -0
  52. data/spec/models/get_whats_app_group_chat200_response_group_spec.rb +78 -0
  53. data/spec/models/get_whats_app_group_chat200_response_spec.rb +42 -0
  54. data/spec/models/list_whats_app_group_chats200_response_groups_inner_spec.rb +48 -0
  55. data/spec/models/list_whats_app_group_chats200_response_paging_cursors_spec.rb +42 -0
  56. data/spec/models/list_whats_app_group_chats200_response_paging_spec.rb +36 -0
  57. data/spec/models/list_whats_app_group_chats200_response_spec.rb +42 -0
  58. data/spec/models/list_whats_app_group_join_requests200_response_join_requests_inner_spec.rb +42 -0
  59. data/spec/models/list_whats_app_group_join_requests200_response_spec.rb +42 -0
  60. data/spec/models/reject_whats_app_group_join_requests_request_spec.rb +36 -0
  61. data/spec/models/remove_whats_app_group_participants_request_spec.rb +36 -0
  62. data/spec/models/update_whats_app_group_chat_request_spec.rb +52 -0
  63. data/zernio-sdk-0.0.85.gem +0 -0
  64. metadata +74 -2
  65. data/zernio-sdk-0.0.84.gem +0 -0
@@ -0,0 +1,213 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetWhatsAppGroupChat200ResponseGroup < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :subject
21
+
22
+ attr_accessor :description
23
+
24
+ attr_accessor :join_approval_mode
25
+
26
+ attr_accessor :participants
27
+
28
+ attr_accessor :participant_count
29
+
30
+ # UNIX timestamp
31
+ attr_accessor :created_at
32
+
33
+ attr_accessor :is_suspended
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'id' => :'id',
39
+ :'subject' => :'subject',
40
+ :'description' => :'description',
41
+ :'join_approval_mode' => :'joinApprovalMode',
42
+ :'participants' => :'participants',
43
+ :'participant_count' => :'participantCount',
44
+ :'created_at' => :'createdAt',
45
+ :'is_suspended' => :'isSuspended'
46
+ }
47
+ end
48
+
49
+ # Returns attribute mapping this model knows about
50
+ def self.acceptable_attribute_map
51
+ attribute_map
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ acceptable_attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'id' => :'String',
63
+ :'subject' => :'String',
64
+ :'description' => :'String',
65
+ :'join_approval_mode' => :'String',
66
+ :'participants' => :'Array<GetWhatsAppGroupChat200ResponseGroupParticipantsInner>',
67
+ :'participant_count' => :'Integer',
68
+ :'created_at' => :'Integer',
69
+ :'is_suspended' => :'Boolean'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetWhatsAppGroupChat200ResponseGroup` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetWhatsAppGroupChat200ResponseGroup`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'id')
96
+ self.id = attributes[:'id']
97
+ end
98
+
99
+ if attributes.key?(:'subject')
100
+ self.subject = attributes[:'subject']
101
+ end
102
+
103
+ if attributes.key?(:'description')
104
+ self.description = attributes[:'description']
105
+ end
106
+
107
+ if attributes.key?(:'join_approval_mode')
108
+ self.join_approval_mode = attributes[:'join_approval_mode']
109
+ end
110
+
111
+ if attributes.key?(:'participants')
112
+ if (value = attributes[:'participants']).is_a?(Array)
113
+ self.participants = value
114
+ end
115
+ end
116
+
117
+ if attributes.key?(:'participant_count')
118
+ self.participant_count = attributes[:'participant_count']
119
+ end
120
+
121
+ if attributes.key?(:'created_at')
122
+ self.created_at = attributes[:'created_at']
123
+ end
124
+
125
+ if attributes.key?(:'is_suspended')
126
+ self.is_suspended = attributes[:'is_suspended']
127
+ end
128
+ end
129
+
130
+ # Show invalid properties with the reasons. Usually used together with valid?
131
+ # @return Array for valid properties with the reasons
132
+ def list_invalid_properties
133
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
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
+ warn '[DEPRECATED] the `valid?` method is obsolete'
142
+ true
143
+ end
144
+
145
+ # Checks equality by comparing each attribute.
146
+ # @param [Object] Object to be compared
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ id == o.id &&
151
+ subject == o.subject &&
152
+ description == o.description &&
153
+ join_approval_mode == o.join_approval_mode &&
154
+ participants == o.participants &&
155
+ participant_count == o.participant_count &&
156
+ created_at == o.created_at &&
157
+ is_suspended == o.is_suspended
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ def hash
169
+ [id, subject, description, join_approval_mode, participants, participant_count, created_at, is_suspended].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def self.build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ attributes = attributes.transform_keys(&:to_sym)
178
+ transformed_hash = {}
179
+ openapi_types.each_pair do |key, type|
180
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = nil
182
+ elsif type =~ /\AArray<(.*)>/i
183
+ # check to ensure the input is an array given that the attribute
184
+ # is documented as an array but the input is not
185
+ if attributes[attribute_map[key]].is_a?(Array)
186
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
187
+ end
188
+ elsif !attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
190
+ end
191
+ end
192
+ new(transformed_hash)
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ end
212
+
213
+ end
@@ -0,0 +1,157 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetWhatsAppGroupChat200ResponseGroupParticipantsInner < ApiModelBase
18
+ # Phone number
19
+ attr_accessor :user
20
+
21
+ attr_accessor :admin
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'user' => :'user',
27
+ :'admin' => :'admin'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'user' => :'String',
45
+ :'admin' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetWhatsAppGroupChat200ResponseGroupParticipantsInner` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetWhatsAppGroupChat200ResponseGroupParticipantsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'user')
72
+ self.user = attributes[:'user']
73
+ end
74
+
75
+ if attributes.key?(:'admin')
76
+ self.admin = attributes[:'admin']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ true
93
+ end
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] Object to be compared
97
+ def ==(o)
98
+ return true if self.equal?(o)
99
+ self.class == o.class &&
100
+ user == o.user &&
101
+ admin == o.admin
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [user, admin].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ transformed_hash = {}
123
+ openapi_types.each_pair do |key, type|
124
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = nil
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[attribute_map[key]].is_a?(Array)
130
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
131
+ end
132
+ elsif !attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
134
+ end
135
+ end
136
+ new(transformed_hash)
137
+ end
138
+
139
+ # Returns the object in the form of hash
140
+ # @return [Hash] Returns the object in the form of hash
141
+ def to_hash
142
+ hash = {}
143
+ self.class.attribute_map.each_pair do |attr, param|
144
+ value = self.send(attr)
145
+ if value.nil?
146
+ is_nullable = self.class.openapi_nullable.include?(attr)
147
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
148
+ end
149
+
150
+ hash[param] = _to_hash(value)
151
+ end
152
+ hash
153
+ end
154
+
155
+ end
156
+
157
+ end
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class ListWhatsAppGroupChats200Response < ApiModelBase
18
+ attr_accessor :groups
19
+
20
+ attr_accessor :paging
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'groups' => :'groups',
26
+ :'paging' => :'paging'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'groups' => :'Array<ListWhatsAppGroupChats200ResponseGroupsInner>',
44
+ :'paging' => :'ListWhatsAppGroupChats200ResponsePaging'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListWhatsAppGroupChats200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListWhatsAppGroupChats200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'groups')
71
+ if (value = attributes[:'groups']).is_a?(Array)
72
+ self.groups = value
73
+ end
74
+ end
75
+
76
+ if attributes.key?(:'paging')
77
+ self.paging = attributes[:'paging']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ groups == o.groups &&
102
+ paging == o.paging
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [groups, paging].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{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[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,168 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class ListWhatsAppGroupChats200ResponseGroupsInner < ApiModelBase
18
+ # Group ID
19
+ attr_accessor :id
20
+
21
+ # Group name
22
+ attr_accessor :subject
23
+
24
+ # Group creation timestamp
25
+ attr_accessor :created_at
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'subject' => :'subject',
32
+ :'created_at' => :'createdAt'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'subject' => :'String',
51
+ :'created_at' => :'String'
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 `Late::ListWhatsAppGroupChats200ResponseGroupsInner` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListWhatsAppGroupChats200ResponseGroupsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'subject')
82
+ self.subject = attributes[:'subject']
83
+ end
84
+
85
+ if attributes.key?(:'created_at')
86
+ self.created_at = attributes[:'created_at']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ id == o.id &&
111
+ subject == o.subject &&
112
+ created_at == o.created_at
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [id, subject, created_at].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Returns the object in the form of hash
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_hash
153
+ hash = {}
154
+ self.class.attribute_map.each_pair do |attr, param|
155
+ value = self.send(attr)
156
+ if value.nil?
157
+ is_nullable = self.class.openapi_nullable.include?(attr)
158
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
+ end
160
+
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ end
167
+
168
+ end