late-sdk 0.0.77 → 0.0.79

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -1
  3. data/docs/BroadcastsApi.md +7 -6
  4. data/docs/BulkCreateContacts200Response.md +26 -0
  5. data/docs/CommentAutomationsApi.md +28 -24
  6. data/docs/ContactsApi.md +42 -36
  7. data/docs/CreateBroadcast200Response.md +20 -0
  8. data/docs/CreateBroadcast200ResponseBroadcast.md +30 -0
  9. data/docs/CreateCommentAutomation200Response.md +20 -0
  10. data/docs/CreateCommentAutomation200ResponseAutomation.md +38 -0
  11. data/docs/CreateCommentAutomation200ResponseAutomationStats.md +22 -0
  12. data/docs/CreateContact200Response.md +24 -0
  13. data/docs/CreateContact200ResponseChannel.md +24 -0
  14. data/docs/CreateContact200ResponseContact.md +36 -0
  15. data/docs/CreateCustomField200Response.md +20 -0
  16. data/docs/CreateSequence200Response.md +20 -0
  17. data/docs/CreateSequence200ResponseSequence.md +30 -0
  18. data/docs/CustomFieldsApi.md +21 -18
  19. data/docs/GetBroadcast200ResponseBroadcast.md +1 -1
  20. data/docs/GetCommentAutomation200Response.md +22 -0
  21. data/docs/GetCommentAutomation200ResponseAutomation.md +46 -0
  22. data/docs/GetCommentAutomation200ResponseLogsInner.md +32 -0
  23. data/docs/GetContact200Response.md +22 -0
  24. data/docs/GetContact200ResponseChannelsInner.md +32 -0
  25. data/docs/GetContact200ResponseContact.md +42 -0
  26. data/docs/GetContactChannels200Response.md +20 -0
  27. data/docs/GetContactChannels200ResponseChannelsInner.md +34 -0
  28. data/docs/ListCommentAutomationLogs200Response.md +22 -0
  29. data/docs/ListContacts200Response.md +24 -0
  30. data/docs/ListContacts200ResponseContactsInner.md +52 -0
  31. data/docs/{GetBroadcast200ResponseBroadcastSegmentFilters.md → ListContacts200ResponseFilters.md} +2 -2
  32. data/docs/ListCustomFields200Response.md +20 -0
  33. data/docs/ListCustomFields200ResponseFieldsInner.md +28 -0
  34. data/docs/SequencesApi.md +7 -6
  35. data/docs/UpdateCommentAutomation200Response.md +20 -0
  36. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  37. data/docs/UpdateContact200Response.md +20 -0
  38. data/docs/UpdateContact200ResponseContact.md +36 -0
  39. data/docs/UpdateCustomField200Response.md +20 -0
  40. data/docs/UpdateCustomField200ResponseField.md +26 -0
  41. data/lib/late-sdk/api/broadcasts_api.rb +5 -5
  42. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  43. data/lib/late-sdk/api/contacts_api.rb +30 -30
  44. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  45. data/lib/late-sdk/api/sequences_api.rb +5 -5
  46. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  47. data/lib/late-sdk/models/create_broadcast200_response.rb +156 -0
  48. data/lib/late-sdk/models/create_broadcast200_response_broadcast.rb +201 -0
  49. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  50. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  51. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  52. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  53. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  54. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  55. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  56. data/lib/late-sdk/models/create_sequence200_response.rb +156 -0
  57. data/lib/late-sdk/models/create_sequence200_response_sequence.rb +201 -0
  58. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  59. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  60. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  61. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  62. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  63. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  64. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  65. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  66. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  67. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  68. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  69. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  70. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  71. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  72. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  73. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  74. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  75. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  76. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  77. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  78. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  79. data/lib/late-sdk/version.rb +1 -1
  80. data/lib/late-sdk.rb +32 -1
  81. data/openapi.yaml +360 -15
  82. data/spec/api/broadcasts_api_spec.rb +1 -1
  83. data/spec/api/comment_automations_api_spec.rb +4 -4
  84. data/spec/api/contacts_api_spec.rb +6 -6
  85. data/spec/api/custom_fields_api_spec.rb +3 -3
  86. data/spec/api/sequences_api_spec.rb +1 -1
  87. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  88. data/spec/models/create_broadcast200_response_broadcast_spec.rb +72 -0
  89. data/spec/models/create_broadcast200_response_spec.rb +42 -0
  90. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  91. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  92. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  93. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  94. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  95. data/spec/models/create_contact200_response_spec.rb +54 -0
  96. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  97. data/spec/models/create_sequence200_response_sequence_spec.rb +72 -0
  98. data/spec/models/create_sequence200_response_spec.rb +42 -0
  99. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  100. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  101. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  102. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  103. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  104. data/spec/models/get_contact200_response_spec.rb +48 -0
  105. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  106. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  107. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  108. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  109. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  110. data/spec/models/list_contacts200_response_spec.rb +54 -0
  111. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  112. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  113. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  114. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  115. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  116. data/spec/models/update_contact200_response_spec.rb +42 -0
  117. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  118. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  119. data/zernio-sdk-0.0.79.gem +0 -0
  120. metadata +130 -6
  121. data/zernio-sdk-0.0.77.gem +0 -0
