happyco_json 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +201 -0
- data/README.md +20 -12
- data/docs/AssetServiceApi.md +45 -0
- data/docs/ReportServiceApi.md +54 -0
- data/docs/ReportsCreatedEventReportCreated.md +9 -0
- data/docs/V1AddAssetPhotoRequest.md +12 -0
- data/docs/V1AddAssetPhotoResponse.md +8 -0
- data/docs/V1Asset.md +1 -0
- data/docs/V1Date.md +10 -0
- data/docs/V1Inspection.md +1 -0
- data/docs/V1InspectionData.md +1 -1
- data/docs/V1ListInspectionsRequest.md +2 -0
- data/docs/V1ListReportsRequest.md +14 -0
- data/docs/V1ListReportsResponse.md +10 -0
- data/docs/V1RatingGroup.md +12 -0
- data/docs/V1Report.md +22 -0
- data/docs/V1ReportsCreatedEvent.md +9 -0
- data/docs/{V1EventHandlerOptions.md → V1ReportsCreatedEventAckResponse.md} +1 -2
- data/docs/V1Signatory.md +12 -0
- data/docs/V1Template.md +1 -1
- data/git_push.sh +12 -0
- data/happyco_json.gemspec +14 -4
- data/lib/happyco_json/api/account_provisioning_service_api.rb +25 -5
- data/lib/happyco_json/api/account_service_api.rb +25 -5
- data/lib/happyco_json/api/account_users_service_api.rb +37 -9
- data/lib/happyco_json/api/asset_service_api.rb +100 -11
- data/lib/happyco_json/api/folder_service_api.rb +37 -9
- data/lib/happyco_json/api/inspection_service_api.rb +55 -15
- data/lib/happyco_json/api/report_service_api.rb +91 -0
- data/lib/happyco_json/api/template_service_api.rb +43 -11
- data/lib/happyco_json/api_client.rb +20 -17
- data/lib/happyco_json/api_error.rb +18 -8
- data/lib/happyco_json/configuration.rb +13 -1
- data/lib/happyco_json/helpers.rb +7 -4
- data/lib/happyco_json/models/create_accounts_request_account_with_admin.rb +16 -4
- data/lib/happyco_json/models/create_accounts_response_account_id_with_admin_id.rb +16 -4
- data/lib/happyco_json/models/inspection_status_change_status.rb +13 -1
- data/lib/happyco_json/models/inspection_status_changes_event_inspection_status_change.rb +16 -4
- data/lib/happyco_json/models/{v1_event_ack.rb → reports_created_event_report_created.rb} +30 -29
- data/lib/happyco_json/models/update_accounts_request_account_with_admin_id.rb +16 -4
- data/lib/happyco_json/models/v1_account.rb +16 -4
- data/lib/happyco_json/models/v1_add_asset_photo_request.rb +237 -0
- data/lib/happyco_json/models/{v1_inspection_status_changes_event_ack.rb → v1_add_asset_photo_response.rb} +25 -14
- data/lib/happyco_json/models/v1_add_inspection_photo_request.rb +16 -4
- data/lib/happyco_json/models/v1_add_inspection_photo_response.rb +16 -4
- data/lib/happyco_json/models/v1_add_inspection_photos_request.rb +16 -4
- data/lib/happyco_json/models/v1_add_inspection_photos_response.rb +16 -4
- data/lib/happyco_json/models/v1_add_users_request.rb +16 -4
- data/lib/happyco_json/models/v1_add_users_response.rb +16 -4
- data/lib/happyco_json/models/v1_asset.rb +29 -8
- data/lib/happyco_json/models/v1_create_accounts_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_accounts_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_assets_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_assets_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_delegated_inspection_link_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_delegated_inspection_link_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_delegated_inspection_links_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_delegated_inspection_links_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_folders_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_folders_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_inspections_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_inspections_response.rb +16 -4
- data/lib/happyco_json/models/v1_create_templates_request.rb +16 -4
- data/lib/happyco_json/models/v1_create_templates_response.rb +16 -4
- data/lib/happyco_json/models/{v1_inspection_status_changes_event_request.rb → v1_date.rb} +39 -20
- data/lib/happyco_json/models/v1_date_time.rb +16 -4
- data/lib/happyco_json/models/v1_event.rb +16 -4
- data/lib/happyco_json/models/v1_float_array.rb +16 -4
- data/lib/happyco_json/models/v1_folder.rb +16 -4
- data/lib/happyco_json/models/v1_folder_type.rb +13 -1
- data/lib/happyco_json/models/v1_footer_field.rb +16 -4
- data/lib/happyco_json/models/v1_header_field.rb +16 -4
- data/lib/happyco_json/models/v1_inspection.rb +29 -8
- data/lib/happyco_json/models/v1_inspection_data.rb +17 -5
- data/lib/happyco_json/models/v1_inspection_status_changes_event.rb +16 -4
- data/lib/happyco_json/models/v1_inspection_status_changes_event_ack_response.rb +16 -4
- data/lib/happyco_json/models/v1_integration_id.rb +16 -4
- data/lib/happyco_json/models/v1_item.rb +16 -4
- data/lib/happyco_json/models/v1_list_accounts_request.rb +16 -4
- data/lib/happyco_json/models/v1_list_accounts_response.rb +16 -4
- data/lib/happyco_json/models/v1_list_assets_request.rb +16 -4
- data/lib/happyco_json/models/v1_list_assets_response.rb +16 -4
- data/lib/happyco_json/models/v1_list_folders_request.rb +16 -4
- data/lib/happyco_json/models/v1_list_folders_response.rb +16 -4
- data/lib/happyco_json/models/v1_list_inspections_request.rb +38 -8
- data/lib/happyco_json/models/v1_list_inspections_response.rb +16 -4
- data/lib/happyco_json/models/v1_list_reports_request.rb +268 -0
- data/lib/happyco_json/models/v1_list_reports_response.rb +222 -0
- data/lib/happyco_json/models/v1_list_templates_request.rb +16 -4
- data/lib/happyco_json/models/v1_list_templates_response.rb +16 -4
- data/lib/happyco_json/models/v1_list_users_request.rb +16 -4
- data/lib/happyco_json/models/v1_list_users_response.rb +16 -4
- data/lib/happyco_json/models/v1_paging.rb +16 -4
- data/lib/happyco_json/models/v1_paging_response.rb +16 -4
- data/lib/happyco_json/models/v1_photo.rb +16 -4
- data/lib/happyco_json/models/v1_property.rb +16 -4
- data/lib/happyco_json/models/v1_rating_checkbox.rb +16 -4
- data/lib/happyco_json/models/v1_rating_control.rb +17 -5
- data/lib/happyco_json/models/v1_rating_drop_down.rb +16 -4
- data/lib/happyco_json/models/v1_rating_drop_down_option.rb +16 -4
- data/lib/happyco_json/models/v1_rating_group.rb +246 -0
- data/lib/happyco_json/models/v1_rating_groups.rb +1 -0
- data/lib/happyco_json/models/v1_rating_image.rb +13 -1
- data/lib/happyco_json/models/v1_rating_radio_group.rb +16 -4
- data/lib/happyco_json/models/v1_rating_radio_group_option.rb +16 -4
- data/lib/happyco_json/models/v1_rating_values.rb +16 -4
- data/lib/happyco_json/models/v1_report.rb +341 -0
- data/lib/happyco_json/models/v1_reports_created_event.rb +210 -0
- data/lib/happyco_json/models/{v1_event_handler_options.rb → v1_reports_created_event_ack_response.rb} +20 -17
- data/lib/happyco_json/models/v1_scheduled_inspection.rb +16 -4
- data/lib/happyco_json/models/v1_section.rb +16 -4
- data/lib/happyco_json/models/v1_set_assets_archived_request.rb +16 -4
- data/lib/happyco_json/models/v1_set_assets_archived_response.rb +16 -4
- data/lib/happyco_json/models/v1_set_inspections_archived_request.rb +16 -4
- data/lib/happyco_json/models/v1_set_inspections_archived_response.rb +16 -4
- data/lib/happyco_json/models/v1_set_templates_archived_request.rb +16 -4
- data/lib/happyco_json/models/v1_set_templates_archived_response.rb +16 -4
- data/lib/happyco_json/models/v1_signatory.rb +240 -0
- data/lib/happyco_json/models/v1_string_array.rb +16 -4
- data/lib/happyco_json/models/v1_template.rb +17 -5
- data/lib/happyco_json/models/v1_unit.rb +16 -4
- data/lib/happyco_json/models/v1_update_account_statuses_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_account_statuses_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_accounts_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_accounts_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_assets_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_assets_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_folder_statuses_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_folder_statuses_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_folders_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_folders_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_inspections_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_inspections_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_templates_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_templates_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_user_statuses_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_user_statuses_response.rb +16 -4
- data/lib/happyco_json/models/v1_update_users_request.rb +16 -4
- data/lib/happyco_json/models/v1_update_users_response.rb +16 -4
- data/lib/happyco_json/models/v1_user.rb +16 -4
- data/lib/happyco_json/version.rb +14 -2
- data/lib/happyco_json.rb +27 -7
- data/spec/api/account_provisioning_service_api_spec.rb +13 -1
- data/spec/api/account_service_api_spec.rb +13 -1
- data/spec/api/account_users_service_api_spec.rb +13 -1
- data/spec/api/asset_service_api_spec.rb +25 -1
- data/spec/api/folder_service_api_spec.rb +13 -1
- data/spec/api/inspection_service_api_spec.rb +13 -1
- data/spec/api/report_service_api_spec.rb +58 -0
- data/spec/api/template_service_api_spec.rb +13 -1
- data/spec/api_client_spec.rb +13 -1
- data/spec/configuration_spec.rb +13 -1
- data/spec/models/create_accounts_request_account_with_admin_spec.rb +13 -1
- data/spec/models/create_accounts_response_account_id_with_admin_id_spec.rb +13 -1
- data/spec/models/inspection_status_change_status_spec.rb +13 -1
- data/spec/models/inspection_status_changes_event_inspection_status_change_spec.rb +13 -1
- data/spec/models/reports_created_event_report_created_spec.rb +59 -0
- data/spec/models/update_accounts_request_account_with_admin_id_spec.rb +13 -1
- data/spec/models/v1_account_spec.rb +13 -1
- data/spec/models/v1_add_asset_photo_request_spec.rb +77 -0
- data/spec/models/v1_add_asset_photo_response_spec.rb +53 -0
- data/spec/models/v1_add_inspection_photo_request_spec.rb +13 -1
- data/spec/models/v1_add_inspection_photo_response_spec.rb +13 -1
- data/spec/models/v1_add_inspection_photos_request_spec.rb +13 -1
- data/spec/models/v1_add_inspection_photos_response_spec.rb +13 -1
- data/spec/models/v1_add_users_request_spec.rb +13 -1
- data/spec/models/v1_add_users_response_spec.rb +13 -1
- data/spec/models/v1_asset_spec.rb +19 -1
- data/spec/models/v1_create_accounts_request_spec.rb +13 -1
- data/spec/models/v1_create_accounts_response_spec.rb +13 -1
- data/spec/models/v1_create_assets_request_spec.rb +13 -1
- data/spec/models/v1_create_assets_response_spec.rb +13 -1
- data/spec/models/v1_create_delegated_inspection_link_request_spec.rb +13 -1
- data/spec/models/v1_create_delegated_inspection_link_response_spec.rb +13 -1
- data/spec/models/v1_create_delegated_inspection_links_request_spec.rb +13 -1
- data/spec/models/v1_create_delegated_inspection_links_response_spec.rb +13 -1
- data/spec/models/v1_create_folders_request_spec.rb +13 -1
- data/spec/models/v1_create_folders_response_spec.rb +13 -1
- data/spec/models/v1_create_inspections_request_spec.rb +13 -1
- data/spec/models/v1_create_inspections_response_spec.rb +13 -1
- data/spec/models/v1_create_templates_request_spec.rb +13 -1
- data/spec/models/v1_create_templates_response_spec.rb +13 -1
- data/spec/models/v1_date_spec.rb +65 -0
- data/spec/models/v1_date_time_spec.rb +13 -1
- data/spec/models/v1_event_spec.rb +13 -1
- data/spec/models/v1_float_array_spec.rb +13 -1
- data/spec/models/v1_folder_spec.rb +13 -1
- data/spec/models/v1_folder_type_spec.rb +13 -1
- data/spec/models/v1_footer_field_spec.rb +13 -1
- data/spec/models/v1_header_field_spec.rb +13 -1
- data/spec/models/v1_inspection_data_spec.rb +13 -1
- data/spec/models/v1_inspection_spec.rb +19 -1
- data/spec/models/v1_inspection_status_changes_event_ack_response_spec.rb +13 -1
- data/spec/models/v1_inspection_status_changes_event_spec.rb +13 -1
- data/spec/models/v1_integration_id_spec.rb +13 -1
- data/spec/models/v1_item_spec.rb +13 -1
- data/spec/models/v1_list_accounts_request_spec.rb +13 -1
- data/spec/models/v1_list_accounts_response_spec.rb +13 -1
- data/spec/models/v1_list_assets_request_spec.rb +13 -1
- data/spec/models/v1_list_assets_response_spec.rb +13 -1
- data/spec/models/v1_list_folders_request_spec.rb +13 -1
- data/spec/models/v1_list_folders_response_spec.rb +13 -1
- data/spec/models/v1_list_inspections_request_spec.rb +25 -1
- data/spec/models/v1_list_inspections_response_spec.rb +13 -1
- data/spec/models/v1_list_reports_request_spec.rb +89 -0
- data/spec/models/v1_list_reports_response_spec.rb +65 -0
- data/spec/models/v1_list_templates_request_spec.rb +13 -1
- data/spec/models/v1_list_templates_response_spec.rb +13 -1
- data/spec/models/v1_list_users_request_spec.rb +13 -1
- data/spec/models/v1_list_users_response_spec.rb +13 -1
- data/spec/models/v1_paging_response_spec.rb +13 -1
- data/spec/models/v1_paging_spec.rb +13 -1
- data/spec/models/v1_photo_spec.rb +13 -1
- data/spec/models/v1_property_spec.rb +13 -1
- data/spec/models/v1_rating_checkbox_spec.rb +13 -1
- data/spec/models/v1_rating_control_spec.rb +13 -1
- data/spec/models/v1_rating_drop_down_option_spec.rb +13 -1
- data/spec/models/v1_rating_drop_down_spec.rb +13 -1
- data/spec/models/v1_rating_group_spec.rb +77 -0
- data/spec/models/v1_rating_image_spec.rb +13 -1
- data/spec/models/v1_rating_radio_group_option_spec.rb +13 -1
- data/spec/models/v1_rating_radio_group_spec.rb +13 -1
- data/spec/models/v1_rating_values_spec.rb +13 -1
- data/spec/models/v1_report_spec.rb +137 -0
- data/spec/models/v1_reports_created_event_ack_response_spec.rb +47 -0
- data/spec/models/v1_reports_created_event_spec.rb +59 -0
- data/spec/models/v1_scheduled_inspection_spec.rb +13 -1
- data/spec/models/v1_section_spec.rb +13 -1
- data/spec/models/v1_set_assets_archived_request_spec.rb +13 -1
- data/spec/models/v1_set_assets_archived_response_spec.rb +13 -1
- data/spec/models/v1_set_inspections_archived_request_spec.rb +13 -1
- data/spec/models/v1_set_inspections_archived_response_spec.rb +13 -1
- data/spec/models/v1_set_templates_archived_request_spec.rb +13 -1
- data/spec/models/v1_set_templates_archived_response_spec.rb +13 -1
- data/spec/models/v1_signatory_spec.rb +77 -0
- data/spec/models/v1_string_array_spec.rb +13 -1
- data/spec/models/v1_template_spec.rb +13 -1
- data/spec/models/v1_unit_spec.rb +13 -1
- data/spec/models/v1_update_account_statuses_request_spec.rb +13 -1
- data/spec/models/v1_update_account_statuses_response_spec.rb +13 -1
- data/spec/models/v1_update_accounts_request_spec.rb +13 -1
- data/spec/models/v1_update_accounts_response_spec.rb +13 -1
- data/spec/models/v1_update_assets_request_spec.rb +13 -1
- data/spec/models/v1_update_assets_response_spec.rb +13 -1
- data/spec/models/v1_update_folder_statuses_request_spec.rb +13 -1
- data/spec/models/v1_update_folder_statuses_response_spec.rb +13 -1
- data/spec/models/v1_update_folders_request_spec.rb +13 -1
- data/spec/models/v1_update_folders_response_spec.rb +13 -1
- data/spec/models/v1_update_inspections_request_spec.rb +13 -1
- data/spec/models/v1_update_inspections_response_spec.rb +13 -1
- data/spec/models/v1_update_templates_request_spec.rb +13 -1
- data/spec/models/v1_update_templates_response_spec.rb +13 -1
- data/spec/models/v1_update_user_statuses_request_spec.rb +13 -1
- data/spec/models/v1_update_user_statuses_response_spec.rb +13 -1
- data/spec/models/v1_update_users_request_spec.rb +13 -1
- data/spec/models/v1_update_users_response_spec.rb +13 -1
- data/spec/models/v1_user_spec.rb +13 -1
- data/spec/spec_helper.rb +13 -1
- metadata +153 -124
- data/Gemfile +0 -7
- data/Rakefile +0 -8
- data/docs/V1EventAck.md +0 -10
- data/docs/V1InspectionStatusChangesEventAck.md +0 -8
- data/docs/V1InspectionStatusChangesEventRequest.md +0 -9
- data/docs/V1RatingGroups.md +0 -9
- data/lib/happyco_json/models/v1_rating_groups.rb +0 -200
- data/spec/models/v1_event_ack_spec.rb +0 -53
- data/spec/models/v1_event_handler_options_spec.rb +0 -41
- data/spec/models/v1_inspection_status_changes_event_ack_spec.rb +0 -41
- data/spec/models/v1_inspection_status_changes_event_request_spec.rb +0 -47
- data/spec/models/v1_rating_groups_spec.rb +0 -47
@@ -3,10 +3,22 @@
|
|
3
3
|
|
4
4
|
#All happy services merged together
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
10
22
|
=end
|
11
23
|
|
12
24
|
require 'date'
|
@@ -165,7 +177,7 @@ module HappyCo
|
|
165
177
|
def build_from_hash(attributes)
|
166
178
|
return nil unless attributes.is_a?(Hash)
|
167
179
|
self.class.swagger_types.each_pair do |key, type|
|
168
|
-
if type =~
|
180
|
+
if type =~ /^Array<(.*)>/i
|
169
181
|
# check to ensure the input is an array given that the the attribute
|
170
182
|
# is documented as an array but the input is not
|
171
183
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -196,7 +208,7 @@ module HappyCo
|
|
196
208
|
when :Float
|
197
209
|
value.to_f
|
198
210
|
when :BOOLEAN
|
199
|
-
if value.to_s =~
|
211
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
200
212
|
true
|
201
213
|
else
|
202
214
|
false
|
@@ -207,7 +219,7 @@ module HappyCo
|
|
207
219
|
when /\AArray<(?<inner_type>.+)>\z/
|
208
220
|
inner_type = Regexp.last_match[:inner_type]
|
209
221
|
value.map { |v| _deserialize(inner_type, v) }
|
210
|
-
when /\AHash<(?<k_type
|
222
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
211
223
|
k_type = Regexp.last_match[:k_type]
|
212
224
|
v_type = Regexp.last_match[:v_type]
|
213
225
|
{}.tap do |hash|
|
@@ -0,0 +1,237 @@
|
|
1
|
+
=begin
|
2
|
+
#Merged swaggers
|
3
|
+
|
4
|
+
#All happy services merged together
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'date'
|
25
|
+
|
26
|
+
module HappyCo
|
27
|
+
|
28
|
+
class V1AddAssetPhotoRequest
|
29
|
+
attr_accessor :account_id
|
30
|
+
|
31
|
+
attr_accessor :folder_id
|
32
|
+
|
33
|
+
attr_accessor :asset_id
|
34
|
+
|
35
|
+
# * File name must include a valid image extension.
|
36
|
+
attr_accessor :file_name
|
37
|
+
|
38
|
+
# * Data should contain the image data.
|
39
|
+
attr_accessor :data
|
40
|
+
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'account_id' => :'account_id',
|
46
|
+
:'folder_id' => :'folder_id',
|
47
|
+
:'asset_id' => :'asset_id',
|
48
|
+
:'file_name' => :'file_name',
|
49
|
+
:'data' => :'data'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute type mapping.
|
54
|
+
def self.swagger_types
|
55
|
+
{
|
56
|
+
:'account_id' => :'V1IntegrationID',
|
57
|
+
:'folder_id' => :'V1IntegrationID',
|
58
|
+
:'asset_id' => :'V1IntegrationID',
|
59
|
+
:'file_name' => :'String',
|
60
|
+
:'data' => :'String'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
return unless attributes.is_a?(Hash)
|
68
|
+
|
69
|
+
# convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
+
|
72
|
+
if attributes.has_key?(:'account_id')
|
73
|
+
self.account_id = attributes[:'account_id']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'folder_id')
|
77
|
+
self.folder_id = attributes[:'folder_id']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'asset_id')
|
81
|
+
self.asset_id = attributes[:'asset_id']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'file_name')
|
85
|
+
self.file_name = attributes[:'file_name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'data')
|
89
|
+
self.data = attributes[:'data']
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
95
|
+
# @return Array for valid properies with the reasons
|
96
|
+
def list_invalid_properties
|
97
|
+
invalid_properties = Array.new
|
98
|
+
return invalid_properties
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
def valid?
|
104
|
+
return true
|
105
|
+
end
|
106
|
+
|
107
|
+
# Checks equality by comparing each attribute.
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
account_id == o.account_id &&
|
113
|
+
folder_id == o.folder_id &&
|
114
|
+
asset_id == o.asset_id &&
|
115
|
+
file_name == o.file_name &&
|
116
|
+
data == o.data
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculates hash code according to all attributes.
|
126
|
+
# @return [Fixnum] Hash code
|
127
|
+
def hash
|
128
|
+
[account_id, folder_id, asset_id, file_name, data].hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def build_from_hash(attributes)
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
136
|
+
self.class.swagger_types.each_pair do |key, type|
|
137
|
+
if type =~ /^Array<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :DateTime
|
158
|
+
DateTime.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :BOOLEAN
|
168
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
temp_model = HappyCo.const_get(type).new
|
189
|
+
temp_model.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
next if value.nil?
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map{ |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
@@ -3,32 +3,43 @@
|
|
3
3
|
|
4
4
|
#All happy services merged together
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
10
22
|
=end
|
11
23
|
|
12
24
|
require 'date'
|
13
25
|
|
14
26
|
module HappyCo
|
15
|
-
|
16
|
-
class
|
17
|
-
|
18
|
-
attr_accessor :ack
|
27
|
+
|
28
|
+
class V1AddAssetPhotoResponse
|
29
|
+
attr_accessor :photo_id
|
19
30
|
|
20
31
|
|
21
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
33
|
def self.attribute_map
|
23
34
|
{
|
24
|
-
:'
|
35
|
+
:'photo_id' => :'photo_id'
|
25
36
|
}
|
26
37
|
end
|
27
38
|
|
28
39
|
# Attribute type mapping.
|
29
40
|
def self.swagger_types
|
30
41
|
{
|
31
|
-
:'
|
42
|
+
:'photo_id' => :'V1IntegrationID'
|
32
43
|
}
|
33
44
|
end
|
34
45
|
|
@@ -40,8 +51,8 @@ module HappyCo
|
|
40
51
|
# convert string to symbol for hash key
|
41
52
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
53
|
|
43
|
-
if attributes.has_key?(:'
|
44
|
-
self.
|
54
|
+
if attributes.has_key?(:'photo_id')
|
55
|
+
self.photo_id = attributes[:'photo_id']
|
45
56
|
end
|
46
57
|
|
47
58
|
end
|
@@ -64,7 +75,7 @@ module HappyCo
|
|
64
75
|
def ==(o)
|
65
76
|
return true if self.equal?(o)
|
66
77
|
self.class == o.class &&
|
67
|
-
|
78
|
+
photo_id == o.photo_id
|
68
79
|
end
|
69
80
|
|
70
81
|
# @see the `==` method
|
@@ -76,7 +87,7 @@ module HappyCo
|
|
76
87
|
# Calculates hash code according to all attributes.
|
77
88
|
# @return [Fixnum] Hash code
|
78
89
|
def hash
|
79
|
-
[
|
90
|
+
[photo_id].hash
|
80
91
|
end
|
81
92
|
|
82
93
|
# Builds the object from hash
|
@@ -85,7 +96,7 @@ module HappyCo
|
|
85
96
|
def build_from_hash(attributes)
|
86
97
|
return nil unless attributes.is_a?(Hash)
|
87
98
|
self.class.swagger_types.each_pair do |key, type|
|
88
|
-
if type =~
|
99
|
+
if type =~ /^Array<(.*)>/i
|
89
100
|
# check to ensure the input is an array given that the the attribute
|
90
101
|
# is documented as an array but the input is not
|
91
102
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -116,7 +127,7 @@ module HappyCo
|
|
116
127
|
when :Float
|
117
128
|
value.to_f
|
118
129
|
when :BOOLEAN
|
119
|
-
if value.to_s =~
|
130
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
120
131
|
true
|
121
132
|
else
|
122
133
|
false
|
@@ -127,7 +138,7 @@ module HappyCo
|
|
127
138
|
when /\AArray<(?<inner_type>.+)>\z/
|
128
139
|
inner_type = Regexp.last_match[:inner_type]
|
129
140
|
value.map { |v| _deserialize(inner_type, v) }
|
130
|
-
when /\AHash<(?<k_type
|
141
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
131
142
|
k_type = Regexp.last_match[:k_type]
|
132
143
|
v_type = Regexp.last_match[:v_type]
|
133
144
|
{}.tap do |hash|
|
@@ -3,10 +3,22 @@
|
|
3
3
|
|
4
4
|
#All happy services merged together
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
10
22
|
=end
|
11
23
|
|
12
24
|
require 'date'
|
@@ -113,7 +125,7 @@ module HappyCo
|
|
113
125
|
def build_from_hash(attributes)
|
114
126
|
return nil unless attributes.is_a?(Hash)
|
115
127
|
self.class.swagger_types.each_pair do |key, type|
|
116
|
-
if type =~
|
128
|
+
if type =~ /^Array<(.*)>/i
|
117
129
|
# check to ensure the input is an array given that the the attribute
|
118
130
|
# is documented as an array but the input is not
|
119
131
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -144,7 +156,7 @@ module HappyCo
|
|
144
156
|
when :Float
|
145
157
|
value.to_f
|
146
158
|
when :BOOLEAN
|
147
|
-
if value.to_s =~
|
159
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
148
160
|
true
|
149
161
|
else
|
150
162
|
false
|
@@ -155,7 +167,7 @@ module HappyCo
|
|
155
167
|
when /\AArray<(?<inner_type>.+)>\z/
|
156
168
|
inner_type = Regexp.last_match[:inner_type]
|
157
169
|
value.map { |v| _deserialize(inner_type, v) }
|
158
|
-
when /\AHash<(?<k_type
|
170
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
159
171
|
k_type = Regexp.last_match[:k_type]
|
160
172
|
v_type = Regexp.last_match[:v_type]
|
161
173
|
{}.tap do |hash|
|
@@ -3,10 +3,22 @@
|
|
3
3
|
|
4
4
|
#All happy services merged together
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
10
22
|
=end
|
11
23
|
|
12
24
|
require 'date'
|
@@ -94,7 +106,7 @@ module HappyCo
|
|
94
106
|
def build_from_hash(attributes)
|
95
107
|
return nil unless attributes.is_a?(Hash)
|
96
108
|
self.class.swagger_types.each_pair do |key, type|
|
97
|
-
if type =~
|
109
|
+
if type =~ /^Array<(.*)>/i
|
98
110
|
# check to ensure the input is an array given that the the attribute
|
99
111
|
# is documented as an array but the input is not
|
100
112
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -125,7 +137,7 @@ module HappyCo
|
|
125
137
|
when :Float
|
126
138
|
value.to_f
|
127
139
|
when :BOOLEAN
|
128
|
-
if value.to_s =~
|
140
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
129
141
|
true
|
130
142
|
else
|
131
143
|
false
|
@@ -136,7 +148,7 @@ module HappyCo
|
|
136
148
|
when /\AArray<(?<inner_type>.+)>\z/
|
137
149
|
inner_type = Regexp.last_match[:inner_type]
|
138
150
|
value.map { |v| _deserialize(inner_type, v) }
|
139
|
-
when /\AHash<(?<k_type
|
151
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
140
152
|
k_type = Regexp.last_match[:k_type]
|
141
153
|
v_type = Regexp.last_match[:v_type]
|
142
154
|
{}.tap do |hash|
|