late-sdk 0.0.49 → 0.0.51

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/docs/AccountWithFollowerStats.md +3 -1
  4. data/docs/AccountWithFollowerStatsAllOfAccountStats.md +38 -0
  5. data/docs/GMBAttributesApi.md +16 -8
  6. data/docs/GMBFoodMenusApi.md +16 -8
  7. data/docs/GMBLocationDetailsApi.md +10 -4
  8. data/docs/GMBMediaApi.md +18 -8
  9. data/docs/GMBPlaceActionsApi.md +18 -8
  10. data/docs/GMBReviewsApi.md +2 -0
  11. data/docs/GetWhatsAppDisplayName200Response.md +20 -0
  12. data/docs/GetWhatsAppDisplayName200ResponseDisplayName.md +22 -0
  13. data/docs/UpdateWhatsAppDisplayName200Response.md +22 -0
  14. data/docs/UpdateWhatsAppDisplayName200ResponseDisplayName.md +20 -0
  15. data/docs/UpdateWhatsAppDisplayNameRequest.md +20 -0
  16. data/docs/WhatsAppApi.md +212 -0
  17. data/lib/late-sdk/api/gmb_attributes_api.rb +6 -0
  18. data/lib/late-sdk/api/gmb_food_menus_api.rb +6 -0
  19. data/lib/late-sdk/api/gmb_location_details_api.rb +6 -0
  20. data/lib/late-sdk/api/gmb_media_api.rb +9 -0
  21. data/lib/late-sdk/api/gmb_place_actions_api.rb +9 -0
  22. data/lib/late-sdk/api/gmb_reviews_api.rb +3 -0
  23. data/lib/late-sdk/api/whats_app_api.rb +208 -0
  24. data/lib/late-sdk/models/account_with_follower_stats.rb +13 -4
  25. data/lib/late-sdk/models/account_with_follower_stats_all_of_account_stats.rb +249 -0
  26. data/lib/late-sdk/models/get_whats_app_display_name200_response.rb +156 -0
  27. data/lib/late-sdk/models/get_whats_app_display_name200_response_display_name.rb +202 -0
  28. data/lib/late-sdk/models/update_whats_app_display_name200_response.rb +165 -0
  29. data/lib/late-sdk/models/update_whats_app_display_name200_response_display_name.rb +190 -0
  30. data/lib/late-sdk/models/update_whats_app_display_name_request.rb +210 -0
  31. data/lib/late-sdk/version.rb +1 -1
  32. data/lib/late-sdk.rb +6 -0
  33. data/openapi.yaml +194 -0
  34. data/spec/api/gmb_attributes_api_spec.rb +2 -0
  35. data/spec/api/gmb_food_menus_api_spec.rb +2 -0
  36. data/spec/api/gmb_location_details_api_spec.rb +2 -0
  37. data/spec/api/gmb_media_api_spec.rb +3 -0
  38. data/spec/api/gmb_place_actions_api_spec.rb +3 -0
  39. data/spec/api/gmb_reviews_api_spec.rb +1 -0
  40. data/spec/api/whats_app_api_spec.rb +37 -0
  41. data/spec/models/account_with_follower_stats_all_of_account_stats_spec.rb +96 -0
  42. data/spec/models/account_with_follower_stats_spec.rb +6 -0
  43. data/spec/models/get_whats_app_display_name200_response_display_name_spec.rb +52 -0
  44. data/spec/models/get_whats_app_display_name200_response_spec.rb +42 -0
  45. data/spec/models/update_whats_app_display_name200_response_display_name_spec.rb +46 -0
  46. data/spec/models/update_whats_app_display_name200_response_spec.rb +48 -0
  47. data/spec/models/update_whats_app_display_name_request_spec.rb +42 -0
  48. metadata +25 -1
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
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 GetWhatsAppDisplayName200ResponseDisplayName < ApiModelBase
18
+ # Current verified display name
19
+ attr_accessor :name
20
+
21
+ # Meta review status for the display name
22
+ attr_accessor :status
23
+
24
+ # Display phone number
25
+ attr_accessor :phone_number
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'name' => :'name',
53
+ :'status' => :'status',
54
+ :'phone_number' => :'phoneNumber'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'name' => :'String',
72
+ :'status' => :'String',
73
+ :'phone_number' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetWhatsAppDisplayName200ResponseDisplayName` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
92
+ attributes = attributes.each_with_object({}) { |(k, v), h|
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetWhatsAppDisplayName200ResponseDisplayName`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
95
+ end
96
+ h[k.to_sym] = v
97
+ }
98
+
99
+ if attributes.key?(:'name')
100
+ self.name = attributes[:'name']
101
+ end
102
+
103
+ if attributes.key?(:'status')
104
+ self.status = attributes[:'status']
105
+ end
106
+
107
+ if attributes.key?(:'phone_number')
108
+ self.phone_number = attributes[:'phone_number']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ status_validator = EnumAttributeValidator.new('String', ["APPROVED", "PENDING_REVIEW", "DECLINED", "NONE"])
125
+ return false unless status_validator.valid?(@status)
126
+ true
127
+ end
128
+
129
+ # Custom attribute writer method checking allowed values (enum).
130
+ # @param [Object] status Object to be assigned
131
+ def status=(status)
132
+ validator = EnumAttributeValidator.new('String', ["APPROVED", "PENDING_REVIEW", "DECLINED", "NONE"])
133
+ unless validator.valid?(status)
134
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
135
+ end
136
+ @status = status
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ name == o.name &&
145
+ status == o.status &&
146
+ phone_number == o.phone_number
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [name, status, phone_number].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
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 UpdateWhatsAppDisplayName200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ attr_accessor :message
21
+
22
+ attr_accessor :display_name
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'success' => :'success',
28
+ :'message' => :'message',
29
+ :'display_name' => :'displayName'
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
+ :'success' => :'Boolean',
47
+ :'message' => :'String',
48
+ :'display_name' => :'UpdateWhatsAppDisplayName200ResponseDisplayName'
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::UpdateWhatsAppDisplayName200Response` 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::UpdateWhatsAppDisplayName200Response`. 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?(:'success')
75
+ self.success = attributes[:'success']
76
+ end
77
+
78
+ if attributes.key?(:'message')
79
+ self.message = attributes[:'message']
80
+ end
81
+
82
+ if attributes.key?(:'display_name')
83
+ self.display_name = attributes[:'display_name']
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
+ success == o.success &&
108
+ message == o.message &&
109
+ display_name == o.display_name
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
+ [success, message, display_name].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,190 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
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 UpdateWhatsAppDisplayName200ResponseDisplayName < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :status
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'name' => :'name',
48
+ :'status' => :'status'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'name' => :'String',
66
+ :'status' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateWhatsAppDisplayName200ResponseDisplayName` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateWhatsAppDisplayName200ResponseDisplayName`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'name')
93
+ self.name = attributes[:'name']
94
+ end
95
+
96
+ if attributes.key?(:'status')
97
+ self.status = attributes[:'status']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ status_validator = EnumAttributeValidator.new('String', ["PENDING_REVIEW"])
114
+ return false unless status_validator.valid?(@status)
115
+ true
116
+ end
117
+
118
+ # Custom attribute writer method checking allowed values (enum).
119
+ # @param [Object] status Object to be assigned
120
+ def status=(status)
121
+ validator = EnumAttributeValidator.new('String', ["PENDING_REVIEW"])
122
+ unless validator.valid?(status)
123
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
124
+ end
125
+ @status = status
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
+ name == o.name &&
134
+ status == o.status
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [name, status].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end