late-sdk 0.0.110 → 0.0.112

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -0
  3. data/docs/AnalyticsApi.md +154 -0
  4. data/docs/CreateInboxConversation201Response.md +20 -0
  5. data/docs/CreateInboxConversation201ResponseData.md +26 -0
  6. data/docs/CreateInboxConversation400Response.md +20 -0
  7. data/docs/CreateInboxConversation422Response.md +20 -0
  8. data/docs/CreateInboxConversationRequest.md +26 -0
  9. data/docs/CreatePostRequest.md +2 -0
  10. data/docs/EditPost200Response.md +24 -0
  11. data/docs/EditPostRequest.md +20 -0
  12. data/docs/FacebookPlatformData.md +3 -1
  13. data/docs/GetGoogleBusinessPerformance200Response.md +28 -0
  14. data/docs/GetGoogleBusinessPerformance200ResponseDateRange.md +20 -0
  15. data/docs/GetGoogleBusinessPerformance200ResponseMetricsValue.md +20 -0
  16. data/docs/GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner.md +20 -0
  17. data/docs/GetGoogleBusinessPerformance400Response.md +20 -0
  18. data/docs/GetGoogleBusinessSearchKeywords200Response.md +28 -0
  19. data/docs/GetGoogleBusinessSearchKeywords200ResponseKeywordsInner.md +20 -0
  20. data/docs/GetGoogleBusinessSearchKeywords200ResponseMonthRange.md +20 -0
  21. data/docs/GetGoogleBusinessSearchKeywords400Response.md +18 -0
  22. data/docs/MessagesApi.md +70 -0
  23. data/docs/PostsApi.md +72 -0
  24. data/docs/TwitterPlatformData.md +3 -1
  25. data/docs/UpdatePostRequest.md +2 -0
  26. data/lib/late-sdk/api/analytics_api.rb +153 -0
  27. data/lib/late-sdk/api/messages_api.rb +68 -0
  28. data/lib/late-sdk/api/posts_api.rb +74 -0
  29. data/lib/late-sdk/models/create_inbox_conversation201_response.rb +156 -0
  30. data/lib/late-sdk/models/create_inbox_conversation201_response_data.rb +188 -0
  31. data/lib/late-sdk/models/create_inbox_conversation400_response.rb +190 -0
  32. data/lib/late-sdk/models/create_inbox_conversation422_response.rb +190 -0
  33. data/lib/late-sdk/models/create_inbox_conversation_request.rb +207 -0
  34. data/lib/late-sdk/models/create_post_request.rb +11 -1
  35. data/lib/late-sdk/models/edit_post200_response.rb +176 -0
  36. data/lib/late-sdk/models/edit_post_request.rb +216 -0
  37. data/lib/late-sdk/models/facebook_platform_data.rb +14 -2
  38. data/lib/late-sdk/models/get_google_business_performance200_response.rb +195 -0
  39. data/lib/late-sdk/models/get_google_business_performance200_response_date_range.rb +156 -0
  40. data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value.rb +159 -0
  41. data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value_values_inner.rb +156 -0
  42. data/lib/late-sdk/models/get_google_business_performance400_response.rb +158 -0
  43. data/lib/late-sdk/models/get_google_business_search_keywords200_response.rb +194 -0
  44. data/lib/late-sdk/models/get_google_business_search_keywords200_response_keywords_inner.rb +156 -0
  45. data/lib/late-sdk/models/get_google_business_search_keywords200_response_month_range.rb +156 -0
  46. data/lib/late-sdk/models/get_google_business_search_keywords400_response.rb +147 -0
  47. data/lib/late-sdk/models/twitter_platform_data.rb +16 -4
  48. data/lib/late-sdk/models/update_post_request.rb +11 -1
  49. data/lib/late-sdk/version.rb +1 -1
  50. data/lib/late-sdk.rb +16 -0
  51. data/openapi.yaml +423 -1
  52. data/spec/api/analytics_api_spec.rb +29 -0
  53. data/spec/api/messages_api_spec.rb +12 -0
  54. data/spec/api/posts_api_spec.rb +13 -0
  55. data/spec/models/create_inbox_conversation201_response_data_spec.rb +60 -0
  56. data/spec/models/create_inbox_conversation201_response_spec.rb +42 -0
  57. data/spec/models/create_inbox_conversation400_response_spec.rb +46 -0
  58. data/spec/models/create_inbox_conversation422_response_spec.rb +46 -0
  59. data/spec/models/create_inbox_conversation_request_spec.rb +60 -0
  60. data/spec/models/create_post_request_spec.rb +6 -0
  61. data/spec/models/edit_post200_response_spec.rb +54 -0
  62. data/spec/models/edit_post_request_spec.rb +46 -0
  63. data/spec/models/facebook_platform_data_spec.rb +6 -0
  64. data/spec/models/get_google_business_performance200_response_date_range_spec.rb +42 -0
  65. data/spec/models/get_google_business_performance200_response_metrics_value_spec.rb +42 -0
  66. data/spec/models/get_google_business_performance200_response_metrics_value_values_inner_spec.rb +42 -0
  67. data/spec/models/get_google_business_performance200_response_spec.rb +66 -0
  68. data/spec/models/get_google_business_performance400_response_spec.rb +42 -0
  69. data/spec/models/get_google_business_search_keywords200_response_keywords_inner_spec.rb +42 -0
  70. data/spec/models/get_google_business_search_keywords200_response_month_range_spec.rb +42 -0
  71. data/spec/models/get_google_business_search_keywords200_response_spec.rb +66 -0
  72. data/spec/models/get_google_business_search_keywords400_response_spec.rb +36 -0
  73. data/spec/models/twitter_platform_data_spec.rb +6 -0
  74. data/spec/models/update_post_request_spec.rb +6 -0
  75. data/zernio-sdk-0.0.112.gem +0 -0
  76. metadata +67 -3
  77. data/zernio-sdk-0.0.110.gem +0 -0
