late-sdk 0.0.52 → 0.0.53

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 (105) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -0
  3. data/docs/AnalyticsListResponsePostsInner.md +1 -1
  4. data/docs/AnalyticsSinglePostResponse.md +7 -1
  5. data/docs/AnalyticsSinglePostResponseMediaItemsInner.md +22 -0
  6. data/docs/BookmarkPost200Response.md +24 -0
  7. data/docs/BookmarkPostRequest.md +20 -0
  8. data/docs/CommentsApi.md +2 -2
  9. data/docs/FollowUser200Response.md +26 -0
  10. data/docs/FollowUserRequest.md +20 -0
  11. data/docs/GMBLocationDetailsApi.md +4 -4
  12. data/docs/GbpFreeFormServiceItemLabel.md +20 -0
  13. data/docs/GbpUpdateFreeFormServiceItemLabel.md +20 -0
  14. data/docs/GetGoogleBusinessLocationDetails200Response.md +5 -1
  15. data/docs/GetGoogleBusinessLocationDetails200ResponseCategories.md +20 -0
  16. data/docs/GetGoogleBusinessLocationDetails200ResponseCategoriesAdditionalCategoriesInner.md +20 -0
  17. data/docs/GetGoogleBusinessLocationDetails200ResponseCategoriesPrimaryCategory.md +20 -0
  18. data/docs/GetGoogleBusinessLocationDetails200ResponseServiceItemsInner.md +22 -0
  19. data/docs/GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerFreeFormServiceItem.md +20 -0
  20. data/docs/GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerPrice.md +22 -0
  21. data/docs/GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerStructuredServiceItem.md +20 -0
  22. data/docs/RemoveBookmark200Response.md +24 -0
  23. data/docs/RetweetPost200Response.md +24 -0
  24. data/docs/RetweetPostRequest.md +20 -0
  25. data/docs/TwitterEngagementApi.md +433 -0
  26. data/docs/UndoRetweet200Response.md +24 -0
  27. data/docs/UnfollowUser200Response.md +24 -0
  28. data/docs/UpdateGoogleBusinessLocationDetailsRequest.md +6 -2
  29. data/docs/UpdateGoogleBusinessLocationDetailsRequestCategories.md +20 -0
  30. data/docs/UpdateGoogleBusinessLocationDetailsRequestCategoriesAdditionalCategoriesInner.md +18 -0
  31. data/docs/UpdateGoogleBusinessLocationDetailsRequestCategoriesPrimaryCategory.md +18 -0
  32. data/docs/UpdateGoogleBusinessLocationDetailsRequestServiceItemsInner.md +22 -0
  33. data/docs/UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerFreeFormServiceItem.md +20 -0
  34. data/docs/UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerPrice.md +22 -0
  35. data/docs/UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerStructuredServiceItem.md +20 -0
  36. data/lib/late-sdk/api/comments_api.rb +4 -4
  37. data/lib/late-sdk/api/gmb_location_details_api.rb +6 -6
  38. data/lib/late-sdk/api/twitter_engagement_api.rb +439 -0
  39. data/lib/late-sdk/models/analytics_list_response_posts_inner.rb +4 -3
  40. data/lib/late-sdk/models/analytics_single_post_response.rb +68 -4
  41. data/lib/late-sdk/models/analytics_single_post_response_media_items_inner.rb +201 -0
  42. data/lib/late-sdk/models/bookmark_post200_response.rb +174 -0
  43. data/lib/late-sdk/models/bookmark_post_request.rb +192 -0
  44. data/lib/late-sdk/models/follow_user200_response.rb +184 -0
  45. data/lib/late-sdk/models/follow_user_request.rb +192 -0
  46. data/lib/late-sdk/models/gbp_free_form_service_item_label.rb +156 -0
  47. data/lib/late-sdk/models/gbp_update_free_form_service_item_label.rb +158 -0
  48. data/lib/late-sdk/models/get_google_business_location_details200_response.rb +25 -4
  49. data/lib/late-sdk/models/get_google_business_location_details200_response_categories.rb +159 -0
  50. data/lib/late-sdk/models/get_google_business_location_details200_response_categories_additional_categories_inner.rb +156 -0
  51. data/lib/late-sdk/models/get_google_business_location_details200_response_categories_primary_category.rb +158 -0
  52. data/lib/late-sdk/models/get_google_business_location_details200_response_service_items_inner.rb +165 -0
  53. data/lib/late-sdk/models/get_google_business_location_details200_response_service_items_inner_free_form_service_item.rb +156 -0
  54. data/lib/late-sdk/models/get_google_business_location_details200_response_service_items_inner_price.rb +165 -0
  55. data/lib/late-sdk/models/get_google_business_location_details200_response_service_items_inner_structured_service_item.rb +156 -0
  56. data/lib/late-sdk/models/remove_bookmark200_response.rb +174 -0
  57. data/lib/late-sdk/models/retweet_post200_response.rb +174 -0
  58. data/lib/late-sdk/models/retweet_post_request.rb +192 -0
  59. data/lib/late-sdk/models/undo_retweet200_response.rb +174 -0
  60. data/lib/late-sdk/models/unfollow_user200_response.rb +174 -0
  61. data/lib/late-sdk/models/update_google_business_location_details_request.rb +26 -5
  62. data/lib/late-sdk/models/update_google_business_location_details_request_categories.rb +159 -0
  63. data/lib/late-sdk/models/update_google_business_location_details_request_categories_additional_categories_inner.rb +148 -0
  64. data/lib/late-sdk/models/update_google_business_location_details_request_categories_primary_category.rb +148 -0
  65. data/lib/late-sdk/models/update_google_business_location_details_request_service_items_inner.rb +165 -0
  66. data/lib/late-sdk/models/update_google_business_location_details_request_service_items_inner_free_form_service_item.rb +158 -0
  67. data/lib/late-sdk/models/update_google_business_location_details_request_service_items_inner_price.rb +169 -0
  68. data/lib/late-sdk/models/update_google_business_location_details_request_service_items_inner_structured_service_item.rb +159 -0
  69. data/lib/late-sdk/version.rb +1 -1
  70. data/lib/late-sdk.rb +27 -0
  71. data/openapi.yaml +406 -29
  72. data/spec/api/comments_api_spec.rb +2 -2
  73. data/spec/api/gmb_location_details_api_spec.rb +3 -3
  74. data/spec/api/twitter_engagement_api_spec.rb +110 -0
  75. data/spec/models/analytics_list_response_posts_inner_spec.rb +1 -1
  76. data/spec/models/analytics_single_post_response_media_items_inner_spec.rb +52 -0
  77. data/spec/models/analytics_single_post_response_spec.rb +22 -0
  78. data/spec/models/bookmark_post200_response_spec.rb +54 -0
  79. data/spec/models/bookmark_post_request_spec.rb +42 -0
  80. data/spec/models/follow_user200_response_spec.rb +60 -0
  81. data/spec/models/follow_user_request_spec.rb +42 -0
  82. data/spec/models/gbp_free_form_service_item_label_spec.rb +42 -0
  83. data/spec/models/gbp_update_free_form_service_item_label_spec.rb +42 -0
  84. data/spec/models/get_google_business_location_details200_response_categories_additional_categories_inner_spec.rb +42 -0
  85. data/spec/models/get_google_business_location_details200_response_categories_primary_category_spec.rb +42 -0
  86. data/spec/models/get_google_business_location_details200_response_categories_spec.rb +42 -0
  87. data/spec/models/get_google_business_location_details200_response_service_items_inner_free_form_service_item_spec.rb +42 -0
  88. data/spec/models/get_google_business_location_details200_response_service_items_inner_price_spec.rb +48 -0
  89. data/spec/models/get_google_business_location_details200_response_service_items_inner_spec.rb +48 -0
  90. data/spec/models/get_google_business_location_details200_response_service_items_inner_structured_service_item_spec.rb +42 -0
  91. data/spec/models/get_google_business_location_details200_response_spec.rb +12 -0
  92. data/spec/models/remove_bookmark200_response_spec.rb +54 -0
  93. data/spec/models/retweet_post200_response_spec.rb +54 -0
  94. data/spec/models/retweet_post_request_spec.rb +42 -0
  95. data/spec/models/undo_retweet200_response_spec.rb +54 -0
  96. data/spec/models/unfollow_user200_response_spec.rb +54 -0
  97. data/spec/models/update_google_business_location_details_request_categories_additional_categories_inner_spec.rb +36 -0
  98. data/spec/models/update_google_business_location_details_request_categories_primary_category_spec.rb +36 -0
  99. data/spec/models/update_google_business_location_details_request_categories_spec.rb +42 -0
  100. data/spec/models/update_google_business_location_details_request_service_items_inner_free_form_service_item_spec.rb +42 -0
  101. data/spec/models/update_google_business_location_details_request_service_items_inner_price_spec.rb +48 -0
  102. data/spec/models/update_google_business_location_details_request_service_items_inner_spec.rb +48 -0
  103. data/spec/models/update_google_business_location_details_request_service_items_inner_structured_service_item_spec.rb +42 -0
  104. data/spec/models/update_google_business_location_details_request_spec.rb +12 -0
  105. metadata +110 -2
