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,166 @@
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 GetWhatsAppFlowJson200ResponseAssetsInner < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :asset_type
21
+
22
+ # Temporary URL to download the flow JSON
23
+ attr_accessor :download_url
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'name' => :'name',
29
+ :'asset_type' => :'asset_type',
30
+ :'download_url' => :'download_url'
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
+ :'name' => :'String',
48
+ :'asset_type' => :'String',
49
+ :'download_url' => :'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 `Late::GetWhatsAppFlowJson200ResponseAssetsInner` 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 `Late::GetWhatsAppFlowJson200ResponseAssetsInner`. 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?(:'name')
76
+ self.name = attributes[:'name']
77
+ end
78
+
79
+ if attributes.key?(:'asset_type')
80
+ self.asset_type = attributes[:'asset_type']
81
+ end
82
+
83
+ if attributes.key?(:'download_url')
84
+ self.download_url = attributes[:'download_url']
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
+ name == o.name &&
109
+ asset_type == o.asset_type &&
110
+ download_url == o.download_url
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
+ [name, asset_type, download_url].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,174 @@
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 GetYouTubeDemographics412Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :code
23
+
24
+ attr_accessor :scope_status
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'error' => :'error',
31
+ :'code' => :'code',
32
+ :'scope_status' => :'scopeStatus'
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
+ :'success' => :'Boolean',
50
+ :'error' => :'String',
51
+ :'code' => :'String',
52
+ :'scope_status' => :'GetYouTubeDemographics412ResponseScopeStatus'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetYouTubeDemographics412Response` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetYouTubeDemographics412Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'success')
79
+ self.success = attributes[:'success']
80
+ end
81
+
82
+ if attributes.key?(:'error')
83
+ self.error = attributes[:'error']
84
+ end
85
+
86
+ if attributes.key?(:'code')
87
+ self.code = attributes[:'code']
88
+ end
89
+
90
+ if attributes.key?(:'scope_status')
91
+ self.scope_status = attributes[:'scope_status']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ success == o.success &&
116
+ error == o.error &&
117
+ code == o.code &&
118
+ scope_status == o.scope_status
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [success, error, code, scope_status].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,165 @@
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 GetYouTubeDemographics412ResponseScopeStatus < ApiModelBase
18
+ attr_accessor :has_analytics_scope
19
+
20
+ attr_accessor :requires_reauthorization
21
+
22
+ attr_accessor :reauthorize_url
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'has_analytics_scope' => :'hasAnalyticsScope',
28
+ :'requires_reauthorization' => :'requiresReauthorization',
29
+ :'reauthorize_url' => :'reauthorizeUrl'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'has_analytics_scope' => :'Boolean',
47
+ :'requires_reauthorization' => :'Boolean',
48
+ :'reauthorize_url' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetYouTubeDemographics412ResponseScopeStatus` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetYouTubeDemographics412ResponseScopeStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'has_analytics_scope')
75
+ self.has_analytics_scope = attributes[:'has_analytics_scope']
76
+ end
77
+
78
+ if attributes.key?(:'requires_reauthorization')
79
+ self.requires_reauthorization = attributes[:'requires_reauthorization']
80
+ end
81
+
82
+ if attributes.key?(:'reauthorize_url')
83
+ self.reauthorize_url = attributes[:'reauthorize_url']
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
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ has_analytics_scope == o.has_analytics_scope &&
108
+ requires_reauthorization == o.requires_reauthorization &&
109
+ reauthorize_url == o.reauthorize_url
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [has_analytics_scope, requires_reauthorization, reauthorize_url].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ 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 ListWhatsAppFlows200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :flows
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'success' => :'success',
26
+ :'flows' => :'flows'
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
+ :'flows' => :'Array<ListWhatsAppFlows200ResponseFlowsInner>'
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::ListWhatsAppFlows200Response` 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::ListWhatsAppFlows200Response`. 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?(:'flows')
75
+ if (value = attributes[:'flows']).is_a?(Array)
76
+ self.flows = 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
+ flows == o.flows
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, flows].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