late-sdk 0.0.790 → 0.0.792
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 +10 -0
- data/docs/DeleteWhatsAppTemplate200Response.md +24 -0
- data/docs/DeleteWhatsAppTemplateById200Response.md +24 -0
- data/docs/GetWhatsAppTemplate200ResponseTemplate.md +7 -3
- data/docs/GetWhatsAppTemplate409Response.md +26 -0
- data/docs/GetWhatsAppTemplate409ResponseDetails.md +18 -0
- data/docs/LinkedInMentionsApi.md +1 -1
- data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +3 -1
- data/docs/UpdateWhatsAppTemplateById200Response.md +20 -0
- data/docs/UpdateWhatsAppTemplateById200ResponseTemplate.md +24 -0
- data/docs/UpdateWhatsAppTemplateByIdRequest.md +20 -0
- data/docs/UpdateWhatsAppTemplateRequest.md +2 -0
- data/docs/WhatsAppApi.md +256 -24
- data/lib/zernio-sdk/api/linked_in_mentions_api.rb +2 -2
- data/lib/zernio-sdk/api/whats_app_api.rb +250 -17
- data/lib/zernio-sdk/models/delete_whats_app_template200_response.rb +210 -0
- data/lib/zernio-sdk/models/delete_whats_app_template_by_id200_response.rb +208 -0
- data/lib/zernio-sdk/models/get_whats_app_template200_response_template.rb +26 -4
- data/lib/zernio-sdk/models/get_whats_app_template409_response.rb +241 -0
- data/lib/zernio-sdk/models/get_whats_app_template409_response_details.rb +149 -0
- data/lib/zernio-sdk/models/update_whats_app_template200_response_template.rb +12 -1
- data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response.rb +156 -0
- data/lib/zernio-sdk/models/update_whats_app_template_by_id200_response_template.rb +175 -0
- data/lib/zernio-sdk/models/update_whats_app_template_by_id_request.rb +203 -0
- data/lib/zernio-sdk/models/update_whats_app_template_request.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +7 -0
- data/openapi.yaml +288 -36
- data/spec/api/linked_in_mentions_api_spec.rb +1 -1
- data/spec/api/whats_app_api_spec.rb +52 -8
- data/spec/models/delete_whats_app_template200_response_spec.rb +58 -0
- data/spec/models/delete_whats_app_template_by_id200_response_spec.rb +58 -0
- data/spec/models/get_whats_app_template200_response_template_spec.rb +12 -0
- data/spec/models/get_whats_app_template409_response_details_spec.rb +36 -0
- data/spec/models/get_whats_app_template409_response_spec.rb +72 -0
- data/spec/models/update_whats_app_template200_response_template_spec.rb +6 -0
- data/spec/models/update_whats_app_template_by_id200_response_spec.rb +42 -0
- data/spec/models/update_whats_app_template_by_id200_response_template_spec.rb +54 -0
- data/spec/models/update_whats_app_template_by_id_request_spec.rb +42 -0
- data/spec/models/update_whats_app_template_request_spec.rb +6 -0
- data/zernio-sdk-0.0.792.gem +0 -0
- metadata +31 -3
- data/zernio-sdk-0.0.790.gem +0 -0
|
@@ -15,10 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class UpdateWhatsAppTemplate200ResponseTemplate < ApiModelBase
|
|
18
|
+
# Meta id of the edited variant.
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
20
21
|
attr_accessor :name
|
|
21
22
|
|
|
23
|
+
# The variant that was edited.
|
|
24
|
+
attr_accessor :language
|
|
25
|
+
|
|
22
26
|
# Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.
|
|
23
27
|
attr_accessor :status
|
|
24
28
|
|
|
@@ -27,6 +31,7 @@ module Zernio
|
|
|
27
31
|
{
|
|
28
32
|
:'id' => :'id',
|
|
29
33
|
:'name' => :'name',
|
|
34
|
+
:'language' => :'language',
|
|
30
35
|
:'status' => :'status'
|
|
31
36
|
}
|
|
32
37
|
end
|
|
@@ -46,6 +51,7 @@ module Zernio
|
|
|
46
51
|
{
|
|
47
52
|
:'id' => :'String',
|
|
48
53
|
:'name' => :'String',
|
|
54
|
+
:'language' => :'String',
|
|
49
55
|
:'status' => :'String'
|
|
50
56
|
}
|
|
51
57
|
end
|
|
@@ -80,6 +86,10 @@ module Zernio
|
|
|
80
86
|
self.name = attributes[:'name']
|
|
81
87
|
end
|
|
82
88
|
|
|
89
|
+
if attributes.key?(:'language')
|
|
90
|
+
self.language = attributes[:'language']
|
|
91
|
+
end
|
|
92
|
+
|
|
83
93
|
if attributes.key?(:'status')
|
|
84
94
|
self.status = attributes[:'status']
|
|
85
95
|
end
|
|
@@ -107,6 +117,7 @@ module Zernio
|
|
|
107
117
|
self.class == o.class &&
|
|
108
118
|
id == o.id &&
|
|
109
119
|
name == o.name &&
|
|
120
|
+
language == o.language &&
|
|
110
121
|
status == o.status
|
|
111
122
|
end
|
|
112
123
|
|
|
@@ -119,7 +130,7 @@ module Zernio
|
|
|
119
130
|
# Calculates hash code according to all attributes.
|
|
120
131
|
# @return [Integer] Hash code
|
|
121
132
|
def hash
|
|
122
|
-
[id, name, status].hash
|
|
133
|
+
[id, name, language, status].hash
|
|
123
134
|
end
|
|
124
135
|
|
|
125
136
|
# Builds the object from hash
|
|
@@ -0,0 +1,156 @@
|
|
|
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 UpdateWhatsAppTemplateById200Response < ApiModelBase
|
|
18
|
+
attr_accessor :success
|
|
19
|
+
|
|
20
|
+
attr_accessor :template
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'success' => :'success',
|
|
26
|
+
:'template' => :'template'
|
|
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
|
+
:'success' => :'Boolean',
|
|
44
|
+
:'template' => :'UpdateWhatsAppTemplateById200ResponseTemplate'
|
|
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 `Zernio::UpdateWhatsAppTemplateById200Response` 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 `Zernio::UpdateWhatsAppTemplateById200Response`. 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?(:'success')
|
|
71
|
+
self.success = attributes[:'success']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'template')
|
|
75
|
+
self.template = attributes[:'template']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
success == o.success &&
|
|
100
|
+
template == o.template
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[success, template].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
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 UpdateWhatsAppTemplateById200ResponseTemplate < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :language
|
|
23
|
+
|
|
24
|
+
# Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.
|
|
25
|
+
attr_accessor :status
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'id' => :'id',
|
|
31
|
+
:'name' => :'name',
|
|
32
|
+
:'language' => :'language',
|
|
33
|
+
:'status' => :'status'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'id' => :'String',
|
|
51
|
+
:'name' => :'String',
|
|
52
|
+
:'language' => :'String',
|
|
53
|
+
:'status' => :'String'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateWhatsAppTemplateById200ResponseTemplate` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateWhatsAppTemplateById200ResponseTemplate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'id')
|
|
80
|
+
self.id = attributes[:'id']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'name')
|
|
84
|
+
self.name = attributes[:'name']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'language')
|
|
88
|
+
self.language = attributes[:'language']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'status')
|
|
92
|
+
self.status = attributes[:'status']
|
|
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
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
id == o.id &&
|
|
117
|
+
name == o.name &&
|
|
118
|
+
language == o.language &&
|
|
119
|
+
status == o.status
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Integer] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[id, name, language, status].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Builds the object from hash
|
|
135
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
136
|
+
# @return [Object] Returns the model itself
|
|
137
|
+
def self.build_from_hash(attributes)
|
|
138
|
+
return nil unless attributes.is_a?(Hash)
|
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
140
|
+
transformed_hash = {}
|
|
141
|
+
openapi_types.each_pair do |key, type|
|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = nil
|
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
new(transformed_hash)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Returns the object in the form of hash
|
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
|
159
|
+
def to_hash
|
|
160
|
+
hash = {}
|
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
162
|
+
value = self.send(attr)
|
|
163
|
+
if value.nil?
|
|
164
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
165
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
169
|
+
end
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
@@ -0,0 +1,203 @@
|
|
|
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 UpdateWhatsAppTemplateByIdRequest < ApiModelBase
|
|
18
|
+
# WhatsApp social account ID
|
|
19
|
+
attr_accessor :account_id
|
|
20
|
+
|
|
21
|
+
# Updated template components
|
|
22
|
+
attr_accessor :components
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'account_id' => :'accountId',
|
|
28
|
+
:'components' => :'components'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'account_id' => :'String',
|
|
46
|
+
:'components' => :'Array<WhatsAppTemplateComponent>'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateWhatsAppTemplateByIdRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateWhatsAppTemplateByIdRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'account_id')
|
|
73
|
+
self.account_id = attributes[:'account_id']
|
|
74
|
+
else
|
|
75
|
+
self.account_id = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'components')
|
|
79
|
+
if (value = attributes[:'components']).is_a?(Array)
|
|
80
|
+
self.components = value
|
|
81
|
+
end
|
|
82
|
+
else
|
|
83
|
+
self.components = nil
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
if @account_id.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if @components.nil?
|
|
97
|
+
invalid_properties.push('invalid value for "components", components cannot be nil.')
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if @components.length < 1
|
|
101
|
+
invalid_properties.push('invalid value for "components", number of items must be greater than or equal to 1.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
invalid_properties
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Check to see if the all the properties in the model are valid
|
|
108
|
+
# @return true if the model is valid
|
|
109
|
+
def valid?
|
|
110
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
return false if @account_id.nil?
|
|
112
|
+
return false if @components.nil?
|
|
113
|
+
return false if @components.length < 1
|
|
114
|
+
true
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Custom attribute writer method with validation
|
|
118
|
+
# @param [Object] account_id Value to be assigned
|
|
119
|
+
def account_id=(account_id)
|
|
120
|
+
if account_id.nil?
|
|
121
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
@account_id = account_id
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] components Value to be assigned
|
|
129
|
+
def components=(components)
|
|
130
|
+
if components.nil?
|
|
131
|
+
fail ArgumentError, 'components cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if components.length < 1
|
|
135
|
+
fail ArgumentError, 'invalid value for "components", number of items must be greater than or equal to 1.'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@components = components
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Checks equality by comparing each attribute.
|
|
142
|
+
# @param [Object] Object to be compared
|
|
143
|
+
def ==(o)
|
|
144
|
+
return true if self.equal?(o)
|
|
145
|
+
self.class == o.class &&
|
|
146
|
+
account_id == o.account_id &&
|
|
147
|
+
components == o.components
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @see the `==` method
|
|
151
|
+
# @param [Object] Object to be compared
|
|
152
|
+
def eql?(o)
|
|
153
|
+
self == o
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Calculates hash code according to all attributes.
|
|
157
|
+
# @return [Integer] Hash code
|
|
158
|
+
def hash
|
|
159
|
+
[account_id, components].hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Builds the object from hash
|
|
163
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
164
|
+
# @return [Object] Returns the model itself
|
|
165
|
+
def self.build_from_hash(attributes)
|
|
166
|
+
return nil unless attributes.is_a?(Hash)
|
|
167
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
168
|
+
transformed_hash = {}
|
|
169
|
+
openapi_types.each_pair do |key, type|
|
|
170
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
171
|
+
transformed_hash["#{key}"] = nil
|
|
172
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
173
|
+
# check to ensure the input is an array given that the attribute
|
|
174
|
+
# is documented as an array but the input is not
|
|
175
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
176
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
177
|
+
end
|
|
178
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
179
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
new(transformed_hash)
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the object in the form of hash
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_hash
|
|
188
|
+
hash = {}
|
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
190
|
+
value = self.send(attr)
|
|
191
|
+
if value.nil?
|
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
@@ -18,6 +18,9 @@ module Zernio
|
|
|
18
18
|
# WhatsApp social account ID
|
|
19
19
|
attr_accessor :account_id
|
|
20
20
|
|
|
21
|
+
# Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.
|
|
22
|
+
attr_accessor :language
|
|
23
|
+
|
|
21
24
|
# Updated template components
|
|
22
25
|
attr_accessor :components
|
|
23
26
|
|
|
@@ -25,6 +28,7 @@ module Zernio
|
|
|
25
28
|
def self.attribute_map
|
|
26
29
|
{
|
|
27
30
|
:'account_id' => :'accountId',
|
|
31
|
+
:'language' => :'language',
|
|
28
32
|
:'components' => :'components'
|
|
29
33
|
}
|
|
30
34
|
end
|
|
@@ -43,6 +47,7 @@ module Zernio
|
|
|
43
47
|
def self.openapi_types
|
|
44
48
|
{
|
|
45
49
|
:'account_id' => :'String',
|
|
50
|
+
:'language' => :'String',
|
|
46
51
|
:'components' => :'Array<WhatsAppTemplateComponent>'
|
|
47
52
|
}
|
|
48
53
|
end
|
|
@@ -75,6 +80,10 @@ module Zernio
|
|
|
75
80
|
self.account_id = nil
|
|
76
81
|
end
|
|
77
82
|
|
|
83
|
+
if attributes.key?(:'language')
|
|
84
|
+
self.language = attributes[:'language']
|
|
85
|
+
end
|
|
86
|
+
|
|
78
87
|
if attributes.key?(:'components')
|
|
79
88
|
if (value = attributes[:'components']).is_a?(Array)
|
|
80
89
|
self.components = value
|
|
@@ -144,6 +153,7 @@ module Zernio
|
|
|
144
153
|
return true if self.equal?(o)
|
|
145
154
|
self.class == o.class &&
|
|
146
155
|
account_id == o.account_id &&
|
|
156
|
+
language == o.language &&
|
|
147
157
|
components == o.components
|
|
148
158
|
end
|
|
149
159
|
|
|
@@ -156,7 +166,7 @@ module Zernio
|
|
|
156
166
|
# Calculates hash code according to all attributes.
|
|
157
167
|
# @return [Integer] Hash code
|
|
158
168
|
def hash
|
|
159
|
-
[account_id, components].hash
|
|
169
|
+
[account_id, language, components].hash
|
|
160
170
|
end
|
|
161
171
|
|
|
162
172
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -396,6 +396,8 @@ require 'zernio-sdk/models/delete_inbox_review_reply200_response'
|
|
|
396
396
|
require 'zernio-sdk/models/delete_inbox_review_reply_request'
|
|
397
397
|
require 'zernio-sdk/models/delete_sms_sender_id200_response'
|
|
398
398
|
require 'zernio-sdk/models/delete_value_rule_set200_response'
|
|
399
|
+
require 'zernio-sdk/models/delete_whats_app_template200_response'
|
|
400
|
+
require 'zernio-sdk/models/delete_whats_app_template_by_id200_response'
|
|
399
401
|
require 'zernio-sdk/models/delete_whatsapp_business_username_request'
|
|
400
402
|
require 'zernio-sdk/models/detach_number_from_sip_trunk200_response'
|
|
401
403
|
require 'zernio-sdk/models/dial_voice_web_call200_response'
|
|
@@ -794,6 +796,8 @@ require 'zernio-sdk/models/get_whats_app_number_kyc_form200_response_fields_inne
|
|
|
794
796
|
require 'zernio-sdk/models/get_whats_app_number_remediation200_response'
|
|
795
797
|
require 'zernio-sdk/models/get_whats_app_template200_response'
|
|
796
798
|
require 'zernio-sdk/models/get_whats_app_template200_response_template'
|
|
799
|
+
require 'zernio-sdk/models/get_whats_app_template409_response'
|
|
800
|
+
require 'zernio-sdk/models/get_whats_app_template409_response_details'
|
|
797
801
|
require 'zernio-sdk/models/get_whats_app_templates200_response'
|
|
798
802
|
require 'zernio-sdk/models/get_whats_app_templates200_response_templates_inner'
|
|
799
803
|
require 'zernio-sdk/models/get_whatsapp_business_username200_response'
|
|
@@ -1538,6 +1542,9 @@ require 'zernio-sdk/models/update_whats_app_flow_request'
|
|
|
1538
1542
|
require 'zernio-sdk/models/update_whats_app_group_chat_request'
|
|
1539
1543
|
require 'zernio-sdk/models/update_whats_app_template200_response'
|
|
1540
1544
|
require 'zernio-sdk/models/update_whats_app_template200_response_template'
|
|
1545
|
+
require 'zernio-sdk/models/update_whats_app_template_by_id200_response'
|
|
1546
|
+
require 'zernio-sdk/models/update_whats_app_template_by_id200_response_template'
|
|
1547
|
+
require 'zernio-sdk/models/update_whats_app_template_by_id_request'
|
|
1541
1548
|
require 'zernio-sdk/models/update_whats_app_template_request'
|
|
1542
1549
|
require 'zernio-sdk/models/update_workflow200_response'
|
|
1543
1550
|
require 'zernio-sdk/models/update_workflow200_response_workflow'
|