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 UpdateGoogleBusinessLocationDetailsRequestServiceItemsInner < 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' => :'UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerStructuredServiceItem',
47
+ :'free_form_service_item' => :'UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerFreeFormServiceItem',
48
+ :'price' => :'UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerPrice'
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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInner` 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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInner`. 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,158 @@
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
+ # A custom service not in Google's catalog
18
+ class UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerFreeFormServiceItem < ApiModelBase
19
+ # Category resource name this service belongs to (e.g. 'categories/gcid:laundromat')
20
+ attr_accessor :category
21
+
22
+ attr_accessor :label
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'category' => :'category',
28
+ :'label' => :'label'
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
+ :'category' => :'String',
46
+ :'label' => :'GbpUpdateFreeFormServiceItemLabel'
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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerFreeFormServiceItem` 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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerFreeFormServiceItem`. 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?(:'category')
73
+ self.category = attributes[:'category']
74
+ end
75
+
76
+ if attributes.key?(:'label')
77
+ self.label = attributes[:'label']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ category == o.category &&
102
+ label == o.label
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [category, label].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,169 @@
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
+ # Optional price for the service
18
+ class UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerPrice < ApiModelBase
19
+ # ISO 4217 currency code (e.g. 'USD')
20
+ attr_accessor :currency_code
21
+
22
+ # Whole units of the amount
23
+ attr_accessor :units
24
+
25
+ # Nano units (10^-9) of the amount
26
+ attr_accessor :nanos
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'currency_code' => :'currencyCode',
32
+ :'units' => :'units',
33
+ :'nanos' => :'nanos'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'currency_code' => :'String',
51
+ :'units' => :'String',
52
+ :'nanos' => :'Integer'
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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerPrice` 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::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerPrice`. 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?(:'currency_code')
79
+ self.currency_code = attributes[:'currency_code']
80
+ end
81
+
82
+ if attributes.key?(:'units')
83
+ self.units = attributes[:'units']
84
+ end
85
+
86
+ if attributes.key?(:'nanos')
87
+ self.nanos = attributes[:'nanos']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ currency_code == o.currency_code &&
112
+ units == o.units &&
113
+ nanos == o.nanos
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [currency_code, units, nanos].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Returns the object in the form of hash
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_hash
154
+ hash = {}
155
+ self.class.attribute_map.each_pair do |attr, param|
156
+ value = self.send(attr)
157
+ if value.nil?
158
+ is_nullable = self.class.openapi_nullable.include?(attr)
159
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
160
+ end
161
+
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ end
168
+
169
+ end
@@ -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
+ # A predefined service from Google's service type catalog
18
+ class UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerStructuredServiceItem < ApiModelBase
19
+ # Service type ID from Google's catalog (e.g. 'job_type_id:plumbing_drain_repair')
20
+ attr_accessor :service_type_id
21
+
22
+ # Optional description of the service
23
+ attr_accessor :description
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'service_type_id' => :'serviceTypeId',
29
+ :'description' => :'description'
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
+ :'service_type_id' => :'String',
47
+ :'description' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerStructuredServiceItem` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::UpdateGoogleBusinessLocationDetailsRequestServiceItemsInnerStructuredServiceItem`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'service_type_id')
74
+ self.service_type_id = attributes[:'service_type_id']
75
+ end
76
+
77
+ if attributes.key?(:'description')
78
+ self.description = attributes[:'description']
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
+ service_type_id == o.service_type_id &&
103
+ description == o.description
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
+ [service_type_id, description].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
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.52'
14
+ VERSION = '0.0.53'
15
15
  end