late-sdk 0.0.108 → 0.0.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -0
  3. data/docs/AnalyticsApi.md +78 -0
  4. data/docs/CreateWhatsAppFlow200Response.md +20 -0
  5. data/docs/CreateWhatsAppFlow200ResponseFlow.md +24 -0
  6. data/docs/CreateWhatsAppFlowRequest.md +24 -0
  7. data/docs/GetWhatsAppFlow200Response.md +20 -0
  8. data/docs/GetWhatsAppFlow200ResponseFlow.md +30 -0
  9. data/docs/GetWhatsAppFlow200ResponseFlowPreview.md +20 -0
  10. data/docs/GetWhatsAppFlowJson200Response.md +20 -0
  11. data/docs/GetWhatsAppFlowJson200ResponseAssetsInner.md +22 -0
  12. data/docs/GetYouTubeDemographics412Response.md +24 -0
  13. data/docs/GetYouTubeDemographics412ResponseScopeStatus.md +22 -0
  14. data/docs/ListWhatsAppFlows200Response.md +20 -0
  15. data/docs/ListWhatsAppFlows200ResponseFlowsInner.md +26 -0
  16. data/docs/PublishWhatsAppFlowRequest.md +18 -0
  17. data/docs/SendWhatsAppFlowMessage200Response.md +20 -0
  18. data/docs/SendWhatsAppFlowMessageRequest.md +38 -0
  19. data/docs/SendWhatsAppFlowMessageRequestFlowActionPayload.md +20 -0
  20. data/docs/SendWhatsAppFlowMessageRequestHeader.md +20 -0
  21. data/docs/UpdateWhatsAppFlowRequest.md +22 -0
  22. data/docs/UploadWhatsAppFlowJson200Response.md +20 -0
  23. data/docs/UploadWhatsAppFlowJson200ResponseValidationErrorsInner.md +30 -0
  24. data/docs/UploadWhatsAppFlowJsonRequest.md +20 -0
  25. data/docs/UploadWhatsAppFlowJsonRequestFlowJson.md +49 -0
  26. data/docs/WhatsAppFlowsApi.md +725 -0
  27. data/docs/YouTubeDemographicsResponse.md +28 -0
  28. data/docs/YouTubeDemographicsResponseDateRange.md +20 -0
  29. data/docs/YouTubeDemographicsResponseDemographicsValueInner.md +20 -0
  30. data/lib/late-sdk/api/analytics_api.rb +73 -0
  31. data/lib/late-sdk/api/whats_app_flows_api.rb +731 -0
  32. data/lib/late-sdk/models/create_whats_app_flow200_response.rb +156 -0
  33. data/lib/late-sdk/models/create_whats_app_flow200_response_flow.rb +176 -0
  34. data/lib/late-sdk/models/create_whats_app_flow_request.rb +257 -0
  35. data/lib/late-sdk/models/get_whats_app_flow200_response.rb +156 -0
  36. data/lib/late-sdk/models/get_whats_app_flow200_response_flow.rb +205 -0
  37. data/lib/late-sdk/models/get_whats_app_flow200_response_flow_preview.rb +156 -0
  38. data/lib/late-sdk/models/get_whats_app_flow_json200_response.rb +158 -0
  39. data/lib/late-sdk/models/get_whats_app_flow_json200_response_assets_inner.rb +166 -0
  40. data/lib/late-sdk/models/get_you_tube_demographics412_response.rb +174 -0
  41. data/lib/late-sdk/models/get_you_tube_demographics412_response_scope_status.rb +165 -0
  42. data/lib/late-sdk/models/list_whats_app_flows200_response.rb +158 -0
  43. data/lib/late-sdk/models/list_whats_app_flows200_response_flows_inner.rb +221 -0
  44. data/lib/late-sdk/models/publish_whats_app_flow_request.rb +165 -0
  45. data/lib/late-sdk/models/send_whats_app_flow_message200_response.rb +157 -0
  46. data/lib/late-sdk/models/send_whats_app_flow_message_request.rb +395 -0
  47. data/lib/late-sdk/models/send_whats_app_flow_message_request_flow_action_payload.rb +158 -0
  48. data/lib/late-sdk/models/send_whats_app_flow_message_request_header.rb +190 -0
  49. data/lib/late-sdk/models/update_whats_app_flow_request.rb +232 -0
  50. data/lib/late-sdk/models/upload_whats_app_flow_json200_response.rb +159 -0
  51. data/lib/late-sdk/models/upload_whats_app_flow_json200_response_validation_errors_inner.rb +201 -0
  52. data/lib/late-sdk/models/upload_whats_app_flow_json_request.rb +191 -0
  53. data/lib/late-sdk/models/upload_whats_app_flow_json_request_flow_json.rb +105 -0
  54. data/lib/late-sdk/models/you_tube_demographics_response.rb +196 -0
  55. data/lib/late-sdk/models/you_tube_demographics_response_date_range.rb +156 -0
  56. data/lib/late-sdk/models/you_tube_demographics_response_demographics_value_inner.rb +158 -0
  57. data/lib/late-sdk/version.rb +1 -1
  58. data/lib/late-sdk.rb +26 -0
  59. data/openapi.yaml +616 -1
  60. data/spec/api/analytics_api_spec.rb +15 -0
  61. data/spec/api/whats_app_flows_api_spec.rb +163 -0
  62. data/spec/models/create_whats_app_flow200_response_flow_spec.rb +54 -0
  63. data/spec/models/create_whats_app_flow200_response_spec.rb +42 -0
  64. data/spec/models/create_whats_app_flow_request_spec.rb +58 -0
  65. data/spec/models/get_whats_app_flow200_response_flow_preview_spec.rb +42 -0
  66. data/spec/models/get_whats_app_flow200_response_flow_spec.rb +72 -0
  67. data/spec/models/get_whats_app_flow200_response_spec.rb +42 -0
  68. data/spec/models/get_whats_app_flow_json200_response_assets_inner_spec.rb +48 -0
  69. data/spec/models/get_whats_app_flow_json200_response_spec.rb +42 -0
  70. data/spec/models/get_you_tube_demographics412_response_scope_status_spec.rb +48 -0
  71. data/spec/models/get_you_tube_demographics412_response_spec.rb +54 -0
  72. data/spec/models/list_whats_app_flows200_response_flows_inner_spec.rb +64 -0
  73. data/spec/models/list_whats_app_flows200_response_spec.rb +42 -0
  74. data/spec/models/publish_whats_app_flow_request_spec.rb +36 -0
  75. data/spec/models/send_whats_app_flow_message200_response_spec.rb +42 -0
  76. data/spec/models/send_whats_app_flow_message_request_flow_action_payload_spec.rb +42 -0
  77. data/spec/models/send_whats_app_flow_message_request_header_spec.rb +46 -0
  78. data/spec/models/send_whats_app_flow_message_request_spec.rb +100 -0
  79. data/spec/models/update_whats_app_flow_request_spec.rb +52 -0
  80. data/spec/models/upload_whats_app_flow_json200_response_spec.rb +42 -0
  81. data/spec/models/upload_whats_app_flow_json200_response_validation_errors_inner_spec.rb +72 -0
  82. data/spec/models/upload_whats_app_flow_json_request_flow_json_spec.rb +32 -0
  83. data/spec/models/upload_whats_app_flow_json_request_spec.rb +42 -0
  84. data/spec/models/you_tube_demographics_response_date_range_spec.rb +42 -0
  85. data/spec/models/you_tube_demographics_response_demographics_value_inner_spec.rb +42 -0
  86. data/spec/models/you_tube_demographics_response_spec.rb +66 -0
  87. data/zernio-sdk-0.0.110.gem +0 -0
  88. metadata +107 -3
  89. data/zernio-sdk-0.0.108.gem +0 -0