@@ -0,0 +1,174 @@
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 RemoveBookmark200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :tweet_id
21
+
22
+ attr_accessor :bookmarked
23
+
24
+ attr_accessor :platform
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'status' => :'status',
30
+ :'tweet_id' => :'tweetId',
31
+ :'bookmarked' => :'bookmarked',
32
+ :'platform' => :'platform'
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
+ :'status' => :'String',
50
+ :'tweet_id' => :'String',
51
+ :'bookmarked' => :'Boolean',
52
+ :'platform' => :'String'
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::RemoveBookmark200Response` 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::RemoveBookmark200Response`. 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?(:'status')
79
+ self.status = attributes[:'status']
80
+ end
81
+
82
+ if attributes.key?(:'tweet_id')
83
+ self.tweet_id = attributes[:'tweet_id']
84
+ end
85
+
86
+ if attributes.key?(:'bookmarked')
87
+ self.bookmarked = attributes[:'bookmarked']
88
+ end
89
+
90
+ if attributes.key?(:'platform')
91
+ self.platform = attributes[:'platform']
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
+ status == o.status &&
116
+ tweet_id == o.tweet_id &&
117
+ bookmarked == o.bookmarked &&
118
+ platform == o.platform
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
+ [status, tweet_id, bookmarked, platform].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,174 @@
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 RetweetPost200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :tweet_id
21
+
22
+ attr_accessor :retweeted
23
+
24
+ attr_accessor :platform
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'status' => :'status',
30
+ :'tweet_id' => :'tweetId',
31
+ :'retweeted' => :'retweeted',
32
+ :'platform' => :'platform'
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
+ :'status' => :'String',
50
+ :'tweet_id' => :'String',
51
+ :'retweeted' => :'Boolean',
52
+ :'platform' => :'String'
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::RetweetPost200Response` 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::RetweetPost200Response`. 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?(:'status')
79
+ self.status = attributes[:'status']
80
+ end
81
+
82
+ if attributes.key?(:'tweet_id')
83
+ self.tweet_id = attributes[:'tweet_id']
84
+ end
85
+
86
+ if attributes.key?(:'retweeted')
87
+ self.retweeted = attributes[:'retweeted']
88
+ end
89
+
90
+ if attributes.key?(:'platform')
91
+ self.platform = attributes[:'platform']
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
+ status == o.status &&
116
+ tweet_id == o.tweet_id &&
117
+ retweeted == o.retweeted &&
118
+ platform == o.platform
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
+ [status, tweet_id, retweeted, platform].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,192 @@
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 RetweetPostRequest < ApiModelBase
18
+ # The social account ID
19
+ attr_accessor :account_id
20
+
21
+ # The ID of the tweet to retweet
22
+ attr_accessor :tweet_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'account_id' => :'accountId',
28
+ :'tweet_id' => :'tweetId'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'account_id' => :'String',
46
+ :'tweet_id' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::RetweetPostRequest` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::RetweetPostRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'account_id')
73
+ self.account_id = attributes[:'account_id']
74
+ else
75
+ self.account_id = nil
76
+ end
77
+
78
+ if attributes.key?(:'tweet_id')
79
+ self.tweet_id = attributes[:'tweet_id']
80
+ else
81
+ self.tweet_id = nil
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ if @account_id.nil?
91
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
92
+ end
93
+
94
+ if @tweet_id.nil?
95
+ invalid_properties.push('invalid value for "tweet_id", tweet_id cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @account_id.nil?
106
+ return false if @tweet_id.nil?
107
+ true
108
+ end
109
+
110
+ # Custom attribute writer method with validation
111
+ # @param [Object] account_id Value to be assigned
112
+ def account_id=(account_id)
113
+ if account_id.nil?
114
+ fail ArgumentError, 'account_id cannot be nil'
115
+ end
116
+
117
+ @account_id = account_id
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] tweet_id Value to be assigned
122
+ def tweet_id=(tweet_id)
123
+ if tweet_id.nil?
124
+ fail ArgumentError, 'tweet_id cannot be nil'
125
+ end
126
+
127
+ @tweet_id = tweet_id
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ account_id == o.account_id &&
136
+ tweet_id == o.tweet_id
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [account_id, tweet_id].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -0,0 +1,174 @@
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 UndoRetweet200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :tweet_id
21
+
22
+ attr_accessor :retweeted
23
+
24
+ attr_accessor :platform
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'status' => :'status',
30
+ :'tweet_id' => :'tweetId',
31
+ :'retweeted' => :'retweeted',
32
+ :'platform' => :'platform'
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
+ :'status' => :'String',
50
+ :'tweet_id' => :'String',
51
+ :'retweeted' => :'Boolean',
52
+ :'platform' => :'String'
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::UndoRetweet200Response` 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::UndoRetweet200Response`. 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?(:'status')
79
+ self.status = attributes[:'status']
80
+ end
81
+
82
+ if attributes.key?(:'tweet_id')
83
+ self.tweet_id = attributes[:'tweet_id']
84
+ end
85
+
86
+ if attributes.key?(:'retweeted')
87
+ self.retweeted = attributes[:'retweeted']
88
+ end
89
+
90
+ if attributes.key?(:'platform')
91
+ self.platform = attributes[:'platform']
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
+ status == o.status &&
116
+ tweet_id == o.tweet_id &&
117
+ retweeted == o.retweeted &&
118
+ platform == o.platform
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
+ [status, tweet_id, retweeted, platform].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