@@ -0,0 +1,167 @@
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 ListCommentAutomationLogs200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :logs
21
+
22
+ attr_accessor :pagination
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'success' => :'success',
28
+ :'logs' => :'logs',
29
+ :'pagination' => :'pagination'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'success' => :'Boolean',
47
+ :'logs' => :'Array<GetCommentAutomation200ResponseLogsInner>',
48
+ :'pagination' => :'GetWhatsAppContacts200ResponsePagination'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListCommentAutomationLogs200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListCommentAutomationLogs200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'success')
75
+ self.success = attributes[:'success']
76
+ end
77
+
78
+ if attributes.key?(:'logs')
79
+ if (value = attributes[:'logs']).is_a?(Array)
80
+ self.logs = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'pagination')
85
+ self.pagination = attributes[:'pagination']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ success == o.success &&
110
+ logs == o.logs &&
111
+ pagination == o.pagination
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [success, logs, pagination].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -0,0 +1,176 @@
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 ListContacts200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :contacts
21
+
22
+ attr_accessor :filters
23
+
24
+ attr_accessor :pagination
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'contacts' => :'contacts',
31
+ :'filters' => :'filters',
32
+ :'pagination' => :'pagination'
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
+ :'success' => :'Boolean',
50
+ :'contacts' => :'Array<ListContacts200ResponseContactsInner>',
51
+ :'filters' => :'ListContacts200ResponseFilters',
52
+ :'pagination' => :'GetWhatsAppContacts200ResponsePagination'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListContacts200Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListContacts200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'success')
79
+ self.success = attributes[:'success']
80
+ end
81
+
82
+ if attributes.key?(:'contacts')
83
+ if (value = attributes[:'contacts']).is_a?(Array)
84
+ self.contacts = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'filters')
89
+ self.filters = attributes[:'filters']
90
+ end
91
+
92
+ if attributes.key?(:'pagination')
93
+ self.pagination = attributes[:'pagination']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ success == o.success &&
118
+ contacts == o.contacts &&
119
+ filters == o.filters &&
120
+ pagination == o.pagination
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [success, contacts, filters, pagination].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ self.class.attribute_map.each_pair do |attr, param|
163
+ value = self.send(attr)
164
+ if value.nil?
165
+ is_nullable = self.class.openapi_nullable.include?(attr)
166
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
167
+ end
168
+
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ end
175
+
176
+ end
@@ -0,0 +1,302 @@
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 ListContacts200ResponseContactsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :email
23
+
24
+ attr_accessor :company
25
+
26
+ attr_accessor :avatar_url
27
+
28
+ attr_accessor :tags
29
+
30
+ attr_accessor :is_subscribed
31
+
32
+ attr_accessor :is_blocked
33
+
34
+ attr_accessor :last_message_sent_at
35
+
36
+ attr_accessor :last_message_received_at
37
+
38
+ attr_accessor :messages_sent_count
39
+
40
+ attr_accessor :messages_received_count
41
+
42
+ attr_accessor :custom_fields
43
+
44
+ attr_accessor :notes
45
+
46
+ attr_accessor :created_at
47
+
48
+ attr_accessor :platform
49
+
50
+ attr_accessor :platform_identifier
51
+
52
+ attr_accessor :display_identifier
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'id' => :'id',
58
+ :'name' => :'name',
59
+ :'email' => :'email',
60
+ :'company' => :'company',
61
+ :'avatar_url' => :'avatarUrl',
62
+ :'tags' => :'tags',
63
+ :'is_subscribed' => :'isSubscribed',
64
+ :'is_blocked' => :'isBlocked',
65
+ :'last_message_sent_at' => :'lastMessageSentAt',
66
+ :'last_message_received_at' => :'lastMessageReceivedAt',
67
+ :'messages_sent_count' => :'messagesSentCount',
68
+ :'messages_received_count' => :'messagesReceivedCount',
69
+ :'custom_fields' => :'customFields',
70
+ :'notes' => :'notes',
71
+ :'created_at' => :'createdAt',
72
+ :'platform' => :'platform',
73
+ :'platform_identifier' => :'platformIdentifier',
74
+ :'display_identifier' => :'displayIdentifier'
75
+ }
76
+ end
77
+
78
+ # Returns attribute mapping this model knows about
79
+ def self.acceptable_attribute_map
80
+ attribute_map
81
+ end
82
+
83
+ # Returns all the JSON keys this model knows about
84
+ def self.acceptable_attributes
85
+ acceptable_attribute_map.values
86
+ end
87
+
88
+ # Attribute type mapping.
89
+ def self.openapi_types
90
+ {
91
+ :'id' => :'String',
92
+ :'name' => :'String',
93
+ :'email' => :'String',
94
+ :'company' => :'String',
95
+ :'avatar_url' => :'String',
96
+ :'tags' => :'Array<String>',
97
+ :'is_subscribed' => :'Boolean',
98
+ :'is_blocked' => :'Boolean',
99
+ :'last_message_sent_at' => :'Time',
100
+ :'last_message_received_at' => :'Time',
101
+ :'messages_sent_count' => :'Integer',
102
+ :'messages_received_count' => :'Integer',
103
+ :'custom_fields' => :'Object',
104
+ :'notes' => :'String',
105
+ :'created_at' => :'Time',
106
+ :'platform' => :'String',
107
+ :'platform_identifier' => :'String',
108
+ :'display_identifier' => :'String'
109
+ }
110
+ end
111
+
112
+ # List of attributes with nullable: true
113
+ def self.openapi_nullable
114
+ Set.new([
115
+ ])
116
+ end
117
+
118
+ # Initializes the object
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ def initialize(attributes = {})
121
+ if (!attributes.is_a?(Hash))
122
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListContacts200ResponseContactsInner` initialize method"
123
+ end
124
+
125
+ # check to see if the attribute exists and convert string to symbol for hash key
126
+ acceptable_attribute_map = self.class.acceptable_attribute_map
127
+ attributes = attributes.each_with_object({}) { |(k, v), h|
128
+ if (!acceptable_attribute_map.key?(k.to_sym))
129
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListContacts200ResponseContactsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
130
+ end
131
+ h[k.to_sym] = v
132
+ }
133
+
134
+ if attributes.key?(:'id')
135
+ self.id = attributes[:'id']
136
+ end
137
+
138
+ if attributes.key?(:'name')
139
+ self.name = attributes[:'name']
140
+ end
141
+
142
+ if attributes.key?(:'email')
143
+ self.email = attributes[:'email']
144
+ end
145
+
146
+ if attributes.key?(:'company')
147
+ self.company = attributes[:'company']
148
+ end
149
+
150
+ if attributes.key?(:'avatar_url')
151
+ self.avatar_url = attributes[:'avatar_url']
152
+ end
153
+
154
+ if attributes.key?(:'tags')
155
+ if (value = attributes[:'tags']).is_a?(Array)
156
+ self.tags = value
157
+ end
158
+ end
159
+
160
+ if attributes.key?(:'is_subscribed')
161
+ self.is_subscribed = attributes[:'is_subscribed']
162
+ end
163
+
164
+ if attributes.key?(:'is_blocked')
165
+ self.is_blocked = attributes[:'is_blocked']
166
+ end
167
+
168
+ if attributes.key?(:'last_message_sent_at')
169
+ self.last_message_sent_at = attributes[:'last_message_sent_at']
170
+ end
171
+
172
+ if attributes.key?(:'last_message_received_at')
173
+ self.last_message_received_at = attributes[:'last_message_received_at']
174
+ end
175
+
176
+ if attributes.key?(:'messages_sent_count')
177
+ self.messages_sent_count = attributes[:'messages_sent_count']
178
+ end
179
+
180
+ if attributes.key?(:'messages_received_count')
181
+ self.messages_received_count = attributes[:'messages_received_count']
182
+ end
183
+
184
+ if attributes.key?(:'custom_fields')
185
+ self.custom_fields = attributes[:'custom_fields']
186
+ end
187
+
188
+ if attributes.key?(:'notes')
189
+ self.notes = attributes[:'notes']
190
+ end
191
+
192
+ if attributes.key?(:'created_at')
193
+ self.created_at = attributes[:'created_at']
194
+ end
195
+
196
+ if attributes.key?(:'platform')
197
+ self.platform = attributes[:'platform']
198
+ end
199
+
200
+ if attributes.key?(:'platform_identifier')
201
+ self.platform_identifier = attributes[:'platform_identifier']
202
+ end
203
+
204
+ if attributes.key?(:'display_identifier')
205
+ self.display_identifier = attributes[:'display_identifier']
206
+ end
207
+ end
208
+
209
+ # Show invalid properties with the reasons. Usually used together with valid?
210
+ # @return Array for valid properties with the reasons
211
+ def list_invalid_properties
212
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
213
+ invalid_properties = Array.new
214
+ invalid_properties
215
+ end
216
+
217
+ # Check to see if the all the properties in the model are valid
218
+ # @return true if the model is valid
219
+ def valid?
220
+ warn '[DEPRECATED] the `valid?` method is obsolete'
221
+ true
222
+ end
223
+
224
+ # Checks equality by comparing each attribute.
225
+ # @param [Object] Object to be compared
226
+ def ==(o)
227
+ return true if self.equal?(o)
228
+ self.class == o.class &&
229
+ id == o.id &&
230
+ name == o.name &&
231
+ email == o.email &&
232
+ company == o.company &&
233
+ avatar_url == o.avatar_url &&
234
+ tags == o.tags &&
235
+ is_subscribed == o.is_subscribed &&
236
+ is_blocked == o.is_blocked &&
237
+ last_message_sent_at == o.last_message_sent_at &&
238
+ last_message_received_at == o.last_message_received_at &&
239
+ messages_sent_count == o.messages_sent_count &&
240
+ messages_received_count == o.messages_received_count &&
241
+ custom_fields == o.custom_fields &&
242
+ notes == o.notes &&
243
+ created_at == o.created_at &&
244
+ platform == o.platform &&
245
+ platform_identifier == o.platform_identifier &&
246
+ display_identifier == o.display_identifier
247
+ end
248
+
249
+ # @see the `==` method
250
+ # @param [Object] Object to be compared
251
+ def eql?(o)
252
+ self == o
253
+ end
254
+
255
+ # Calculates hash code according to all attributes.
256
+ # @return [Integer] Hash code
257
+ def hash
258
+ [id, name, email, company, avatar_url, tags, is_subscribed, is_blocked, last_message_sent_at, last_message_received_at, messages_sent_count, messages_received_count, custom_fields, notes, created_at, platform, platform_identifier, display_identifier].hash
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def self.build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ attributes = attributes.transform_keys(&:to_sym)
267
+ transformed_hash = {}
268
+ openapi_types.each_pair do |key, type|
269
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = nil
271
+ elsif type =~ /\AArray<(.*)>/i
272
+ # check to ensure the input is an array given that the attribute
273
+ # is documented as an array but the input is not
274
+ if attributes[attribute_map[key]].is_a?(Array)
275
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
276
+ end
277
+ elsif !attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
279
+ end
280
+ end
281
+ new(transformed_hash)
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Late
17
- class GetBroadcast200ResponseBroadcastSegmentFilters < ApiModelBase
17
+ class ListContacts200ResponseFilters < ApiModelBase
18
18
  attr_accessor :tags
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -51,14 +51,14 @@ module Late
51
51
  # @param [Hash] attributes Model attributes in the form of hash
52
52
  def initialize(attributes = {})
53
53
  if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetBroadcast200ResponseBroadcastSegmentFilters` initialize method"
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ListContacts200ResponseFilters` initialize method"
55
55
  end
56
56
 
57
57
  # check to see if the attribute exists and convert string to symbol for hash key
58
58
  acceptable_attribute_map = self.class.acceptable_attribute_map
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!acceptable_attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetBroadcast200ResponseBroadcastSegmentFilters`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ListContacts200ResponseFilters`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }