diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php index e10f6465..218c8bbd 100755 --- a/application/models/Providers_model.php +++ b/application/models/Providers_model.php @@ -748,6 +748,7 @@ class Providers_model extends EA_Model 'state' => $provider['state'], 'zip' => $provider['zip_code'], 'notes' => $provider['notes'], + 'is_private' => $provider['is_private'], 'timezone' => $provider['timezone'], ]; @@ -864,6 +865,10 @@ class Providers_model extends EA_Model $decoded_resource['services'] = $provider['services']; } + if (array_key_exists('isPrivate', $provider)) { + $decoded_resource['is_private'] = (bool) $provider['isPrivate']; + } + if (array_key_exists('settings', $provider)) { if (empty($decoded_resource['settings'])) { $decoded_resource['settings'] = []; diff --git a/application/models/Services_model.php b/application/models/Services_model.php index f117f83b..e8191cf1 100644 --- a/application/models/Services_model.php +++ b/application/models/Services_model.php @@ -417,6 +417,7 @@ class Services_model extends EA_Model 'location' => $service['location'], 'availabilitiesType' => $service['availabilities_type'], 'attendantsNumber' => (int) $service['attendants_number'], + 'isPrivate' => (bool) $service['is_private'], 'serviceCategoryId' => $service['id_service_categories'] !== null ? (int) $service['id_service_categories'] : null, ]; @@ -474,6 +475,10 @@ class Services_model extends EA_Model $decoded_resource['id_service_categories'] = $service['serviceCategoryId']; } + if (array_key_exists('isPrivate', $service)) { + $decoded_resource['is_private'] = (bool) $service['isPrivate']; + } + $service = $decoded_resource; } } diff --git a/openapi.yml b/openapi.yml index 32c056a8..09d74468 100644 --- a/openapi.yml +++ b/openapi.yml @@ -2024,6 +2024,8 @@ components: type: string attendantsNumber: type: integer + isPrivate: + type: boolean categoryId: type: integer example: @@ -2036,6 +2038,7 @@ components: description: This is a test service. availabilitiesType: flexible attendantsNumber: 1 + isPrivate: false serviceCategoryId: null ServicePayload: type: object @@ -2056,6 +2059,8 @@ components: type: string attendantsNumber: type: integer + isPrivate: + type: boolean serviceCategoryId: type: integer example: @@ -2067,6 +2072,7 @@ components: description: This is a test service. availabilitiesType: flexible attendantsNumber: 1 + isPrivate: false serviceCategoryId: null ServiceCategoryRecord: type: object @@ -2226,6 +2232,8 @@ components: type: string language: type: string + isPrivate: + type: boolean services: type: array items: @@ -2277,6 +2285,7 @@ components: timezone: UTC language: english services: [ ] + isPrivate: false settings: username: chrisdoe password: Password@123 @@ -2340,6 +2349,8 @@ components: type: string language: type: string + isPrivate: + type: boolean services: type: array items: @@ -2390,6 +2401,7 @@ components: notes: This is a test provider. timezone: UTC language: english + isPrivate: false services: [ ] settings: username: chrisdoe