late-sdk 0.0.754 → 0.0.755
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 +6 -0
- data/docs/ConnectApi.md +210 -3
- data/docs/ConnectDiscordChannelRequest.md +22 -0
- data/docs/ConnectSlackChannelRequest.md +24 -0
- data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +28 -0
- data/lib/zernio-sdk/api/connect_api.rb +213 -4
- data/lib/zernio-sdk/models/connect_discord_channel_request.rb +219 -0
- data/lib/zernio-sdk/models/connect_slack_channel_request.rb +211 -0
- data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +230 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +95 -4
- data/spec/api/connect_api_spec.rb +38 -2
- data/spec/models/connect_discord_channel_request_spec.rb +48 -0
- data/spec/models/connect_slack_channel_request_spec.rb +54 -0
- data/spec/models/connect_whats_app_embedded_signup_request_spec.rb +66 -0
- data/zernio-sdk-0.0.755.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.754.gem +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
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 Zernio
|
|
17
|
+
class ConnectDiscordChannelRequest < ApiModelBase
|
|
18
|
+
# Discord server (guild) the channel belongs to
|
|
19
|
+
attr_accessor :guild_id
|
|
20
|
+
|
|
21
|
+
# Text, announcement or forum channel to publish to
|
|
22
|
+
attr_accessor :channel_id
|
|
23
|
+
|
|
24
|
+
# Profile to connect the channel to
|
|
25
|
+
attr_accessor :profile_id
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'guild_id' => :'guildId',
|
|
31
|
+
:'channel_id' => :'channelId',
|
|
32
|
+
:'profile_id' => :'profileId'
|
|
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
|
+
:'guild_id' => :'String',
|
|
50
|
+
:'channel_id' => :'String',
|
|
51
|
+
:'profile_id' => :'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 `Zernio::ConnectDiscordChannelRequest` 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 `Zernio::ConnectDiscordChannelRequest`. 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?(:'guild_id')
|
|
78
|
+
self.guild_id = attributes[:'guild_id']
|
|
79
|
+
else
|
|
80
|
+
self.guild_id = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'channel_id')
|
|
84
|
+
self.channel_id = attributes[:'channel_id']
|
|
85
|
+
else
|
|
86
|
+
self.channel_id = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'profile_id')
|
|
90
|
+
self.profile_id = attributes[:'profile_id']
|
|
91
|
+
else
|
|
92
|
+
self.profile_id = nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
if @guild_id.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "guild_id", guild_id cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @channel_id.nil?
|
|
106
|
+
invalid_properties.push('invalid value for "channel_id", channel_id cannot be nil.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if @profile_id.nil?
|
|
110
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
invalid_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check to see if the all the properties in the model are valid
|
|
117
|
+
# @return true if the model is valid
|
|
118
|
+
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
+
return false if @guild_id.nil?
|
|
121
|
+
return false if @channel_id.nil?
|
|
122
|
+
return false if @profile_id.nil?
|
|
123
|
+
true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] guild_id Value to be assigned
|
|
128
|
+
def guild_id=(guild_id)
|
|
129
|
+
if guild_id.nil?
|
|
130
|
+
fail ArgumentError, 'guild_id cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@guild_id = guild_id
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] channel_id Value to be assigned
|
|
138
|
+
def channel_id=(channel_id)
|
|
139
|
+
if channel_id.nil?
|
|
140
|
+
fail ArgumentError, 'channel_id cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@channel_id = channel_id
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] profile_id Value to be assigned
|
|
148
|
+
def profile_id=(profile_id)
|
|
149
|
+
if profile_id.nil?
|
|
150
|
+
fail ArgumentError, 'profile_id cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@profile_id = profile_id
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
guild_id == o.guild_id &&
|
|
162
|
+
channel_id == o.channel_id &&
|
|
163
|
+
profile_id == o.profile_id
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[guild_id, channel_id, profile_id].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Returns the object in the form of hash
|
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
|
203
|
+
def to_hash
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
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 Zernio
|
|
17
|
+
class ConnectSlackChannelRequest < ApiModelBase
|
|
18
|
+
attr_accessor :profile_id
|
|
19
|
+
|
|
20
|
+
# Slack channel id, C... or G...
|
|
21
|
+
attr_accessor :channel_id
|
|
22
|
+
|
|
23
|
+
# Nonce from the OAuth redirect. Required unless accountId is sent.
|
|
24
|
+
attr_accessor :pending_data_token
|
|
25
|
+
|
|
26
|
+
# Existing Slack account whose workspace token is reused. Required unless pendingDataToken is sent.
|
|
27
|
+
attr_accessor :account_id
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'profile_id' => :'profileId',
|
|
33
|
+
:'channel_id' => :'channelId',
|
|
34
|
+
:'pending_data_token' => :'pendingDataToken',
|
|
35
|
+
:'account_id' => :'accountId'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'profile_id' => :'String',
|
|
53
|
+
:'channel_id' => :'String',
|
|
54
|
+
:'pending_data_token' => :'String',
|
|
55
|
+
:'account_id' => :'String'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
])
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
if (!attributes.is_a?(Hash))
|
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConnectSlackChannelRequest` initialize method"
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
73
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConnectSlackChannelRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'profile_id')
|
|
82
|
+
self.profile_id = attributes[:'profile_id']
|
|
83
|
+
else
|
|
84
|
+
self.profile_id = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'channel_id')
|
|
88
|
+
self.channel_id = attributes[:'channel_id']
|
|
89
|
+
else
|
|
90
|
+
self.channel_id = nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'pending_data_token')
|
|
94
|
+
self.pending_data_token = attributes[:'pending_data_token']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'account_id')
|
|
98
|
+
self.account_id = attributes[:'account_id']
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
103
|
+
# @return Array for valid properties with the reasons
|
|
104
|
+
def list_invalid_properties
|
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
if @profile_id.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if @channel_id.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "channel_id", channel_id cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
+
return false if @profile_id.nil?
|
|
123
|
+
return false if @channel_id.nil?
|
|
124
|
+
true
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] profile_id Value to be assigned
|
|
129
|
+
def profile_id=(profile_id)
|
|
130
|
+
if profile_id.nil?
|
|
131
|
+
fail ArgumentError, 'profile_id cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
@profile_id = profile_id
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] channel_id Value to be assigned
|
|
139
|
+
def channel_id=(channel_id)
|
|
140
|
+
if channel_id.nil?
|
|
141
|
+
fail ArgumentError, 'channel_id cannot be nil'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@channel_id = channel_id
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Checks equality by comparing each attribute.
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def ==(o)
|
|
150
|
+
return true if self.equal?(o)
|
|
151
|
+
self.class == o.class &&
|
|
152
|
+
profile_id == o.profile_id &&
|
|
153
|
+
channel_id == o.channel_id &&
|
|
154
|
+
pending_data_token == o.pending_data_token &&
|
|
155
|
+
account_id == o.account_id
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# @see the `==` method
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def eql?(o)
|
|
161
|
+
self == o
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Calculates hash code according to all attributes.
|
|
165
|
+
# @return [Integer] Hash code
|
|
166
|
+
def hash
|
|
167
|
+
[profile_id, channel_id, pending_data_token, account_id].hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Builds the object from hash
|
|
171
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
172
|
+
# @return [Object] Returns the model itself
|
|
173
|
+
def self.build_from_hash(attributes)
|
|
174
|
+
return nil unless attributes.is_a?(Hash)
|
|
175
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
176
|
+
transformed_hash = {}
|
|
177
|
+
openapi_types.each_pair do |key, type|
|
|
178
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = nil
|
|
180
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
181
|
+
# check to ensure the input is an array given that the attribute
|
|
182
|
+
# is documented as an array but the input is not
|
|
183
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
184
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
185
|
+
end
|
|
186
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
new(transformed_hash)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the object in the form of hash
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_hash
|
|
196
|
+
hash = {}
|
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
198
|
+
value = self.send(attr)
|
|
199
|
+
if value.nil?
|
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
hash[param] = _to_hash(value)
|
|
205
|
+
end
|
|
206
|
+
hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
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 Zernio
|
|
17
|
+
class ConnectWhatsAppEmbeddedSignupRequest < ApiModelBase
|
|
18
|
+
# Authorization code from the WA_EMBEDDED_SIGNUP postMessage
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
attr_accessor :profile_id
|
|
22
|
+
|
|
23
|
+
# WhatsApp Business Account id, when the SDK reported one
|
|
24
|
+
attr_accessor :waba_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :phone_number_id
|
|
27
|
+
|
|
28
|
+
# Number is also live in the WhatsApp Business app
|
|
29
|
+
attr_accessor :is_coexistence
|
|
30
|
+
|
|
31
|
+
# Rejects the connect when Meta returns a different number
|
|
32
|
+
attr_accessor :expected_phone_number
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'code' => :'code',
|
|
38
|
+
:'profile_id' => :'profileId',
|
|
39
|
+
:'waba_id' => :'wabaId',
|
|
40
|
+
:'phone_number_id' => :'phoneNumberId',
|
|
41
|
+
:'is_coexistence' => :'isCoexistence',
|
|
42
|
+
:'expected_phone_number' => :'expectedPhoneNumber'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'code' => :'String',
|
|
60
|
+
:'profile_id' => :'String',
|
|
61
|
+
:'waba_id' => :'String',
|
|
62
|
+
:'phone_number_id' => :'String',
|
|
63
|
+
:'is_coexistence' => :'Boolean',
|
|
64
|
+
:'expected_phone_number' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
])
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Initializes the object
|
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
76
|
+
def initialize(attributes = {})
|
|
77
|
+
if (!attributes.is_a?(Hash))
|
|
78
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ConnectWhatsAppEmbeddedSignupRequest` initialize method"
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
82
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ConnectWhatsAppEmbeddedSignupRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'code')
|
|
91
|
+
self.code = attributes[:'code']
|
|
92
|
+
else
|
|
93
|
+
self.code = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'profile_id')
|
|
97
|
+
self.profile_id = attributes[:'profile_id']
|
|
98
|
+
else
|
|
99
|
+
self.profile_id = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'waba_id')
|
|
103
|
+
self.waba_id = attributes[:'waba_id']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'phone_number_id')
|
|
107
|
+
self.phone_number_id = attributes[:'phone_number_id']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'is_coexistence')
|
|
111
|
+
self.is_coexistence = attributes[:'is_coexistence']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'expected_phone_number')
|
|
115
|
+
self.expected_phone_number = attributes[:'expected_phone_number']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
if @code.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @profile_id.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @code.nil?
|
|
140
|
+
return false if @profile_id.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] code Value to be assigned
|
|
146
|
+
def code=(code)
|
|
147
|
+
if code.nil?
|
|
148
|
+
fail ArgumentError, 'code cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@code = code
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] profile_id Value to be assigned
|
|
156
|
+
def profile_id=(profile_id)
|
|
157
|
+
if profile_id.nil?
|
|
158
|
+
fail ArgumentError, 'profile_id cannot be nil'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@profile_id = profile_id
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Checks equality by comparing each attribute.
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def ==(o)
|
|
167
|
+
return true if self.equal?(o)
|
|
168
|
+
self.class == o.class &&
|
|
169
|
+
code == o.code &&
|
|
170
|
+
profile_id == o.profile_id &&
|
|
171
|
+
waba_id == o.waba_id &&
|
|
172
|
+
phone_number_id == o.phone_number_id &&
|
|
173
|
+
is_coexistence == o.is_coexistence &&
|
|
174
|
+
expected_phone_number == o.expected_phone_number
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @see the `==` method
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def eql?(o)
|
|
180
|
+
self == o
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Calculates hash code according to all attributes.
|
|
184
|
+
# @return [Integer] Hash code
|
|
185
|
+
def hash
|
|
186
|
+
[code, profile_id, waba_id, phone_number_id, is_coexistence, expected_phone_number].hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Builds the object from hash
|
|
190
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
191
|
+
# @return [Object] Returns the model itself
|
|
192
|
+
def self.build_from_hash(attributes)
|
|
193
|
+
return nil unless attributes.is_a?(Hash)
|
|
194
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
195
|
+
transformed_hash = {}
|
|
196
|
+
openapi_types.each_pair do |key, type|
|
|
197
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = nil
|
|
199
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
200
|
+
# check to ensure the input is an array given that the attribute
|
|
201
|
+
# is documented as an array but the input is not
|
|
202
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
203
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
204
|
+
end
|
|
205
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
new(transformed_hash)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
217
|
+
value = self.send(attr)
|
|
218
|
+
if value.nil?
|
|
219
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
220
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
hash[param] = _to_hash(value)
|
|
224
|
+
end
|
|
225
|
+
hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -167,14 +167,17 @@ require 'zernio-sdk/models/connect_ads200_response_one_of'
|
|
|
167
167
|
require 'zernio-sdk/models/connect_ads200_response_one_of1'
|
|
168
168
|
require 'zernio-sdk/models/connect_bluesky_credentials200_response'
|
|
169
169
|
require 'zernio-sdk/models/connect_bluesky_credentials_request'
|
|
170
|
+
require 'zernio-sdk/models/connect_discord_channel_request'
|
|
170
171
|
require 'zernio-sdk/models/connect_open_ai_ads_credentials200_response'
|
|
171
172
|
require 'zernio-sdk/models/connect_open_ai_ads_credentials_request'
|
|
172
173
|
require 'zernio-sdk/models/connect_shopify_with_token200_response'
|
|
173
174
|
require 'zernio-sdk/models/connect_shopify_with_token200_response_account'
|
|
174
175
|
require 'zernio-sdk/models/connect_shopify_with_token_request'
|
|
176
|
+
require 'zernio-sdk/models/connect_slack_channel_request'
|
|
175
177
|
require 'zernio-sdk/models/connect_whats_app_credentials200_response'
|
|
176
178
|
require 'zernio-sdk/models/connect_whats_app_credentials200_response_account'
|
|
177
179
|
require 'zernio-sdk/models/connect_whats_app_credentials_request'
|
|
180
|
+
require 'zernio-sdk/models/connect_whats_app_embedded_signup_request'
|
|
178
181
|
require 'zernio-sdk/models/connected'
|
|
179
182
|
require 'zernio-sdk/models/connected_account'
|
|
180
183
|
require 'zernio-sdk/models/connected_app'
|