zernio-sdk 0.0.521 → 0.0.523
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.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/docs/AnalyticsApi.md +2 -2
- data/docs/ConnectApi.md +4 -4
- data/docs/CreateStandaloneAdRequestPromotedObject.md +1 -1
- data/docs/FoodMenuItemOptionsInner.md +2 -2
- data/docs/GMBAttributesApi.md +1 -1
- data/docs/GMBMediaApi.md +1 -1
- data/docs/SelectLinkedInOrganizationRequest.md +1 -1
- data/docs/SelectLinkedInOrganizationRequestSelectedOrganization.md +26 -0
- data/docs/UpdateGmbLocationRequest.md +3 -1
- data/docs/UpdateGoogleBusinessAttributesRequestAttributesInner.md +6 -2
- data/docs/UpdateGoogleBusinessAttributesRequestAttributesInnerUriValuesInner.md +18 -0
- data/docs/UpdateGoogleBusinessServicesRequestServiceItemsInner.md +3 -3
- data/docs/UpdateGoogleBusinessServicesRequestServiceItemsInnerFreeFormServiceItem.md +20 -0
- data/docs/UpdateGoogleBusinessServicesRequestServiceItemsInnerFreeFormServiceItemLabel.md +22 -0
- data/docs/UpdateGoogleBusinessServicesRequestServiceItemsInnerPrice.md +22 -0
- data/docs/UpdateGoogleBusinessServicesRequestServiceItemsInnerStructuredServiceItem.md +20 -0
- data/docs/UpdateLinkedInOrganization200Response.md +22 -0
- data/lib/zernio-sdk/api/analytics_api.rb +11 -2
- data/lib/zernio-sdk/api/connect_api.rb +7 -3
- data/lib/zernio-sdk/api/gmb_media_api.rb +6 -2
- data/lib/zernio-sdk/api/gmb_place_actions_api.rb +4 -4
- data/lib/zernio-sdk/api/gmb_verifications_api.rb +8 -0
- data/lib/zernio-sdk/models/batch_get_google_business_reviews_request.rb +37 -0
- data/lib/zernio-sdk/models/create_google_business_media_request.rb +21 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +1 -1
- data/lib/zernio-sdk/models/food_menu.rb +9 -0
- data/lib/zernio-sdk/models/food_menu_item.rb +9 -0
- data/lib/zernio-sdk/models/food_menu_item_attributes.rb +53 -0
- data/lib/zernio-sdk/models/food_menu_item_options_inner.rb +43 -0
- data/lib/zernio-sdk/models/food_menu_section.rb +9 -0
- data/lib/zernio-sdk/models/get_telegram_commands200_response_data_inner.rb +67 -0
- data/lib/zernio-sdk/models/reply_to_google_business_review_request.rb +9 -0
- data/lib/zernio-sdk/models/select_linked_in_organization_request.rb +1 -1
- data/lib/zernio-sdk/models/select_linked_in_organization_request_selected_organization.rb +263 -0
- data/lib/zernio-sdk/models/set_instagram_ice_breakers_request.rb +9 -0
- data/lib/zernio-sdk/models/set_instagram_ice_breakers_request_ice_breakers_inner.rb +18 -0
- data/lib/zernio-sdk/models/set_reddit_post_flair_request.rb +27 -0
- data/lib/zernio-sdk/models/set_telegram_commands_request.rb +9 -0
- data/lib/zernio-sdk/models/set_telegram_commands_request_commands_inner.rb +47 -0
- data/lib/zernio-sdk/models/update_gmb_location_request.rb +61 -4
- data/lib/zernio-sdk/models/update_google_business_attributes_request.rb +9 -0
- data/lib/zernio-sdk/models/update_google_business_attributes_request_attributes_inner.rb +84 -4
- data/lib/zernio-sdk/models/update_google_business_attributes_request_attributes_inner_uri_values_inner.rb +164 -0
- data/lib/zernio-sdk/models/update_google_business_place_action_request.rb +0 -22
- data/lib/zernio-sdk/models/update_google_business_services_request_service_items_inner.rb +3 -3
- data/lib/zernio-sdk/models/update_google_business_services_request_service_items_inner_free_form_service_item.rb +199 -0
- data/lib/zernio-sdk/models/update_google_business_services_request_service_items_inner_free_form_service_item_label.rb +191 -0
- data/lib/zernio-sdk/models/update_google_business_services_request_service_items_inner_price.rb +203 -0
- data/lib/zernio-sdk/models/update_google_business_services_request_service_items_inner_structured_service_item.rb +182 -0
- data/lib/zernio-sdk/models/{get_linked_in_post_reactions400_response.rb → update_linked_in_organization200_response.rb} +33 -24
- data/lib/zernio-sdk/models/update_reddit_subreddits_request.rb +9 -0
- data/lib/zernio-sdk/models/update_youtube_default_playlist_request.rb +9 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +7 -1
- data/openapi.yaml +112 -60
- data/spec/api/analytics_api_spec.rb +1 -1
- data/spec/api/connect_api_spec.rb +1 -1
- data/spec/api/gmb_media_api_spec.rb +1 -1
- data/spec/models/create_google_business_media_request_spec.rb +1 -1
- data/spec/models/food_menu_item_attributes_spec.rb +4 -0
- data/spec/models/select_linked_in_organization_request_selected_organization_spec.rb +60 -0
- data/spec/models/update_gmb_location_request_spec.rb +6 -0
- data/spec/models/update_google_business_attributes_request_attributes_inner_spec.rb +16 -0
- data/spec/models/update_google_business_attributes_request_attributes_inner_uri_values_inner_spec.rb +36 -0
- data/spec/models/update_google_business_services_request_service_items_inner_free_form_service_item_label_spec.rb +48 -0
- data/spec/models/update_google_business_services_request_service_items_inner_free_form_service_item_spec.rb +42 -0
- data/spec/models/update_google_business_services_request_service_items_inner_price_spec.rb +48 -0
- data/spec/models/update_google_business_services_request_service_items_inner_structured_service_item_spec.rb +42 -0
- data/spec/models/{get_linked_in_post_reactions400_response_spec.rb → update_linked_in_organization200_response_spec.rb} +16 -10
- metadata +30 -6
- data/docs/GetLinkedInPostReactions400Response.md +0 -20
|
@@ -130,6 +130,10 @@ module Zernio
|
|
|
130
130
|
invalid_properties.push('invalid value for "source_url", source_url cannot be nil.')
|
|
131
131
|
end
|
|
132
132
|
|
|
133
|
+
if !@description.nil? && @description.to_s.length < 1
|
|
134
|
+
invalid_properties.push('invalid value for "description", the character length must be greater than or equal to 1.')
|
|
135
|
+
end
|
|
136
|
+
|
|
133
137
|
invalid_properties
|
|
134
138
|
end
|
|
135
139
|
|
|
@@ -140,7 +144,8 @@ module Zernio
|
|
|
140
144
|
return false if @source_url.nil?
|
|
141
145
|
media_format_validator = EnumAttributeValidator.new('String', ["PHOTO", "VIDEO"])
|
|
142
146
|
return false unless media_format_validator.valid?(@media_format)
|
|
143
|
-
|
|
147
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
|
148
|
+
category_validator = EnumAttributeValidator.new('String', ["CATEGORY_UNSPECIFIED", "COVER", "PROFILE", "LOGO", "EXTERIOR", "INTERIOR", "PRODUCT", "FOOD_AND_DRINK", "MENU", "COMMON_AREA", "ROOMS", "TEAMS", "AT_WORK", "ADDITIONAL"])
|
|
144
149
|
return false unless category_validator.valid?(@category)
|
|
145
150
|
true
|
|
146
151
|
end
|
|
@@ -165,10 +170,24 @@ module Zernio
|
|
|
165
170
|
@media_format = media_format
|
|
166
171
|
end
|
|
167
172
|
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] description Value to be assigned
|
|
175
|
+
def description=(description)
|
|
176
|
+
if description.nil?
|
|
177
|
+
fail ArgumentError, 'description cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if description.to_s.length < 1
|
|
181
|
+
fail ArgumentError, 'invalid value for "description", the character length must be greater than or equal to 1.'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@description = description
|
|
185
|
+
end
|
|
186
|
+
|
|
168
187
|
# Custom attribute writer method checking allowed values (enum).
|
|
169
188
|
# @param [Object] category Object to be assigned
|
|
170
189
|
def category=(category)
|
|
171
|
-
validator = EnumAttributeValidator.new('String', ["COVER", "PROFILE", "LOGO", "EXTERIOR", "INTERIOR", "FOOD_AND_DRINK", "MENU", "
|
|
190
|
+
validator = EnumAttributeValidator.new('String', ["CATEGORY_UNSPECIFIED", "COVER", "PROFILE", "LOGO", "EXTERIOR", "INTERIOR", "PRODUCT", "FOOD_AND_DRINK", "MENU", "COMMON_AREA", "ROOMS", "TEAMS", "AT_WORK", "ADDITIONAL"])
|
|
172
191
|
unless validator.valid?(category)
|
|
173
192
|
fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
|
|
174
193
|
end
|
|
@@ -19,7 +19,7 @@ module Zernio
|
|
|
19
19
|
# Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`. **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
20
20
|
attr_accessor :pixel_id
|
|
21
21
|
|
|
22
|
-
# The event the campaign/ad group optimises against. **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`. **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary and not PascalCase)
|
|
22
|
+
# The event the campaign/ad group optimises against. **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`. **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary and not PascalCase), OR the exact event name shown in TikTok Events Manager (auto-resolved to its code). Must be one of the event types your TikTok Pixel tracks; custom events are not optimizable. Current taxonomy: `SHOPPING` (Purchase), `ON_WEB_CART` (Add to Cart), `INITIATE_ORDER` (Initiate Checkout), `FORM` (Lead), `ON_WEB_REGISTER` (Complete Registration), `ON_WEB_DETAIL` (View Content). `ON_WEB_ORDER` is deprecated. On rejection the error lists the event types your pixel actually tracks. Optional for `goal: conversions`.
|
|
23
23
|
attr_accessor :custom_event_type
|
|
24
24
|
|
|
25
25
|
# Facebook Page ID. Used by `goal: lead_generation`. Auto-filled from the connected Page when omitted.
|
|
@@ -111,6 +111,10 @@ module Zernio
|
|
|
111
111
|
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
if @labels.length < 1
|
|
115
|
+
invalid_properties.push('invalid value for "labels", number of items must be greater than or equal to 1.')
|
|
116
|
+
end
|
|
117
|
+
|
|
114
118
|
invalid_properties
|
|
115
119
|
end
|
|
116
120
|
|
|
@@ -119,6 +123,7 @@ module Zernio
|
|
|
119
123
|
def valid?
|
|
120
124
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
121
125
|
return false if @labels.nil?
|
|
126
|
+
return false if @labels.length < 1
|
|
122
127
|
true
|
|
123
128
|
end
|
|
124
129
|
|
|
@@ -129,6 +134,10 @@ module Zernio
|
|
|
129
134
|
fail ArgumentError, 'labels cannot be nil'
|
|
130
135
|
end
|
|
131
136
|
|
|
137
|
+
if labels.length < 1
|
|
138
|
+
fail ArgumentError, 'invalid value for "labels", number of items must be greater than or equal to 1.'
|
|
139
|
+
end
|
|
140
|
+
|
|
132
141
|
@labels = labels
|
|
133
142
|
end
|
|
134
143
|
|
|
@@ -100,6 +100,10 @@ module Zernio
|
|
|
100
100
|
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
+
if @labels.length < 1
|
|
104
|
+
invalid_properties.push('invalid value for "labels", number of items must be greater than or equal to 1.')
|
|
105
|
+
end
|
|
106
|
+
|
|
103
107
|
invalid_properties
|
|
104
108
|
end
|
|
105
109
|
|
|
@@ -108,6 +112,7 @@ module Zernio
|
|
|
108
112
|
def valid?
|
|
109
113
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
110
114
|
return false if @labels.nil?
|
|
115
|
+
return false if @labels.length < 1
|
|
111
116
|
true
|
|
112
117
|
end
|
|
113
118
|
|
|
@@ -118,6 +123,10 @@ module Zernio
|
|
|
118
123
|
fail ArgumentError, 'labels cannot be nil'
|
|
119
124
|
end
|
|
120
125
|
|
|
126
|
+
if labels.length < 1
|
|
127
|
+
fail ArgumentError, 'invalid value for "labels", number of items must be greater than or equal to 1.'
|
|
128
|
+
end
|
|
129
|
+
|
|
121
130
|
@labels = labels
|
|
122
131
|
end
|
|
123
132
|
|
|
@@ -35,6 +35,28 @@ module Zernio
|
|
|
35
35
|
# Media references for item photos
|
|
36
36
|
attr_accessor :media_keys
|
|
37
37
|
|
|
38
|
+
class EnumAttributeValidator
|
|
39
|
+
attr_reader :datatype
|
|
40
|
+
attr_reader :allowable_values
|
|
41
|
+
|
|
42
|
+
def initialize(datatype, allowable_values)
|
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
|
44
|
+
case datatype.to_s
|
|
45
|
+
when /Integer/i
|
|
46
|
+
value.to_i
|
|
47
|
+
when /Float/i
|
|
48
|
+
value.to_f
|
|
49
|
+
else
|
|
50
|
+
value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def valid?(value)
|
|
56
|
+
!value || allowable_values.include?(value)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
38
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
61
|
def self.attribute_map
|
|
40
62
|
{
|
|
@@ -135,6 +157,10 @@ module Zernio
|
|
|
135
157
|
def list_invalid_properties
|
|
136
158
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
137
159
|
invalid_properties = Array.new
|
|
160
|
+
if !@serves_num_people.nil? && @serves_num_people < 1
|
|
161
|
+
invalid_properties.push('invalid value for "serves_num_people", must be greater than or equal to 1.')
|
|
162
|
+
end
|
|
163
|
+
|
|
138
164
|
invalid_properties
|
|
139
165
|
end
|
|
140
166
|
|
|
@@ -142,9 +168,36 @@ module Zernio
|
|
|
142
168
|
# @return true if the model is valid
|
|
143
169
|
def valid?
|
|
144
170
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
171
|
+
spiciness_validator = EnumAttributeValidator.new('String', ["SPICINESS_UNSPECIFIED", "MILD", "MEDIUM", "HOT"])
|
|
172
|
+
return false unless spiciness_validator.valid?(@spiciness)
|
|
173
|
+
return false if !@serves_num_people.nil? && @serves_num_people < 1
|
|
145
174
|
true
|
|
146
175
|
end
|
|
147
176
|
|
|
177
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
178
|
+
# @param [Object] spiciness Object to be assigned
|
|
179
|
+
def spiciness=(spiciness)
|
|
180
|
+
validator = EnumAttributeValidator.new('String', ["SPICINESS_UNSPECIFIED", "MILD", "MEDIUM", "HOT"])
|
|
181
|
+
unless validator.valid?(spiciness)
|
|
182
|
+
fail ArgumentError, "invalid value for \"spiciness\", must be one of #{validator.allowable_values}."
|
|
183
|
+
end
|
|
184
|
+
@spiciness = spiciness
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Custom attribute writer method with validation
|
|
188
|
+
# @param [Object] serves_num_people Value to be assigned
|
|
189
|
+
def serves_num_people=(serves_num_people)
|
|
190
|
+
if serves_num_people.nil?
|
|
191
|
+
fail ArgumentError, 'serves_num_people cannot be nil'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if serves_num_people < 1
|
|
195
|
+
fail ArgumentError, 'invalid value for "serves_num_people", must be greater than or equal to 1.'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
@serves_num_people = serves_num_people
|
|
199
|
+
end
|
|
200
|
+
|
|
148
201
|
# Checks equality by comparing each attribute.
|
|
149
202
|
# @param [Object] Object to be compared
|
|
150
203
|
def ==(o)
|
|
@@ -71,10 +71,14 @@ module Zernio
|
|
|
71
71
|
if (value = attributes[:'labels']).is_a?(Array)
|
|
72
72
|
self.labels = value
|
|
73
73
|
end
|
|
74
|
+
else
|
|
75
|
+
self.labels = nil
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
if attributes.key?(:'attributes')
|
|
77
79
|
self.attributes = attributes[:'attributes']
|
|
80
|
+
else
|
|
81
|
+
self.attributes = nil
|
|
78
82
|
end
|
|
79
83
|
end
|
|
80
84
|
|
|
@@ -83,6 +87,18 @@ module Zernio
|
|
|
83
87
|
def list_invalid_properties
|
|
84
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
89
|
invalid_properties = Array.new
|
|
90
|
+
if @labels.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @labels.length < 1
|
|
95
|
+
invalid_properties.push('invalid value for "labels", number of items must be greater than or equal to 1.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if @attributes.nil?
|
|
99
|
+
invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
|
|
100
|
+
end
|
|
101
|
+
|
|
86
102
|
invalid_properties
|
|
87
103
|
end
|
|
88
104
|
|
|
@@ -90,9 +106,36 @@ module Zernio
|
|
|
90
106
|
# @return true if the model is valid
|
|
91
107
|
def valid?
|
|
92
108
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
109
|
+
return false if @labels.nil?
|
|
110
|
+
return false if @labels.length < 1
|
|
111
|
+
return false if @attributes.nil?
|
|
93
112
|
true
|
|
94
113
|
end
|
|
95
114
|
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] labels Value to be assigned
|
|
117
|
+
def labels=(labels)
|
|
118
|
+
if labels.nil?
|
|
119
|
+
fail ArgumentError, 'labels cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if labels.length < 1
|
|
123
|
+
fail ArgumentError, 'invalid value for "labels", number of items must be greater than or equal to 1.'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@labels = labels
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Custom attribute writer method with validation
|
|
130
|
+
# @param [Object] attributes Value to be assigned
|
|
131
|
+
def attributes=(attributes)
|
|
132
|
+
if attributes.nil?
|
|
133
|
+
fail ArgumentError, 'attributes cannot be nil'
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
@attributes = attributes
|
|
137
|
+
end
|
|
138
|
+
|
|
96
139
|
# Checks equality by comparing each attribute.
|
|
97
140
|
# @param [Object] Object to be compared
|
|
98
141
|
def ==(o)
|
|
@@ -91,6 +91,10 @@ module Zernio
|
|
|
91
91
|
invalid_properties.push('invalid value for "labels", labels cannot be nil.')
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
+
if @labels.length < 1
|
|
95
|
+
invalid_properties.push('invalid value for "labels", number of items must be greater than or equal to 1.')
|
|
96
|
+
end
|
|
97
|
+
|
|
94
98
|
invalid_properties
|
|
95
99
|
end
|
|
96
100
|
|
|
@@ -99,6 +103,7 @@ module Zernio
|
|
|
99
103
|
def valid?
|
|
100
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
105
|
return false if @labels.nil?
|
|
106
|
+
return false if @labels.length < 1
|
|
102
107
|
true
|
|
103
108
|
end
|
|
104
109
|
|
|
@@ -109,6 +114,10 @@ module Zernio
|
|
|
109
114
|
fail ArgumentError, 'labels cannot be nil'
|
|
110
115
|
end
|
|
111
116
|
|
|
117
|
+
if labels.length < 1
|
|
118
|
+
fail ArgumentError, 'invalid value for "labels", number of items must be greater than or equal to 1.'
|
|
119
|
+
end
|
|
120
|
+
|
|
112
121
|
@labels = labels
|
|
113
122
|
end
|
|
114
123
|
|
|
@@ -81,6 +81,27 @@ module Zernio
|
|
|
81
81
|
def list_invalid_properties
|
|
82
82
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
83
|
invalid_properties = Array.new
|
|
84
|
+
if !@command.nil? && @command.to_s.length > 32
|
|
85
|
+
invalid_properties.push('invalid value for "command", the character length must be smaller than or equal to 32.')
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if !@command.nil? && @command.to_s.length < 1
|
|
89
|
+
invalid_properties.push('invalid value for "command", the character length must be greater than or equal to 1.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
93
|
+
if !@command.nil? && @command !~ pattern
|
|
94
|
+
invalid_properties.push("invalid value for \"command\", must conform to the pattern #{pattern}.")
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if !@description.nil? && @description.to_s.length > 256
|
|
98
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 256.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if !@description.nil? && @description.to_s.length < 1
|
|
102
|
+
invalid_properties.push('invalid value for "description", the character length must be greater than or equal to 1.')
|
|
103
|
+
end
|
|
104
|
+
|
|
84
105
|
invalid_properties
|
|
85
106
|
end
|
|
86
107
|
|
|
@@ -88,9 +109,55 @@ module Zernio
|
|
|
88
109
|
# @return true if the model is valid
|
|
89
110
|
def valid?
|
|
90
111
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
|
+
return false if !@command.nil? && @command.to_s.length > 32
|
|
113
|
+
return false if !@command.nil? && @command.to_s.length < 1
|
|
114
|
+
return false if !@command.nil? && @command !~ Regexp.new(/^[a-z0-9_]+$/)
|
|
115
|
+
return false if !@description.nil? && @description.to_s.length > 256
|
|
116
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
|
91
117
|
true
|
|
92
118
|
end
|
|
93
119
|
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] command Value to be assigned
|
|
122
|
+
def command=(command)
|
|
123
|
+
if command.nil?
|
|
124
|
+
fail ArgumentError, 'command cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if command.to_s.length > 32
|
|
128
|
+
fail ArgumentError, 'invalid value for "command", the character length must be smaller than or equal to 32.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if command.to_s.length < 1
|
|
132
|
+
fail ArgumentError, 'invalid value for "command", the character length must be greater than or equal to 1.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
pattern = Regexp.new(/^[a-z0-9_]+$/)
|
|
136
|
+
if command !~ pattern
|
|
137
|
+
fail ArgumentError, "invalid value for \"command\", must conform to the pattern #{pattern}."
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
@command = command
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Custom attribute writer method with validation
|
|
144
|
+
# @param [Object] description Value to be assigned
|
|
145
|
+
def description=(description)
|
|
146
|
+
if description.nil?
|
|
147
|
+
fail ArgumentError, 'description cannot be nil'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if description.to_s.length > 256
|
|
151
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 256.'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if description.to_s.length < 1
|
|
155
|
+
fail ArgumentError, 'invalid value for "description", the character length must be greater than or equal to 1.'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@description = description
|
|
159
|
+
end
|
|
160
|
+
|
|
94
161
|
# Checks equality by comparing each attribute.
|
|
95
162
|
# @param [Object] Object to be compared
|
|
96
163
|
def ==(o)
|
|
@@ -80,6 +80,10 @@ module Zernio
|
|
|
80
80
|
invalid_properties.push('invalid value for "comment", comment cannot be nil.')
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
+
if @comment.to_s.length < 1
|
|
84
|
+
invalid_properties.push('invalid value for "comment", the character length must be greater than or equal to 1.')
|
|
85
|
+
end
|
|
86
|
+
|
|
83
87
|
invalid_properties
|
|
84
88
|
end
|
|
85
89
|
|
|
@@ -88,6 +92,7 @@ module Zernio
|
|
|
88
92
|
def valid?
|
|
89
93
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
94
|
return false if @comment.nil?
|
|
95
|
+
return false if @comment.to_s.length < 1
|
|
91
96
|
true
|
|
92
97
|
end
|
|
93
98
|
|
|
@@ -98,6 +103,10 @@ module Zernio
|
|
|
98
103
|
fail ArgumentError, 'comment cannot be nil'
|
|
99
104
|
end
|
|
100
105
|
|
|
106
|
+
if comment.to_s.length < 1
|
|
107
|
+
fail ArgumentError, 'invalid value for "comment", the character length must be greater than or equal to 1.'
|
|
108
|
+
end
|
|
109
|
+
|
|
101
110
|
@comment = comment
|
|
102
111
|
end
|
|
103
112
|
|
|
@@ -78,7 +78,7 @@ module Zernio
|
|
|
78
78
|
:'temp_token' => :'String',
|
|
79
79
|
:'user_profile' => :'Object',
|
|
80
80
|
:'account_type' => :'String',
|
|
81
|
-
:'selected_organization' => :'
|
|
81
|
+
:'selected_organization' => :'SelectLinkedInOrganizationRequestSelectedOrganization',
|
|
82
82
|
:'redirect_url' => :'String'
|
|
83
83
|
}
|
|
84
84
|
end
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
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 Zernio
|
|
17
|
+
class SelectLinkedInOrganizationRequestSelectedOrganization < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :urn
|
|
21
|
+
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
attr_accessor :logo_url
|
|
25
|
+
|
|
26
|
+
attr_accessor :vanity_name
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'id' => :'id',
|
|
32
|
+
:'urn' => :'urn',
|
|
33
|
+
:'name' => :'name',
|
|
34
|
+
:'logo_url' => :'logoUrl',
|
|
35
|
+
:'vanity_name' => :'vanityName'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'id' => :'String',
|
|
53
|
+
:'urn' => :'String',
|
|
54
|
+
:'name' => :'String',
|
|
55
|
+
:'logo_url' => :'String',
|
|
56
|
+
:'vanity_name' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SelectLinkedInOrganizationRequestSelectedOrganization` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SelectLinkedInOrganizationRequestSelectedOrganization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
84
|
+
else
|
|
85
|
+
self.id = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'urn')
|
|
89
|
+
self.urn = attributes[:'urn']
|
|
90
|
+
else
|
|
91
|
+
self.urn = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'name')
|
|
95
|
+
self.name = attributes[:'name']
|
|
96
|
+
else
|
|
97
|
+
self.name = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'logo_url')
|
|
101
|
+
self.logo_url = attributes[:'logo_url']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'vanity_name')
|
|
105
|
+
self.vanity_name = attributes[:'vanity_name']
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
110
|
+
# @return Array for valid properties with the reasons
|
|
111
|
+
def list_invalid_properties
|
|
112
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
113
|
+
invalid_properties = Array.new
|
|
114
|
+
if @id.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @id.to_s.length < 1
|
|
119
|
+
invalid_properties.push('invalid value for "id", the character length must be greater than or equal to 1.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @urn.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "urn", urn cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
pattern = Regexp.new(/^urn:li:organization:/)
|
|
127
|
+
if @urn !~ pattern
|
|
128
|
+
invalid_properties.push("invalid value for \"urn\", must conform to the pattern #{pattern}.")
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @name.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @name.to_s.length < 1
|
|
136
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
invalid_properties
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Check to see if the all the properties in the model are valid
|
|
143
|
+
# @return true if the model is valid
|
|
144
|
+
def valid?
|
|
145
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
146
|
+
return false if @id.nil?
|
|
147
|
+
return false if @id.to_s.length < 1
|
|
148
|
+
return false if @urn.nil?
|
|
149
|
+
return false if @urn !~ Regexp.new(/^urn:li:organization:/)
|
|
150
|
+
return false if @name.nil?
|
|
151
|
+
return false if @name.to_s.length < 1
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] id Value to be assigned
|
|
157
|
+
def id=(id)
|
|
158
|
+
if id.nil?
|
|
159
|
+
fail ArgumentError, 'id cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if id.to_s.length < 1
|
|
163
|
+
fail ArgumentError, 'invalid value for "id", the character length must be greater than or equal to 1.'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@id = id
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] urn Value to be assigned
|
|
171
|
+
def urn=(urn)
|
|
172
|
+
if urn.nil?
|
|
173
|
+
fail ArgumentError, 'urn cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
pattern = Regexp.new(/^urn:li:organization:/)
|
|
177
|
+
if urn !~ pattern
|
|
178
|
+
fail ArgumentError, "invalid value for \"urn\", must conform to the pattern #{pattern}."
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
@urn = urn
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Custom attribute writer method with validation
|
|
185
|
+
# @param [Object] name Value to be assigned
|
|
186
|
+
def name=(name)
|
|
187
|
+
if name.nil?
|
|
188
|
+
fail ArgumentError, 'name cannot be nil'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if name.to_s.length < 1
|
|
192
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@name = name
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Checks equality by comparing each attribute.
|
|
199
|
+
# @param [Object] Object to be compared
|
|
200
|
+
def ==(o)
|
|
201
|
+
return true if self.equal?(o)
|
|
202
|
+
self.class == o.class &&
|
|
203
|
+
id == o.id &&
|
|
204
|
+
urn == o.urn &&
|
|
205
|
+
name == o.name &&
|
|
206
|
+
logo_url == o.logo_url &&
|
|
207
|
+
vanity_name == o.vanity_name
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# @see the `==` method
|
|
211
|
+
# @param [Object] Object to be compared
|
|
212
|
+
def eql?(o)
|
|
213
|
+
self == o
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Calculates hash code according to all attributes.
|
|
217
|
+
# @return [Integer] Hash code
|
|
218
|
+
def hash
|
|
219
|
+
[id, urn, name, logo_url, vanity_name].hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Builds the object from hash
|
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
224
|
+
# @return [Object] Returns the model itself
|
|
225
|
+
def self.build_from_hash(attributes)
|
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
|
227
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
228
|
+
transformed_hash = {}
|
|
229
|
+
openapi_types.each_pair do |key, type|
|
|
230
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = nil
|
|
232
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
233
|
+
# check to ensure the input is an array given that the attribute
|
|
234
|
+
# is documented as an array but the input is not
|
|
235
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
236
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
237
|
+
end
|
|
238
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
new(transformed_hash)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Returns the object in the form of hash
|
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
|
247
|
+
def to_hash
|
|
248
|
+
hash = {}
|
|
249
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
250
|
+
value = self.send(attr)
|
|
251
|
+
if value.nil?
|
|
252
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
253
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
hash[param] = _to_hash(value)
|
|
257
|
+
end
|
|
258
|
+
hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
end
|