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.
- checksums.yaml +4 -4
- data/README.md +29 -0
- data/docs/AddWhatsAppGroupParticipantsRequest.md +18 -0
- data/docs/ApproveWhatsAppGroupJoinRequestsRequest.md +18 -0
- data/docs/CreateWhatsAppGroupChat201Response.md +20 -0
- data/docs/CreateWhatsAppGroupChat201ResponseGroup.md +20 -0
- data/docs/CreateWhatsAppGroupChatRequest.md +24 -0
- data/docs/CreateWhatsAppGroupInviteLink200Response.md +20 -0
- data/docs/GetWhatsAppGroupChat200Response.md +20 -0
- data/docs/GetWhatsAppGroupChat200ResponseGroup.md +32 -0
- data/docs/GetWhatsAppGroupChat200ResponseGroupParticipantsInner.md +20 -0
- data/docs/ListWhatsAppGroupChats200Response.md +20 -0
- data/docs/ListWhatsAppGroupChats200ResponseGroupsInner.md +22 -0
- data/docs/ListWhatsAppGroupChats200ResponsePaging.md +18 -0
- data/docs/ListWhatsAppGroupChats200ResponsePagingCursors.md +20 -0
- data/docs/ListWhatsAppGroupJoinRequests200Response.md +20 -0
- data/docs/ListWhatsAppGroupJoinRequests200ResponseJoinRequestsInner.md +20 -0
- data/docs/RejectWhatsAppGroupJoinRequestsRequest.md +18 -0
- data/docs/RemoveWhatsAppGroupParticipantsRequest.md +18 -0
- data/docs/UpdateWhatsAppGroupChatRequest.md +22 -0
- data/docs/WhatsAppApi.md +958 -154
- data/lib/late-sdk/api/whats_app_api.rb +945 -118
- data/lib/late-sdk/models/add_whats_app_group_participants_request.rb +176 -0
- data/lib/late-sdk/models/approve_whats_app_group_join_requests_request.rb +167 -0
- data/lib/late-sdk/models/create_whats_app_group_chat201_response.rb +156 -0
- data/lib/late-sdk/models/create_whats_app_group_chat201_response_group.rb +156 -0
- data/lib/late-sdk/models/create_whats_app_group_chat_request.rb +274 -0
- data/lib/late-sdk/models/create_whats_app_group_invite_link200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response_group.rb +213 -0
- data/lib/late-sdk/models/get_whats_app_group_chat200_response_group_participants_inner.rb +157 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response.rb +158 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_groups_inner.rb +168 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging.rb +147 -0
- data/lib/late-sdk/models/list_whats_app_group_chats200_response_paging_cursors.rb +156 -0
- data/lib/late-sdk/models/list_whats_app_group_join_requests200_response.rb +158 -0
- data/lib/late-sdk/models/list_whats_app_group_join_requests200_response_join_requests_inner.rb +158 -0
- data/lib/late-sdk/models/reject_whats_app_group_join_requests_request.rb +167 -0
- data/lib/late-sdk/models/remove_whats_app_group_participants_request.rb +167 -0
- data/lib/late-sdk/models/update_whats_app_group_chat_request.rb +237 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +18 -0
- data/openapi.yaml +371 -0
- data/spec/api/whats_app_api_spec.rb +148 -0
- data/spec/models/add_whats_app_group_participants_request_spec.rb +36 -0
- data/spec/models/approve_whats_app_group_join_requests_request_spec.rb +36 -0
- data/spec/models/create_whats_app_group_chat201_response_group_spec.rb +42 -0
- data/spec/models/create_whats_app_group_chat201_response_spec.rb +42 -0
- data/spec/models/create_whats_app_group_chat_request_spec.rb +58 -0
- data/spec/models/create_whats_app_group_invite_link200_response_spec.rb +42 -0
- data/spec/models/get_whats_app_group_chat200_response_group_participants_inner_spec.rb +42 -0
- data/spec/models/get_whats_app_group_chat200_response_group_spec.rb +78 -0
- data/spec/models/get_whats_app_group_chat200_response_spec.rb +42 -0
- data/spec/models/list_whats_app_group_chats200_response_groups_inner_spec.rb +48 -0
- data/spec/models/list_whats_app_group_chats200_response_paging_cursors_spec.rb +42 -0
- data/spec/models/list_whats_app_group_chats200_response_paging_spec.rb +36 -0
- data/spec/models/list_whats_app_group_chats200_response_spec.rb +42 -0
- data/spec/models/list_whats_app_group_join_requests200_response_join_requests_inner_spec.rb +42 -0
- data/spec/models/list_whats_app_group_join_requests200_response_spec.rb +42 -0
- data/spec/models/reject_whats_app_group_join_requests_request_spec.rb +36 -0
- data/spec/models/remove_whats_app_group_participants_request_spec.rb +36 -0
- data/spec/models/update_whats_app_group_chat_request_spec.rb +52 -0
- data/zernio-sdk-0.0.85.gem +0 -0
- metadata +74 -2
- data/zernio-sdk-0.0.84.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 RejectWhatsAppGroupJoinRequestsRequest < ApiModelBase
|
|
18
|
+
# Phone numbers to reject
|
|
19
|
+
attr_accessor :phone_numbers
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'phone_numbers' => :'phoneNumbers'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'phone_numbers' => :'Array<String>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::RejectWhatsAppGroupJoinRequestsRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::RejectWhatsAppGroupJoinRequestsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'phone_numbers')
|
|
68
|
+
if (value = attributes[:'phone_numbers']).is_a?(Array)
|
|
69
|
+
self.phone_numbers = value
|
|
70
|
+
end
|
|
71
|
+
else
|
|
72
|
+
self.phone_numbers = nil
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
if @phone_numbers.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "phone_numbers", phone_numbers cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
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
|
+
return false if @phone_numbers.nil?
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param [Object] phone_numbers Value to be assigned
|
|
98
|
+
def phone_numbers=(phone_numbers)
|
|
99
|
+
if phone_numbers.nil?
|
|
100
|
+
fail ArgumentError, 'phone_numbers cannot be nil'
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
@phone_numbers = phone_numbers
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def ==(o)
|
|
109
|
+
return true if self.equal?(o)
|
|
110
|
+
self.class == o.class &&
|
|
111
|
+
phone_numbers == o.phone_numbers
|
|
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
|
+
[phone_numbers].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,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 RemoveWhatsAppGroupParticipantsRequest < ApiModelBase
|
|
18
|
+
# Phone numbers to remove
|
|
19
|
+
attr_accessor :phone_numbers
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'phone_numbers' => :'phoneNumbers'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'phone_numbers' => :'Array<String>'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::RemoveWhatsAppGroupParticipantsRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::RemoveWhatsAppGroupParticipantsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'phone_numbers')
|
|
68
|
+
if (value = attributes[:'phone_numbers']).is_a?(Array)
|
|
69
|
+
self.phone_numbers = value
|
|
70
|
+
end
|
|
71
|
+
else
|
|
72
|
+
self.phone_numbers = nil
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
80
|
+
invalid_properties = Array.new
|
|
81
|
+
if @phone_numbers.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "phone_numbers", phone_numbers cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
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
|
+
return false if @phone_numbers.nil?
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Custom attribute writer method with validation
|
|
97
|
+
# @param [Object] phone_numbers Value to be assigned
|
|
98
|
+
def phone_numbers=(phone_numbers)
|
|
99
|
+
if phone_numbers.nil?
|
|
100
|
+
fail ArgumentError, 'phone_numbers cannot be nil'
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
@phone_numbers = phone_numbers
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def ==(o)
|
|
109
|
+
return true if self.equal?(o)
|
|
110
|
+
self.class == o.class &&
|
|
111
|
+
phone_numbers == o.phone_numbers
|
|
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
|
+
[phone_numbers].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,237 @@
|
|
|
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 UpdateWhatsAppGroupChatRequest < ApiModelBase
|
|
18
|
+
attr_accessor :subject
|
|
19
|
+
|
|
20
|
+
attr_accessor :description
|
|
21
|
+
|
|
22
|
+
attr_accessor :join_approval_mode
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'subject' => :'subject',
|
|
50
|
+
:'description' => :'description',
|
|
51
|
+
:'join_approval_mode' => :'joinApprovalMode'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'subject' => :'String',
|
|
69
|
+
:'description' => :'String',
|
|
70
|
+
:'join_approval_mode' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateWhatsAppGroupChatRequest` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateWhatsAppGroupChatRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'subject')
|
|
97
|
+
self.subject = attributes[:'subject']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'description')
|
|
101
|
+
self.description = attributes[:'description']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'join_approval_mode')
|
|
105
|
+
self.join_approval_mode = attributes[:'join_approval_mode']
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
110
|
+
# @return Array for valid properties with the reasons
|
|
111
|
+
def list_invalid_properties
|
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
113
|
+
invalid_properties = Array.new
|
|
114
|
+
if !@subject.nil? && @subject.to_s.length > 128
|
|
115
|
+
invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 128.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if !@description.nil? && @description.to_s.length > 2048
|
|
119
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 2048.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if !@subject.nil? && @subject.to_s.length > 128
|
|
130
|
+
return false if !@description.nil? && @description.to_s.length > 2048
|
|
131
|
+
join_approval_mode_validator = EnumAttributeValidator.new('String', ["approval_required", "auto_approve"])
|
|
132
|
+
return false unless join_approval_mode_validator.valid?(@join_approval_mode)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] subject Value to be assigned
|
|
138
|
+
def subject=(subject)
|
|
139
|
+
if subject.nil?
|
|
140
|
+
fail ArgumentError, 'subject cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if subject.to_s.length > 128
|
|
144
|
+
fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 128.'
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
@subject = subject
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] description Value to be assigned
|
|
152
|
+
def description=(description)
|
|
153
|
+
if description.nil?
|
|
154
|
+
fail ArgumentError, 'description cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if description.to_s.length > 2048
|
|
158
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 2048.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@description = description
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
165
|
+
# @param [Object] join_approval_mode Object to be assigned
|
|
166
|
+
def join_approval_mode=(join_approval_mode)
|
|
167
|
+
validator = EnumAttributeValidator.new('String', ["approval_required", "auto_approve"])
|
|
168
|
+
unless validator.valid?(join_approval_mode)
|
|
169
|
+
fail ArgumentError, "invalid value for \"join_approval_mode\", must be one of #{validator.allowable_values}."
|
|
170
|
+
end
|
|
171
|
+
@join_approval_mode = join_approval_mode
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Checks equality by comparing each attribute.
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def ==(o)
|
|
177
|
+
return true if self.equal?(o)
|
|
178
|
+
self.class == o.class &&
|
|
179
|
+
subject == o.subject &&
|
|
180
|
+
description == o.description &&
|
|
181
|
+
join_approval_mode == o.join_approval_mode
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Integer] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[subject, description, join_approval_mode].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def self.build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
new(transformed_hash)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the object in the form of hash
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_hash
|
|
222
|
+
hash = {}
|
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
224
|
+
value = self.send(attr)
|
|
225
|
+
if value.nil?
|
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
hash[param] = _to_hash(value)
|
|
231
|
+
end
|
|
232
|
+
hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
data/lib/late-sdk/version.rb
CHANGED
data/lib/late-sdk.rb
CHANGED
|
@@ -28,6 +28,7 @@ require 'late-sdk/models/add_broadcast_recipients_request'
|
|
|
28
28
|
require 'late-sdk/models/add_whats_app_broadcast_recipients200_response'
|
|
29
29
|
require 'late-sdk/models/add_whats_app_broadcast_recipients_request'
|
|
30
30
|
require 'late-sdk/models/add_whats_app_broadcast_recipients_request_recipients_inner'
|
|
31
|
+
require 'late-sdk/models/add_whats_app_group_participants_request'
|
|
31
32
|
require 'late-sdk/models/analytics_list_response'
|
|
32
33
|
require 'late-sdk/models/analytics_list_response_posts_inner'
|
|
33
34
|
require 'late-sdk/models/analytics_overview'
|
|
@@ -36,6 +37,7 @@ require 'late-sdk/models/analytics_single_post_response'
|
|
|
36
37
|
require 'late-sdk/models/analytics_single_post_response_media_items_inner'
|
|
37
38
|
require 'late-sdk/models/api_key'
|
|
38
39
|
require 'late-sdk/models/api_key_profile_ids_inner'
|
|
40
|
+
require 'late-sdk/models/approve_whats_app_group_join_requests_request'
|
|
39
41
|
require 'late-sdk/models/bluesky_platform_data'
|
|
40
42
|
require 'late-sdk/models/bookmark_post200_response'
|
|
41
43
|
require 'late-sdk/models/bookmark_post_request'
|
|
@@ -121,6 +123,10 @@ require 'late-sdk/models/create_whats_app_broadcast_request_recipients_inner'
|
|
|
121
123
|
require 'late-sdk/models/create_whats_app_contact200_response'
|
|
122
124
|
require 'late-sdk/models/create_whats_app_contact200_response_contact'
|
|
123
125
|
require 'late-sdk/models/create_whats_app_contact_request'
|
|
126
|
+
require 'late-sdk/models/create_whats_app_group_chat201_response'
|
|
127
|
+
require 'late-sdk/models/create_whats_app_group_chat201_response_group'
|
|
128
|
+
require 'late-sdk/models/create_whats_app_group_chat_request'
|
|
129
|
+
require 'late-sdk/models/create_whats_app_group_invite_link200_response'
|
|
124
130
|
require 'late-sdk/models/create_whats_app_template200_response'
|
|
125
131
|
require 'late-sdk/models/create_whats_app_template200_response_template'
|
|
126
132
|
require 'late-sdk/models/create_whats_app_template_request'
|
|
@@ -309,6 +315,9 @@ require 'late-sdk/models/get_whats_app_contacts200_response_filters'
|
|
|
309
315
|
require 'late-sdk/models/get_whats_app_contacts200_response_pagination'
|
|
310
316
|
require 'late-sdk/models/get_whats_app_display_name200_response'
|
|
311
317
|
require 'late-sdk/models/get_whats_app_display_name200_response_display_name'
|
|
318
|
+
require 'late-sdk/models/get_whats_app_group_chat200_response'
|
|
319
|
+
require 'late-sdk/models/get_whats_app_group_chat200_response_group'
|
|
320
|
+
require 'late-sdk/models/get_whats_app_group_chat200_response_group_participants_inner'
|
|
312
321
|
require 'late-sdk/models/get_whats_app_groups200_response'
|
|
313
322
|
require 'late-sdk/models/get_whats_app_groups200_response_groups_inner'
|
|
314
323
|
require 'late-sdk/models/get_whats_app_groups200_response_summary'
|
|
@@ -418,6 +427,12 @@ require 'late-sdk/models/list_snapchat_profiles200_response'
|
|
|
418
427
|
require 'late-sdk/models/list_snapchat_profiles200_response_public_profiles_inner'
|
|
419
428
|
require 'late-sdk/models/list_users200_response'
|
|
420
429
|
require 'late-sdk/models/list_users200_response_users_inner'
|
|
430
|
+
require 'late-sdk/models/list_whats_app_group_chats200_response'
|
|
431
|
+
require 'late-sdk/models/list_whats_app_group_chats200_response_groups_inner'
|
|
432
|
+
require 'late-sdk/models/list_whats_app_group_chats200_response_paging'
|
|
433
|
+
require 'late-sdk/models/list_whats_app_group_chats200_response_paging_cursors'
|
|
434
|
+
require 'late-sdk/models/list_whats_app_group_join_requests200_response'
|
|
435
|
+
require 'late-sdk/models/list_whats_app_group_join_requests200_response_join_requests_inner'
|
|
421
436
|
require 'late-sdk/models/media_item'
|
|
422
437
|
require 'late-sdk/models/media_upload_response'
|
|
423
438
|
require 'late-sdk/models/money'
|
|
@@ -464,11 +479,13 @@ require 'late-sdk/models/queue_update_response'
|
|
|
464
479
|
require 'late-sdk/models/recycling_config'
|
|
465
480
|
require 'late-sdk/models/recycling_state'
|
|
466
481
|
require 'late-sdk/models/reddit_platform_data'
|
|
482
|
+
require 'late-sdk/models/reject_whats_app_group_join_requests_request'
|
|
467
483
|
require 'late-sdk/models/release_whats_app_phone_number200_response'
|
|
468
484
|
require 'late-sdk/models/release_whats_app_phone_number200_response_phone_number'
|
|
469
485
|
require 'late-sdk/models/remove_bookmark200_response'
|
|
470
486
|
require 'late-sdk/models/remove_whats_app_broadcast_recipients200_response'
|
|
471
487
|
require 'late-sdk/models/remove_whats_app_broadcast_recipients_request'
|
|
488
|
+
require 'late-sdk/models/remove_whats_app_group_participants_request'
|
|
472
489
|
require 'late-sdk/models/rename_whats_app_group200_response'
|
|
473
490
|
require 'late-sdk/models/rename_whats_app_group_request'
|
|
474
491
|
require 'late-sdk/models/reply_to_inbox_post200_response'
|
|
@@ -612,6 +629,7 @@ require 'late-sdk/models/update_whats_app_contact_request'
|
|
|
612
629
|
require 'late-sdk/models/update_whats_app_display_name200_response'
|
|
613
630
|
require 'late-sdk/models/update_whats_app_display_name200_response_display_name'
|
|
614
631
|
require 'late-sdk/models/update_whats_app_display_name_request'
|
|
632
|
+
require 'late-sdk/models/update_whats_app_group_chat_request'
|
|
615
633
|
require 'late-sdk/models/update_whats_app_template200_response'
|
|
616
634
|
require 'late-sdk/models/update_whats_app_template200_response_template'
|
|
617
635
|
require 'late-sdk/models/update_whats_app_template_request'
|