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,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 GetGoogleBusinessLocationDetails200ResponseServiceItemsInner < ApiModelBase
18
+ attr_accessor :structured_service_item
19
+
20
+ attr_accessor :free_form_service_item
21
+
22
+ attr_accessor :price
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'structured_service_item' => :'structuredServiceItem',
28
+ :'free_form_service_item' => :'freeFormServiceItem',
29
+ :'price' => :'price'
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
+ :'structured_service_item' => :'GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerStructuredServiceItem',
47
+ :'free_form_service_item' => :'GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerFreeFormServiceItem',
48
+ :'price' => :'GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerPrice'
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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInner` 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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInner`. 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?(:'structured_service_item')
75
+ self.structured_service_item = attributes[:'structured_service_item']
76
+ end
77
+
78
+ if attributes.key?(:'free_form_service_item')
79
+ self.free_form_service_item = attributes[:'free_form_service_item']
80
+ end
81
+
82
+ if attributes.key?(:'price')
83
+ self.price = attributes[:'price']
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
+ structured_service_item == o.structured_service_item &&
108
+ free_form_service_item == o.free_form_service_item &&
109
+ price == o.price
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
+ [structured_service_item, free_form_service_item, price].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,156 @@
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 GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerFreeFormServiceItem < ApiModelBase
18
+ attr_accessor :category
19
+
20
+ attr_accessor :label
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'category' => :'category',
26
+ :'label' => :'label'
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
+ :'category' => :'String',
44
+ :'label' => :'GbpFreeFormServiceItemLabel'
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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerFreeFormServiceItem` 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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerFreeFormServiceItem`. 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?(:'category')
71
+ self.category = attributes[:'category']
72
+ end
73
+
74
+ if attributes.key?(:'label')
75
+ self.label = attributes[:'label']
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
+ category == o.category &&
100
+ label == o.label
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
+ [category, label].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,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 GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerPrice < ApiModelBase
18
+ attr_accessor :currency_code
19
+
20
+ attr_accessor :units
21
+
22
+ attr_accessor :nanos
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'currency_code' => :'currencyCode',
28
+ :'units' => :'units',
29
+ :'nanos' => :'nanos'
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
+ :'currency_code' => :'String',
47
+ :'units' => :'String',
48
+ :'nanos' => :'Integer'
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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerPrice` 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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerPrice`. 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?(:'currency_code')
75
+ self.currency_code = attributes[:'currency_code']
76
+ end
77
+
78
+ if attributes.key?(:'units')
79
+ self.units = attributes[:'units']
80
+ end
81
+
82
+ if attributes.key?(:'nanos')
83
+ self.nanos = attributes[:'nanos']
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
+ currency_code == o.currency_code &&
108
+ units == o.units &&
109
+ nanos == o.nanos
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
+ [currency_code, units, nanos].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,156 @@
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 GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerStructuredServiceItem < ApiModelBase
18
+ attr_accessor :service_type_id
19
+
20
+ attr_accessor :description
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'service_type_id' => :'serviceTypeId',
26
+ :'description' => :'description'
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
+ :'service_type_id' => :'String',
44
+ :'description' => :'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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerStructuredServiceItem` 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::GetGoogleBusinessLocationDetails200ResponseServiceItemsInnerStructuredServiceItem`. 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?(:'service_type_id')
71
+ self.service_type_id = attributes[:'service_type_id']
72
+ end
73
+
74
+ if attributes.key?(:'description')
75
+ self.description = attributes[:'description']
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
+ service_type_id == o.service_type_id &&
100
+ description == o.description
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
+ [service_type_id, description].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