late-sdk 0.0.948 → 0.0.950
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/CreateInboxConversation400Response.md +11 -3
- data/docs/CreateInboxConversation400ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation404Response.md +11 -3
- data/docs/CreateInboxConversation404ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation422Response.md +11 -3
- data/docs/CreateInboxConversation422ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation429Response.md +11 -3
- data/docs/CreateInboxConversation429ResponseAnyOf.md +20 -0
- data/docs/ListTikTokCommercialMusic200ResponseTracksInner.md +3 -1
- data/docs/ListTikTokCommercialMusic200ResponseTracksInnerClip.md +2 -0
- data/docs/MessagesApi.md +2 -2
- data/docs/SendInboxMessage400Response.md +1 -1
- data/docs/SendInboxMessage502Response.md +30 -0
- data/docs/TikTokPlatformDataMusicSoundInfo.md +1 -1
- data/docs/WhatsAppTemplateLookupError.md +28 -0
- data/docs/WhatsAppTemplateLookupErrorDetails.md +24 -0
- data/docs/WhatsAppTemplateLookupErrorDetailsProviderHeaders.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformError.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformErrorErrorData.md +18 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/models/create_inbox_conversation400_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation400_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation404_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation404_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation422_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation422_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation429_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation429_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner.rb +12 -2
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner_clip.rb +11 -2
- data/lib/zernio-sdk/models/send_inbox_message400_response.rb +3 -3
- data/lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message502_response.rb +103 -0
- data/lib/zernio-sdk/models/tik_tok_platform_data_music_sound_info.rb +1 -1
- data/lib/zernio-sdk/models/whats_app_template_lookup_error.rb +305 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details.rb +233 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details_provider_headers.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error_error_data.rb +147 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +10 -0
- data/openapi.yaml +105 -25
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/create_inbox_conversation400_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation400_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation404_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation404_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation422_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation422_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation429_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation429_response_spec.rb +0 -25
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_clip_spec.rb +6 -0
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_spec.rb +6 -0
- data/spec/models/send_inbox_message400_response_spec.rb +1 -1
- data/spec/models/send_inbox_message502_response_spec.rb +21 -0
- data/spec/models/whats_app_template_lookup_error_details_provider_headers_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_details_spec.rb +58 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_error_data_spec.rb +36 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_spec.rb +78 -0
- data/zernio-sdk-0.0.950.gem +0 -0
- metadata +42 -2
- data/zernio-sdk-0.0.948.gem +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
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
|
+
# Safe provider headers retained from the lookup response.
|
|
18
|
+
class WhatsAppTemplateLookupErrorDetailsProviderHeaders < ApiModelBase
|
|
19
|
+
attr_accessor :retry_after
|
|
20
|
+
|
|
21
|
+
attr_accessor :x_app_usage
|
|
22
|
+
|
|
23
|
+
attr_accessor :x_business_use_case_usage
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'retry_after' => :'retry-after',
|
|
29
|
+
:'x_app_usage' => :'x-app-usage',
|
|
30
|
+
:'x_business_use_case_usage' => :'x-business-use-case-usage'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'retry_after' => :'String',
|
|
48
|
+
:'x_app_usage' => :'String',
|
|
49
|
+
:'x_business_use_case_usage' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WhatsAppTemplateLookupErrorDetailsProviderHeaders` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WhatsAppTemplateLookupErrorDetailsProviderHeaders`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'retry_after')
|
|
76
|
+
self.retry_after = attributes[:'retry_after']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'x_app_usage')
|
|
80
|
+
self.x_app_usage = attributes[:'x_app_usage']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'x_business_use_case_usage')
|
|
84
|
+
self.x_business_use_case_usage = attributes[:'x_business_use_case_usage']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
retry_after == o.retry_after &&
|
|
109
|
+
x_app_usage == o.x_app_usage &&
|
|
110
|
+
x_business_use_case_usage == o.x_business_use_case_usage
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[retry_after, x_app_usage, x_business_use_case_usage].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
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
|
+
# Sanitized Meta lookup error fields, present when Meta returned them.
|
|
18
|
+
class WhatsAppTemplateLookupErrorPlatformError < ApiModelBase
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
attr_accessor :message
|
|
22
|
+
|
|
23
|
+
attr_accessor :error_data
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'code' => :'code',
|
|
29
|
+
:'message' => :'message',
|
|
30
|
+
:'error_data' => :'error_data'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'code' => :'Integer',
|
|
48
|
+
:'message' => :'String',
|
|
49
|
+
:'error_data' => :'WhatsAppTemplateLookupErrorPlatformErrorErrorData'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WhatsAppTemplateLookupErrorPlatformError` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WhatsAppTemplateLookupErrorPlatformError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'code')
|
|
76
|
+
self.code = attributes[:'code']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'message')
|
|
80
|
+
self.message = attributes[:'message']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'error_data')
|
|
84
|
+
self.error_data = attributes[:'error_data']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
code == o.code &&
|
|
109
|
+
message == o.message &&
|
|
110
|
+
error_data == o.error_data
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[code, message, error_data].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
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 WhatsAppTemplateLookupErrorPlatformErrorErrorData < ApiModelBase
|
|
18
|
+
attr_accessor :details
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'details' => :'details'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'details' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WhatsAppTemplateLookupErrorPlatformErrorErrorData` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WhatsAppTemplateLookupErrorPlatformErrorErrorData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'details')
|
|
67
|
+
self.details = attributes[:'details']
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
+
# @return Array for valid properties with the reasons
|
|
73
|
+
def list_invalid_properties
|
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
+
invalid_properties = Array.new
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
details == o.details
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def eql?(o)
|
|
97
|
+
self == o
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Integer] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[details].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def self.build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
transformed_hash = {}
|
|
113
|
+
openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
+
transformed_hash["#{key}"] = nil
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
new(transformed_hash)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns the object in the form of hash
|
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -332,9 +332,13 @@ require 'zernio-sdk/models/create_high_demand_period_request'
|
|
|
332
332
|
require 'zernio-sdk/models/create_inbox_conversation201_response'
|
|
333
333
|
require 'zernio-sdk/models/create_inbox_conversation201_response_data'
|
|
334
334
|
require 'zernio-sdk/models/create_inbox_conversation400_response'
|
|
335
|
+
require 'zernio-sdk/models/create_inbox_conversation400_response_any_of'
|
|
335
336
|
require 'zernio-sdk/models/create_inbox_conversation404_response'
|
|
337
|
+
require 'zernio-sdk/models/create_inbox_conversation404_response_any_of'
|
|
336
338
|
require 'zernio-sdk/models/create_inbox_conversation422_response'
|
|
339
|
+
require 'zernio-sdk/models/create_inbox_conversation422_response_any_of'
|
|
337
340
|
require 'zernio-sdk/models/create_inbox_conversation429_response'
|
|
341
|
+
require 'zernio-sdk/models/create_inbox_conversation429_response_any_of'
|
|
338
342
|
require 'zernio-sdk/models/create_inbox_conversation_request'
|
|
339
343
|
require 'zernio-sdk/models/create_inbox_conversation_request_header_location'
|
|
340
344
|
require 'zernio-sdk/models/create_inbox_conversation_request_header_media'
|
|
@@ -1505,6 +1509,7 @@ require 'zernio-sdk/models/send_inbox_message200_response_data_partial_failure_p
|
|
|
1505
1509
|
require 'zernio-sdk/models/send_inbox_message200_response_warnings_inner'
|
|
1506
1510
|
require 'zernio-sdk/models/send_inbox_message400_response'
|
|
1507
1511
|
require 'zernio-sdk/models/send_inbox_message400_response_platform_error'
|
|
1512
|
+
require 'zernio-sdk/models/send_inbox_message502_response'
|
|
1508
1513
|
require 'zernio-sdk/models/send_inbox_message_request'
|
|
1509
1514
|
require 'zernio-sdk/models/send_inbox_message_request_buttons_inner'
|
|
1510
1515
|
require 'zernio-sdk/models/send_inbox_message_request_contacts_inner'
|
|
@@ -2015,6 +2020,11 @@ require 'zernio-sdk/models/whats_app_named_param_example'
|
|
|
2015
2020
|
require 'zernio-sdk/models/whats_app_sandbox_session'
|
|
2016
2021
|
require 'zernio-sdk/models/whats_app_template_button'
|
|
2017
2022
|
require 'zernio-sdk/models/whats_app_template_component'
|
|
2023
|
+
require 'zernio-sdk/models/whats_app_template_lookup_error'
|
|
2024
|
+
require 'zernio-sdk/models/whats_app_template_lookup_error_details'
|
|
2025
|
+
require 'zernio-sdk/models/whats_app_template_lookup_error_details_provider_headers'
|
|
2026
|
+
require 'zernio-sdk/models/whats_app_template_lookup_error_platform_error'
|
|
2027
|
+
require 'zernio-sdk/models/whats_app_template_lookup_error_platform_error_error_data'
|
|
2018
2028
|
require 'zernio-sdk/models/workflow_edge'
|
|
2019
2029
|
require 'zernio-sdk/models/workflow_execution_event'
|
|
2020
2030
|
require 'zernio-sdk/models/workflow_node'
|