@@ -0,0 +1,159 @@
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 GetGoogleBusinessPerformance200ResponseMetricsValue < ApiModelBase
18
+ # Sum of all daily values in the range
19
+ attr_accessor :total
20
+
21
+ attr_accessor :values
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'total' => :'total',
27
+ :'values' => :'values'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'total' => :'Integer',
45
+ :'values' => :'Array<GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner>'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetGoogleBusinessPerformance200ResponseMetricsValue` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetGoogleBusinessPerformance200ResponseMetricsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'total')
72
+ self.total = attributes[:'total']
73
+ end
74
+
75
+ if attributes.key?(:'values')
76
+ if (value = attributes[:'values']).is_a?(Array)
77
+ self.values = value
78
+ end
79
+ end
80
+ end
81
+
82
+ # Show invalid properties with the reasons. Usually used together with valid?
83
+ # @return Array for valid properties with the reasons
84
+ def list_invalid_properties
85
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ total == o.total &&
103
+ values == o.values
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [total, values].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Returns the object in the form of hash
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_hash
144
+ hash = {}
145
+ self.class.attribute_map.each_pair do |attr, param|
146
+ value = self.send(attr)
147
+ if value.nil?
148
+ is_nullable = self.class.openapi_nullable.include?(attr)
149
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
150
+ end
151
+
152
+ hash[param] = _to_hash(value)
153
+ end
154
+ hash
155
+ end
156
+
157
+ end
158
+
159
+ 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 GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner < ApiModelBase
18
+ attr_accessor :date
19
+
20
+ attr_accessor :value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'date' => :'date',
26
+ :'value' => :'value'
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
+ :'date' => :'Date',
44
+ :'value' => :'Integer'
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::GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner` 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::GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner`. 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?(:'date')
71
+ self.date = attributes[:'date']
72
+ end
73
+
74
+ if attributes.key?(:'value')
75
+ self.value = attributes[:'value']
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
+ date == o.date &&
100
+ value == o.value
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
+ [date, value].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 GetGoogleBusinessPerformance400Response < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ attr_accessor :valid_metrics
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'error' => :'error',
26
+ :'valid_metrics' => :'validMetrics'
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
+ :'error' => :'String',
44
+ :'valid_metrics' => :'Array<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::GetGoogleBusinessPerformance400Response` 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::GetGoogleBusinessPerformance400Response`. 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?(:'error')
71
+ self.error = attributes[:'error']
72
+ end
73
+
74
+ if attributes.key?(:'valid_metrics')
75
+ if (value = attributes[:'valid_metrics']).is_a?(Array)
76
+ self.valid_metrics = 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
+ error == o.error &&
102
+ valid_metrics == o.valid_metrics
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
+ [error, valid_metrics].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
@@ -0,0 +1,194 @@
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 GetGoogleBusinessSearchKeywords200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :account_id
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :month_range
25
+
26
+ attr_accessor :keywords
27
+
28
+ attr_accessor :note
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'success' => :'success',
34
+ :'account_id' => :'accountId',
35
+ :'platform' => :'platform',
36
+ :'month_range' => :'monthRange',
37
+ :'keywords' => :'keywords',
38
+ :'note' => :'note'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'success' => :'Boolean',
56
+ :'account_id' => :'String',
57
+ :'platform' => :'String',
58
+ :'month_range' => :'GetGoogleBusinessSearchKeywords200ResponseMonthRange',
59
+ :'keywords' => :'Array<GetGoogleBusinessSearchKeywords200ResponseKeywordsInner>',
60
+ :'note' => :'String'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetGoogleBusinessSearchKeywords200Response` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetGoogleBusinessSearchKeywords200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'success')
87
+ self.success = attributes[:'success']
88
+ end
89
+
90
+ if attributes.key?(:'account_id')
91
+ self.account_id = attributes[:'account_id']
92
+ end
93
+
94
+ if attributes.key?(:'platform')
95
+ self.platform = attributes[:'platform']
96
+ end
97
+
98
+ if attributes.key?(:'month_range')
99
+ self.month_range = attributes[:'month_range']
100
+ end
101
+
102
+ if attributes.key?(:'keywords')
103
+ if (value = attributes[:'keywords']).is_a?(Array)
104
+ self.keywords = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'note')
109
+ self.note = attributes[:'note']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
+ invalid_properties = Array.new
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ success == o.success &&
134
+ account_id == o.account_id &&
135
+ platform == o.platform &&
136
+ month_range == o.month_range &&
137
+ keywords == o.keywords &&
138
+ note == o.note
139
+ end
140
+
141
+ # @see the `==` method
142
+ # @param [Object] Object to be compared
143
+ def eql?(o)
144
+ self == o
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ def hash
150
+ [success, account_id, platform, month_range, keywords, note].hash
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def self.build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
159
+ transformed_hash = {}
160
+ openapi_types.each_pair do |key, type|
161
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = nil
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[attribute_map[key]].is_a?(Array)
167
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
+ end
169
+ elsif !attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
+ end
172
+ end
173
+ new(transformed_hash)
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ if value.nil?
183
+ is_nullable = self.class.openapi_nullable.include?(attr)
184
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
+ end
186
+
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ end
193
+
194
+ end