@@ -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
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 GetWhatsAppFlow200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :flow
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'flow' => :'flow'
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
+ :'flow' => :'GetWhatsAppFlow200ResponseFlow'
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 `Late::GetWhatsAppFlow200Response` 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 `Late::GetWhatsAppFlow200Response`. 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?(:'flow')
75
+ self.flow = attributes[:'flow']
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
+ flow == o.flow
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, flow].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,205 @@
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 GetWhatsAppFlow200ResponseFlow < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :categories
25
+
26
+ attr_accessor :validation_errors
27
+
28
+ attr_accessor :json_version
29
+
30
+ attr_accessor :preview
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'name' => :'name',
37
+ :'status' => :'status',
38
+ :'categories' => :'categories',
39
+ :'validation_errors' => :'validation_errors',
40
+ :'json_version' => :'json_version',
41
+ :'preview' => :'preview'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'id' => :'String',
59
+ :'name' => :'String',
60
+ :'status' => :'String',
61
+ :'categories' => :'Array<String>',
62
+ :'validation_errors' => :'Array<Object>',
63
+ :'json_version' => :'String',
64
+ :'preview' => :'GetWhatsAppFlow200ResponseFlowPreview'
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 `Late::GetWhatsAppFlow200ResponseFlow` 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 `Late::GetWhatsAppFlow200ResponseFlow`. 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?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'name')
95
+ self.name = attributes[:'name']
96
+ end
97
+
98
+ if attributes.key?(:'status')
99
+ self.status = attributes[:'status']
100
+ end
101
+
102
+ if attributes.key?(:'categories')
103
+ if (value = attributes[:'categories']).is_a?(Array)
104
+ self.categories = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'validation_errors')
109
+ if (value = attributes[:'validation_errors']).is_a?(Array)
110
+ self.validation_errors = value
111
+ end
112
+ end
113
+
114
+ if attributes.key?(:'json_version')
115
+ self.json_version = attributes[:'json_version']
116
+ end
117
+
118
+ if attributes.key?(:'preview')
119
+ self.preview = attributes[:'preview']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ true
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ id == o.id &&
144
+ name == o.name &&
145
+ status == o.status &&
146
+ categories == o.categories &&
147
+ validation_errors == o.validation_errors &&
148
+ json_version == o.json_version &&
149
+ preview == o.preview
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [id, name, status, categories, validation_errors, json_version, preview].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ end
204
+
205
+ end
@@ -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
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 GetWhatsAppFlow200ResponseFlowPreview < ApiModelBase
18
+ attr_accessor :preview_url
19
+
20
+ attr_accessor :expires_at
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'preview_url' => :'preview_url',
26
+ :'expires_at' => :'expires_at'
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
+ :'preview_url' => :'String',
44
+ :'expires_at' => :'String'
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 `Late::GetWhatsAppFlow200ResponseFlowPreview` 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 `Late::GetWhatsAppFlow200ResponseFlowPreview`. 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?(:'preview_url')
71
+ self.preview_url = attributes[:'preview_url']
72
+ end
73
+
74
+ if attributes.key?(:'expires_at')
75
+ self.expires_at = attributes[:'expires_at']
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
+ preview_url == o.preview_url &&
100
+ expires_at == o.expires_at
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
+ [preview_url, expires_at].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,158 @@
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 GetWhatsAppFlowJson200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :assets
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'assets' => :'assets'
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
+ :'assets' => :'Array<GetWhatsAppFlowJson200ResponseAssetsInner>'
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 `Late::GetWhatsAppFlowJson200Response` 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 `Late::GetWhatsAppFlowJson200Response`. 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?(:'assets')
75
+ if (value = attributes[:'assets']).is_a?(Array)
76
+ self.assets = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ success == o.success &&
102
+ assets == o.assets
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [success, assets].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end