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 UnfollowUser200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ attr_accessor :target_user_id
21
+
22
+ attr_accessor :following
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
+ :'target_user_id' => :'targetUserId',
31
+ :'following' => :'following',
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
+ :'target_user_id' => :'String',
51
+ :'following' => :'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::UnfollowUser200Response` 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::UnfollowUser200Response`. 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?(:'target_user_id')
83
+ self.target_user_id = attributes[:'target_user_id']
84
+ end
85
+
86
+ if attributes.key?(:'following')
87
+ self.following = attributes[:'following']
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
+ target_user_id == o.target_user_id &&
117
+ following == o.following &&
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, target_user_id, following, 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
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Late
17
17
  class UpdateGoogleBusinessLocationDetailsRequest < ApiModelBase
18
- # Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description')
18
+ # Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description', 'categories', 'serviceItems'). Any valid Google Business Information API updateMask field is supported.
19
19
  attr_accessor :update_mask
20
20
 
21
21
  attr_accessor :regular_hours
@@ -28,6 +28,11 @@ module Late
28
28
 
29
29
  attr_accessor :phone_numbers
30
30
 
31
+ attr_accessor :categories
32
+
33
+ # Services offered by the business. Use updateMask='serviceItems' to update.
34
+ attr_accessor :service_items
35
+
31
36
  # Attribute mapping from ruby-style variable name to JSON key.
32
37
  def self.attribute_map
33
38
  {
@@ -36,7 +41,9 @@ module Late
36
41
  :'special_hours' => :'specialHours',
37
42
  :'profile' => :'profile',
38
43
  :'website_uri' => :'websiteUri',
39
- :'phone_numbers' => :'phoneNumbers'
44
+ :'phone_numbers' => :'phoneNumbers',
45
+ :'categories' => :'categories',
46
+ :'service_items' => :'serviceItems'
40
47
  }
41
48
  end
42
49
 
@@ -58,7 +65,9 @@ module Late
58
65
  :'special_hours' => :'GetGoogleBusinessLocationDetails200ResponseSpecialHours',
59
66
  :'profile' => :'UpdateGoogleBusinessLocationDetailsRequestProfile',
60
67
  :'website_uri' => :'String',
61
- :'phone_numbers' => :'GetGoogleBusinessLocationDetails200ResponsePhoneNumbers'
68
+ :'phone_numbers' => :'GetGoogleBusinessLocationDetails200ResponsePhoneNumbers',
69
+ :'categories' => :'UpdateGoogleBusinessLocationDetailsRequestCategories',
70
+ :'service_items' => :'Array<UpdateGoogleBusinessLocationDetailsRequestServiceItemsInner>'
62
71
  }
63
72
  end
64
73
 
@@ -109,6 +118,16 @@ module Late
109
118
  if attributes.key?(:'phone_numbers')
110
119
  self.phone_numbers = attributes[:'phone_numbers']
111
120
  end
121
+
122
+ if attributes.key?(:'categories')
123
+ self.categories = attributes[:'categories']
124
+ end
125
+
126
+ if attributes.key?(:'service_items')
127
+ if (value = attributes[:'service_items']).is_a?(Array)
128
+ self.service_items = value
129
+ end
130
+ end
112
131
  end
113
132
 
114
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,7 +170,9 @@ module Late
151
170
  special_hours == o.special_hours &&
152
171
  profile == o.profile &&
153
172
  website_uri == o.website_uri &&
154
- phone_numbers == o.phone_numbers
173
+ phone_numbers == o.phone_numbers &&
174
+ categories == o.categories &&
175
+ service_items == o.service_items
155
176
  end
156
177
 
157
178
  # @see the `==` method
@@ -163,7 +184,7 @@ module Late
163
184
  # Calculates hash code according to all attributes.
164
185
  # @return [Integer] Hash code
165
186
  def hash
166
- [update_mask, regular_hours, special_hours, profile, website_uri, phone_numbers].hash
187
+ [update_mask, regular_hours, special_hours, profile, website_uri, phone_numbers, categories, service_items].hash
167
188
  end
168
189
 
169
190
  # Builds the object from hash
@@ -0,0 +1,159 @@
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
+ # Primary and additional business categories. Use updateMask='categories' to update.
18
+ class UpdateGoogleBusinessLocationDetailsRequestCategories < ApiModelBase
19
+ attr_accessor :primary_category
20
+
21
+ attr_accessor :additional_categories
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'primary_category' => :'primaryCategory',
27
+ :'additional_categories' => :'additionalCategories'
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
+ :'primary_category' => :'UpdateGoogleBusinessLocationDetailsRequestCategoriesPrimaryCategory',
45
+ :'additional_categories' => :'Array<UpdateGoogleBusinessLocationDetailsRequestCategoriesAdditionalCategoriesInner>'
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::UpdateGoogleBusinessLocationDetailsRequestCategories` 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::UpdateGoogleBusinessLocationDetailsRequestCategories`. 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?(:'primary_category')
72
+ self.primary_category = attributes[:'primary_category']
73
+ end
74
+
75
+ if attributes.key?(:'additional_categories')
76
+ if (value = attributes[:'additional_categories']).is_a?(Array)
77
+ self.additional_categories = 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
+ primary_category == o.primary_category &&
103
+ additional_categories == o.additional_categories
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
+ [primary_category, additional_categories].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,148 @@
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 UpdateGoogleBusinessLocationDetailsRequestCategoriesAdditionalCategoriesInner < ApiModelBase
18
+ # Category resource name (e.g. 'categories/gcid:dry_cleaner')
19
+ attr_accessor :name
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'name' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateGoogleBusinessLocationDetailsRequestCategoriesAdditionalCategoriesInner` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateGoogleBusinessLocationDetailsRequestCategoriesAdditionalCategoriesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end
@@ -0,0 +1,148 @@
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 UpdateGoogleBusinessLocationDetailsRequestCategoriesPrimaryCategory < ApiModelBase
18
+ # Category resource name (e.g. 'categories/gcid:laundromat'). Use Google's Categories API to look up valid IDs.
19
+ attr_accessor :name
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'name' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateGoogleBusinessLocationDetailsRequestCategoriesPrimaryCategory` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateGoogleBusinessLocationDetailsRequestCategoriesPrimaryCategory`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ name == o.name
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [name].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end