mindbody-api-v6 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +357 -0
- data/Rakefile +8 -0
- data/docs/AddAppointmentRequest.md +23 -0
- data/docs/AddAppointmentResponse.md +8 -0
- data/docs/AddArrivalRequest.md +9 -0
- data/docs/AddArrivalResponse.md +9 -0
- data/docs/AddClientRequest.md +61 -0
- data/docs/AddClientResponse.md +8 -0
- data/docs/AddClientToClassRequest.md +17 -0
- data/docs/AddClientToClassResponse.md +8 -0
- data/docs/AddClientToClassVisit.md +28 -0
- data/docs/AddClientToEnrollmentRequest.md +15 -0
- data/docs/AddContactLogRequest.md +16 -0
- data/docs/AddContactLogType.md +9 -0
- data/docs/Amenity.md +9 -0
- data/docs/Appointment.md +24 -0
- data/docs/AppointmentApi.md +460 -0
- data/docs/AppointmentOption.md +11 -0
- data/docs/AssignedClientIndex.md +9 -0
- data/docs/AutopaySchedule.md +10 -0
- data/docs/Availability.md +15 -0
- data/docs/BookingWindow.md +11 -0
- data/docs/CheckoutAppointmentBookingRequest.md +14 -0
- data/docs/CheckoutItem.md +9 -0
- data/docs/CheckoutItemWrapper.md +17 -0
- data/docs/CheckoutPaymentInfo.md +9 -0
- data/docs/CheckoutShoppingCartRequest.md +18 -0
- data/docs/ClassApi.md +589 -0
- data/docs/ClassDescription.md +22 -0
- data/docs/ClassPayrollEvent.md +10 -0
- data/docs/ClassSchedule.md +29 -0
- data/docs/Client.md +61 -0
- data/docs/ClientApi.md +1473 -0
- data/docs/ClientContract.md +16 -0
- data/docs/ClientCreditCard.md +17 -0
- data/docs/ClientDocument.md +10 -0
- data/docs/ClientIndex.md +13 -0
- data/docs/ClientIndexValue.md +10 -0
- data/docs/ClientMembership.md +20 -0
- data/docs/ClientPurchaseRecord.md +16 -0
- data/docs/ClientRelationship.md +10 -0
- data/docs/ClientService.md +18 -0
- data/docs/Color.md +9 -0
- data/docs/ContactLog.md +18 -0
- data/docs/ContactLogComment.md +11 -0
- data/docs/ContactLogSubType.md +8 -0
- data/docs/ContactLogType.md +9 -0
- data/docs/Contract.md +41 -0
- data/docs/ContractItem.md +14 -0
- data/docs/Course.md +17 -0
- data/docs/CreditCardInfo.md +16 -0
- data/docs/CrossRegionalClientAssociation.md +10 -0
- data/docs/CustomClientField.md +10 -0
- data/docs/CustomClientFieldValue.md +11 -0
- data/docs/CustomPaymentMethod.md +9 -0
- data/docs/EnrollmentApi.md +137 -0
- data/docs/FormulaNote.md +12 -0
- data/docs/GetActivationCodeResponse.md +9 -0
- data/docs/GetActiveClientMembershipsRequest.md +11 -0
- data/docs/GetActiveClientMembershipsResponse.md +9 -0
- data/docs/GetActiveSessionTimesRequest.md +13 -0
- data/docs/GetActiveSessionTimesResponse.md +9 -0
- data/docs/GetAppointmentOptionsResponse.md +8 -0
- data/docs/GetBookableItemsRequest.md +16 -0
- data/docs/GetBookableItemsResponse.md +9 -0
- data/docs/GetClassDescriptionsRequest.md +15 -0
- data/docs/GetClassDescriptionsResponse.md +9 -0
- data/docs/GetClassPayrollRequest.md +13 -0
- data/docs/GetClassPayrollResponse.md +9 -0
- data/docs/GetClassSchedulesRequest.md +16 -0
- data/docs/GetClassSchedulesResponse.md +9 -0
- data/docs/GetClassVisitsRequest.md +9 -0
- data/docs/GetClassVisitsResponse.md +8 -0
- data/docs/GetClassesRequest.md +22 -0
- data/docs/GetClassesResponse.md +9 -0
- data/docs/GetClientAccountBalancesRequest.md +12 -0
- data/docs/GetClientAccountBalancesResponse.md +9 -0
- data/docs/GetClientContractsRequest.md +12 -0
- data/docs/GetClientContractsResponse.md +9 -0
- data/docs/GetClientFormulaNotesRequest.md +11 -0
- data/docs/GetClientFormulaNotesResponse.md +9 -0
- data/docs/GetClientIndexesRequest.md +8 -0
- data/docs/GetClientIndexesResponse.md +8 -0
- data/docs/GetClientPurchasesRequest.md +13 -0
- data/docs/GetClientPurchasesResponse.md +9 -0
- data/docs/GetClientReferralTypesRequest.md +8 -0
- data/docs/GetClientReferralTypesResponse.md +8 -0
- data/docs/GetClientServicesRequest.md +20 -0
- data/docs/GetClientServicesResponse.md +9 -0
- data/docs/GetClientVisitsRequest.md +15 -0
- data/docs/GetClientVisitsResponse.md +9 -0
- data/docs/GetClientsRequest.md +13 -0
- data/docs/GetClientsResponse.md +9 -0
- data/docs/GetContactLogsRequest.md +16 -0
- data/docs/GetContactLogsResponse.md +9 -0
- data/docs/GetContractsRequest.md +13 -0
- data/docs/GetContractsResponse.md +9 -0
- data/docs/GetCrossRegionalClientAssociationsRequest.md +11 -0
- data/docs/GetCrossRegionalClientAssociationsResponse.md +9 -0
- data/docs/GetCustomClientFieldsRequest.md +9 -0
- data/docs/GetCustomClientFieldsResponse.md +9 -0
- data/docs/GetCustomPaymentMethodsRequest.md +9 -0
- data/docs/GetCustomPaymentMethodsResponse.md +9 -0
- data/docs/GetEnrollmentsRequest.md +16 -0
- data/docs/GetEnrollmentsResponse.md +9 -0
- data/docs/GetGiftCardResponse.md +9 -0
- data/docs/GetGiftCardsRequest.md +12 -0
- data/docs/GetLocationsRequest.md +9 -0
- data/docs/GetLocationsResponse.md +9 -0
- data/docs/GetPackagesRequest.md +11 -0
- data/docs/GetPackagesResponse.md +9 -0
- data/docs/GetProductsRequest.md +15 -0
- data/docs/GetProductsResponse.md +9 -0
- data/docs/GetProgramsRequest.md +11 -0
- data/docs/GetProgramsResponse.md +9 -0
- data/docs/GetRequiredClientFieldsResponse.md +8 -0
- data/docs/GetResourcesRequest.md +13 -0
- data/docs/GetResourcesResponse.md +9 -0
- data/docs/GetSalesRequest.md +7 -0
- data/docs/GetSalesResponse.md +9 -0
- data/docs/GetScheduleItemsRequest.md +14 -0
- data/docs/GetScheduleItemsResponse.md +9 -0
- data/docs/GetServicesRequest.md +18 -0
- data/docs/GetServicesResponse.md +9 -0
- data/docs/GetSessionTypesRequest.md +11 -0
- data/docs/GetSessionTypesResponse.md +9 -0
- data/docs/GetSitesRequest.md +10 -0
- data/docs/GetSitesResponse.md +9 -0
- data/docs/GetStaffAppointmentsRequest.md +15 -0
- data/docs/GetStaffAppointmentsResponse.md +9 -0
- data/docs/GetStaffPermissionsRequest.md +8 -0
- data/docs/GetStaffPermissionsResponse.md +8 -0
- data/docs/GetStaffRequest.md +14 -0
- data/docs/GetStaffResponse.md +9 -0
- data/docs/GetTimeClockRequest.md +13 -0
- data/docs/GetTimeClockResponse.md +9 -0
- data/docs/GetWaitlistEntriesRequest.md +14 -0
- data/docs/GetWaitlistEntriesResponse.md +9 -0
- data/docs/GiftCard.md +19 -0
- data/docs/GiftCardLayout.md +9 -0
- data/docs/IssueRequest.md +9 -0
- data/docs/IssueResponse.md +10 -0
- data/docs/Level.md +10 -0
- data/docs/Liability.md +10 -0
- data/docs/Location.md +32 -0
- data/docs/MembershipTypeRestriction.md +9 -0
- data/docs/ModelClass.md +33 -0
- data/docs/Package.md +13 -0
- data/docs/PaginationResponse.md +11 -0
- data/docs/PayrollApi.md +140 -0
- data/docs/Product.md +18 -0
- data/docs/Program.md +11 -0
- data/docs/ProspectStage.md +10 -0
- data/docs/PurchaseContractRequest.md +18 -0
- data/docs/PurchaseContractResponse.md +11 -0
- data/docs/PurchaseGiftCardRequest.md +19 -0
- data/docs/PurchaseGiftCardResponse.md +17 -0
- data/docs/PurchasedItem.md +9 -0
- data/docs/Relationship.md +10 -0
- data/docs/RemoveClientFromClassRequest.md +12 -0
- data/docs/RemoveClientFromClassResponse.md +8 -0
- data/docs/RemoveFromWaitlistRequest.md +8 -0
- data/docs/RemoveFromWaitlistResponse.md +7 -0
- data/docs/Resource.md +9 -0
- data/docs/Sale.md +15 -0
- data/docs/SaleApi.md +683 -0
- data/docs/SalePayment.md +12 -0
- data/docs/SalesRep.md +12 -0
- data/docs/SendPasswordResetEmailRequest.md +10 -0
- data/docs/Service.md +16 -0
- data/docs/SessionType.md +17 -0
- data/docs/Site.md +27 -0
- data/docs/SiteApi.md +362 -0
- data/docs/Size.md +9 -0
- data/docs/Staff.md +31 -0
- data/docs/StaffApi.md +131 -0
- data/docs/StaffPermissionGroup.md +11 -0
- data/docs/StoredCardInfo.md +8 -0
- data/docs/SubstituteClassTeacherRequest.md +13 -0
- data/docs/SubstituteClassTeacherResponse.md +8 -0
- data/docs/SubstituteTeacherClass.md +27 -0
- data/docs/TimeCardEvent.md +10 -0
- data/docs/TimeClockReport.md +13 -0
- data/docs/Unavailability.md +11 -0
- data/docs/UpcomingAutopayEvent.md +11 -0
- data/docs/UpdateAppointmentRequest.md +19 -0
- data/docs/UpdateAppointmentResponse.md +8 -0
- data/docs/UpdateClientRequest.md +11 -0
- data/docs/UpdateClientResponse.md +8 -0
- data/docs/UpdateClientServiceRequest.md +11 -0
- data/docs/UpdateClientServiceResponse.md +8 -0
- data/docs/UpdateClientVisitRequest.md +13 -0
- data/docs/UpdateClientVisitResponse.md +8 -0
- data/docs/UpdateContactLogComment.md +9 -0
- data/docs/UpdateContactLogRequest.md +16 -0
- data/docs/UpdateContactLogType.md +9 -0
- data/docs/UploadClientDocumentRequest.md +9 -0
- data/docs/UploadClientDocumentResponse.md +9 -0
- data/docs/UploadClientPhotoRequest.md +9 -0
- data/docs/UploadClientPhotoResponse.md +9 -0
- data/docs/User.md +11 -0
- data/docs/UserTokenApi.md +115 -0
- data/docs/Visit.md +25 -0
- data/docs/WaitlistEntry.md +16 -0
- data/git_push.sh +55 -0
- data/lib/swagger_client.rb +241 -0
- data/lib/swagger_client/api/appointment_api.rb +570 -0
- data/lib/swagger_client/api/class_api.rb +727 -0
- data/lib/swagger_client/api/client_api.rb +1795 -0
- data/lib/swagger_client/api/enrollment_api.rb +180 -0
- data/lib/swagger_client/api/payroll_api.rb +181 -0
- data/lib/swagger_client/api/sale_api.rb +829 -0
- data/lib/swagger_client/api/site_api.rb +433 -0
- data/lib/swagger_client/api/staff_api.rb +171 -0
- data/lib/swagger_client/api/user_token_api.rb +150 -0
- data/lib/swagger_client/api_client.rb +389 -0
- data/lib/swagger_client/api_error.rb +38 -0
- data/lib/swagger_client/configuration.rb +209 -0
- data/lib/swagger_client/models/add_appointment_request.rb +395 -0
- data/lib/swagger_client/models/add_appointment_response.rb +184 -0
- data/lib/swagger_client/models/add_arrival_request.rb +204 -0
- data/lib/swagger_client/models/add_arrival_response.rb +194 -0
- data/lib/swagger_client/models/add_client_request.rb +766 -0
- data/lib/swagger_client/models/add_client_response.rb +184 -0
- data/lib/swagger_client/models/add_client_to_class_request.rb +284 -0
- data/lib/swagger_client/models/add_client_to_class_response.rb +184 -0
- data/lib/swagger_client/models/add_client_to_class_visit.rb +442 -0
- data/lib/swagger_client/models/add_client_to_enrollment_request.rb +266 -0
- data/lib/swagger_client/models/add_contact_log_request.rb +278 -0
- data/lib/swagger_client/models/add_contact_log_type.rb +197 -0
- data/lib/swagger_client/models/amenity.rb +195 -0
- data/lib/swagger_client/models/appointment.rb +393 -0
- data/lib/swagger_client/models/appointment_option.rb +215 -0
- data/lib/swagger_client/models/assigned_client_index.rb +195 -0
- data/lib/swagger_client/models/autopay_schedule.rb +204 -0
- data/lib/swagger_client/models/availability.rb +257 -0
- data/lib/swagger_client/models/booking_window.rb +215 -0
- data/lib/swagger_client/models/checkout_appointment_booking_request.rb +246 -0
- data/lib/swagger_client/models/checkout_item.rb +196 -0
- data/lib/swagger_client/models/checkout_item_wrapper.rb +286 -0
- data/lib/swagger_client/models/checkout_payment_info.rb +196 -0
- data/lib/swagger_client/models/checkout_shopping_cart_request.rb +318 -0
- data/lib/swagger_client/models/class_description.rb +325 -0
- data/lib/swagger_client/models/class_payroll_event.rb +204 -0
- data/lib/swagger_client/models/class_schedule.rb +399 -0
- data/lib/swagger_client/models/client.rb +769 -0
- data/lib/swagger_client/models/client_contract.rb +301 -0
- data/lib/swagger_client/models/client_credit_card.rb +275 -0
- data/lib/swagger_client/models/client_document.rb +238 -0
- data/lib/swagger_client/models/client_index.rb +271 -0
- data/lib/swagger_client/models/client_index_value.rb +205 -0
- data/lib/swagger_client/models/client_membership.rb +340 -0
- data/lib/swagger_client/models/client_purchase_record.rb +265 -0
- data/lib/swagger_client/models/client_relationship.rb +205 -0
- data/lib/swagger_client/models/client_service.rb +319 -0
- data/lib/swagger_client/models/color.rb +195 -0
- data/lib/swagger_client/models/contact_log.rb +289 -0
- data/lib/swagger_client/models/contact_log_comment.rb +215 -0
- data/lib/swagger_client/models/contact_log_sub_type.rb +185 -0
- data/lib/swagger_client/models/contact_log_type.rb +197 -0
- data/lib/swagger_client/models/contract.rb +522 -0
- data/lib/swagger_client/models/contract_item.rb +244 -0
- data/lib/swagger_client/models/course.rb +275 -0
- data/lib/swagger_client/models/credit_card_info.rb +256 -0
- data/lib/swagger_client/models/cross_regional_client_association.rb +205 -0
- data/lib/swagger_client/models/custom_client_field.rb +205 -0
- data/lib/swagger_client/models/custom_client_field_value.rb +215 -0
- data/lib/swagger_client/models/custom_payment_method.rb +194 -0
- data/lib/swagger_client/models/formula_note.rb +225 -0
- data/lib/swagger_client/models/get_activation_code_response.rb +194 -0
- data/lib/swagger_client/models/get_active_client_memberships_request.rb +219 -0
- data/lib/swagger_client/models/get_active_client_memberships_response.rb +196 -0
- data/lib/swagger_client/models/get_active_session_times_request.rb +270 -0
- data/lib/swagger_client/models/get_active_session_times_response.rb +196 -0
- data/lib/swagger_client/models/get_appointment_options_response.rb +186 -0
- data/lib/swagger_client/models/get_bookable_items_request.rb +275 -0
- data/lib/swagger_client/models/get_bookable_items_response.rb +196 -0
- data/lib/swagger_client/models/get_class_descriptions_request.rb +256 -0
- data/lib/swagger_client/models/get_class_descriptions_response.rb +196 -0
- data/lib/swagger_client/models/get_class_payroll_request.rb +234 -0
- data/lib/swagger_client/models/get_class_payroll_response.rb +196 -0
- data/lib/swagger_client/models/get_class_schedules_request.rb +274 -0
- data/lib/swagger_client/models/get_class_schedules_response.rb +196 -0
- data/lib/swagger_client/models/get_class_visits_request.rb +194 -0
- data/lib/swagger_client/models/get_class_visits_response.rb +184 -0
- data/lib/swagger_client/models/get_classes_request.rb +338 -0
- data/lib/swagger_client/models/get_classes_response.rb +196 -0
- data/lib/swagger_client/models/get_client_account_balances_request.rb +231 -0
- data/lib/swagger_client/models/get_client_account_balances_response.rb +196 -0
- data/lib/swagger_client/models/get_client_contracts_request.rb +229 -0
- data/lib/swagger_client/models/get_client_contracts_response.rb +196 -0
- data/lib/swagger_client/models/get_client_formula_notes_request.rb +214 -0
- data/lib/swagger_client/models/get_client_formula_notes_response.rb +196 -0
- data/lib/swagger_client/models/get_client_indexes_request.rb +184 -0
- data/lib/swagger_client/models/get_client_indexes_response.rb +186 -0
- data/lib/swagger_client/models/get_client_purchases_request.rb +239 -0
- data/lib/swagger_client/models/get_client_purchases_response.rb +196 -0
- data/lib/swagger_client/models/get_client_referral_types_request.rb +184 -0
- data/lib/swagger_client/models/get_client_referral_types_response.rb +186 -0
- data/lib/swagger_client/models/get_client_services_request.rb +313 -0
- data/lib/swagger_client/models/get_client_services_response.rb +196 -0
- data/lib/swagger_client/models/get_client_visits_request.rb +259 -0
- data/lib/swagger_client/models/get_client_visits_response.rb +196 -0
- data/lib/swagger_client/models/get_clients_request.rb +236 -0
- data/lib/swagger_client/models/get_clients_response.rb +196 -0
- data/lib/swagger_client/models/get_contact_logs_request.rb +275 -0
- data/lib/swagger_client/models/get_contact_logs_response.rb +196 -0
- data/lib/swagger_client/models/get_contracts_request.rb +241 -0
- data/lib/swagger_client/models/get_contracts_response.rb +196 -0
- data/lib/swagger_client/models/get_cross_regional_client_associations_request.rb +214 -0
- data/lib/swagger_client/models/get_cross_regional_client_associations_response.rb +196 -0
- data/lib/swagger_client/models/get_custom_client_fields_request.rb +194 -0
- data/lib/swagger_client/models/get_custom_client_fields_response.rb +196 -0
- data/lib/swagger_client/models/get_custom_payment_methods_request.rb +194 -0
- data/lib/swagger_client/models/get_custom_payment_methods_response.rb +196 -0
- data/lib/swagger_client/models/get_enrollments_request.rb +274 -0
- data/lib/swagger_client/models/get_enrollments_response.rb +196 -0
- data/lib/swagger_client/models/get_gift_card_response.rb +196 -0
- data/lib/swagger_client/models/get_gift_cards_request.rb +226 -0
- data/lib/swagger_client/models/get_locations_request.rb +194 -0
- data/lib/swagger_client/models/get_locations_response.rb +196 -0
- data/lib/swagger_client/models/get_packages_request.rb +216 -0
- data/lib/swagger_client/models/get_packages_response.rb +196 -0
- data/lib/swagger_client/models/get_products_request.rb +260 -0
- data/lib/swagger_client/models/get_products_response.rb +196 -0
- data/lib/swagger_client/models/get_programs_request.rb +248 -0
- data/lib/swagger_client/models/get_programs_response.rb +196 -0
- data/lib/swagger_client/models/get_required_client_fields_response.rb +186 -0
- data/lib/swagger_client/models/get_resources_request.rb +236 -0
- data/lib/swagger_client/models/get_resources_response.rb +196 -0
- data/lib/swagger_client/models/get_sales_request.rb +174 -0
- data/lib/swagger_client/models/get_sales_response.rb +196 -0
- data/lib/swagger_client/models/get_schedule_items_request.rb +248 -0
- data/lib/swagger_client/models/get_schedule_items_response.rb +196 -0
- data/lib/swagger_client/models/get_services_request.rb +290 -0
- data/lib/swagger_client/models/get_services_response.rb +196 -0
- data/lib/swagger_client/models/get_session_types_request.rb +216 -0
- data/lib/swagger_client/models/get_session_types_response.rb +196 -0
- data/lib/swagger_client/models/get_sites_request.rb +206 -0
- data/lib/swagger_client/models/get_sites_response.rb +196 -0
- data/lib/swagger_client/models/get_staff_appointments_request.rb +262 -0
- data/lib/swagger_client/models/get_staff_appointments_response.rb +196 -0
- data/lib/swagger_client/models/get_staff_permissions_request.rb +189 -0
- data/lib/swagger_client/models/get_staff_permissions_response.rb +184 -0
- data/lib/swagger_client/models/get_staff_request.rb +248 -0
- data/lib/swagger_client/models/get_staff_response.rb +195 -0
- data/lib/swagger_client/models/get_time_clock_request.rb +234 -0
- data/lib/swagger_client/models/get_time_clock_response.rb +196 -0
- data/lib/swagger_client/models/get_waitlist_entries_request.rb +252 -0
- data/lib/swagger_client/models/get_waitlist_entries_response.rb +196 -0
- data/lib/swagger_client/models/gift_card.rb +300 -0
- data/lib/swagger_client/models/gift_card_layout.rb +195 -0
- data/lib/swagger_client/models/issue_request.rb +195 -0
- data/lib/swagger_client/models/issue_response.rb +204 -0
- data/lib/swagger_client/models/level.rb +205 -0
- data/lib/swagger_client/models/liability.rb +204 -0
- data/lib/swagger_client/models/location.rb +428 -0
- data/lib/swagger_client/models/membership_type_restriction.rb +194 -0
- data/lib/swagger_client/models/model_class.rb +473 -0
- data/lib/swagger_client/models/package.rb +238 -0
- data/lib/swagger_client/models/pagination_response.rb +214 -0
- data/lib/swagger_client/models/product.rb +284 -0
- data/lib/swagger_client/models/program.rb +248 -0
- data/lib/swagger_client/models/prospect_stage.rb +204 -0
- data/lib/swagger_client/models/purchase_contract_request.rb +309 -0
- data/lib/swagger_client/models/purchase_contract_response.rb +214 -0
- data/lib/swagger_client/models/purchase_gift_card_request.rb +309 -0
- data/lib/swagger_client/models/purchase_gift_card_response.rb +274 -0
- data/lib/swagger_client/models/purchased_item.rb +194 -0
- data/lib/swagger_client/models/relationship.rb +205 -0
- data/lib/swagger_client/models/remove_client_from_class_request.rb +234 -0
- data/lib/swagger_client/models/remove_client_from_class_response.rb +184 -0
- data/lib/swagger_client/models/remove_from_waitlist_request.rb +191 -0
- data/lib/swagger_client/models/remove_from_waitlist_response.rb +174 -0
- data/lib/swagger_client/models/resource.rb +195 -0
- data/lib/swagger_client/models/sale.rb +258 -0
- data/lib/swagger_client/models/sale_payment.rb +224 -0
- data/lib/swagger_client/models/sales_rep.rb +226 -0
- data/lib/swagger_client/models/send_password_reset_email_request.rb +220 -0
- data/lib/swagger_client/models/service.rb +264 -0
- data/lib/swagger_client/models/session_type.rb +308 -0
- data/lib/swagger_client/models/site.rb +374 -0
- data/lib/swagger_client/models/size.rb +194 -0
- data/lib/swagger_client/models/staff.rb +420 -0
- data/lib/swagger_client/models/staff_permission_group.rb +240 -0
- data/lib/swagger_client/models/stored_card_info.rb +183 -0
- data/lib/swagger_client/models/substitute_class_teacher_request.rb +244 -0
- data/lib/swagger_client/models/substitute_class_teacher_response.rb +184 -0
- data/lib/swagger_client/models/substitute_teacher_class.rb +375 -0
- data/lib/swagger_client/models/time_card_event.rb +204 -0
- data/lib/swagger_client/models/time_clock_report.rb +236 -0
- data/lib/swagger_client/models/unavailability.rb +214 -0
- data/lib/swagger_client/models/upcoming_autopay_event.rb +248 -0
- data/lib/swagger_client/models/update_appointment_request.rb +301 -0
- data/lib/swagger_client/models/update_appointment_response.rb +184 -0
- data/lib/swagger_client/models/update_client_request.rb +219 -0
- data/lib/swagger_client/models/update_client_response.rb +184 -0
- data/lib/swagger_client/models/update_client_service_request.rb +219 -0
- data/lib/swagger_client/models/update_client_service_response.rb +184 -0
- data/lib/swagger_client/models/update_client_visit_request.rb +239 -0
- data/lib/swagger_client/models/update_client_visit_response.rb +184 -0
- data/lib/swagger_client/models/update_contact_log_comment.rb +194 -0
- data/lib/swagger_client/models/update_contact_log_request.rb +268 -0
- data/lib/swagger_client/models/update_contact_log_type.rb +196 -0
- data/lib/swagger_client/models/upload_client_document_request.rb +204 -0
- data/lib/swagger_client/models/upload_client_document_response.rb +194 -0
- data/lib/swagger_client/models/upload_client_photo_request.rb +223 -0
- data/lib/swagger_client/models/upload_client_photo_response.rb +194 -0
- data/lib/swagger_client/models/user.rb +214 -0
- data/lib/swagger_client/models/visit.rb +413 -0
- data/lib/swagger_client/models/waitlist_entry.rb +264 -0
- data/lib/swagger_client/version.rb +15 -0
- data/mindbody-api-6.0.0.gem +0 -0
- data/mindbody-swagger.gem +0 -0
- data/spec/api/appointment_api_spec.rb +165 -0
- data/spec/api/class_api_spec.rb +202 -0
- data/spec/api/client_api_spec.rb +435 -0
- data/spec/api/enrollment_api_spec.rb +72 -0
- data/spec/api/payroll_api_spec.rb +74 -0
- data/spec/api/sale_api_spec.rb +222 -0
- data/spec/api/site_api_spec.rb +132 -0
- data/spec/api/staff_api_spec.rb +69 -0
- data/spec/api/user_token_api_spec.rb +62 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_appointment_request_spec.rb +135 -0
- data/spec/models/add_appointment_response_spec.rb +41 -0
- data/spec/models/add_arrival_request_spec.rb +47 -0
- data/spec/models/add_arrival_response_spec.rb +47 -0
- data/spec/models/add_client_request_spec.rb +363 -0
- data/spec/models/add_client_response_spec.rb +41 -0
- data/spec/models/add_client_to_class_request_spec.rb +95 -0
- data/spec/models/add_client_to_class_response_spec.rb +41 -0
- data/spec/models/add_client_to_class_visit_spec.rb +173 -0
- data/spec/models/add_client_to_enrollment_request_spec.rb +83 -0
- data/spec/models/add_contact_log_request_spec.rb +89 -0
- data/spec/models/add_contact_log_type_spec.rb +47 -0
- data/spec/models/amenity_spec.rb +47 -0
- data/spec/models/appointment_option_spec.rb +59 -0
- data/spec/models/appointment_spec.rb +145 -0
- data/spec/models/assigned_client_index_spec.rb +47 -0
- data/spec/models/autopay_schedule_spec.rb +53 -0
- data/spec/models/availability_spec.rb +83 -0
- data/spec/models/booking_window_spec.rb +59 -0
- data/spec/models/checkout_appointment_booking_request_spec.rb +77 -0
- data/spec/models/checkout_item_spec.rb +47 -0
- data/spec/models/checkout_item_wrapper_spec.rb +95 -0
- data/spec/models/checkout_payment_info_spec.rb +47 -0
- data/spec/models/checkout_shopping_cart_request_spec.rb +101 -0
- data/spec/models/class_description_spec.rb +125 -0
- data/spec/models/class_payroll_event_spec.rb +53 -0
- data/spec/models/class_schedule_spec.rb +167 -0
- data/spec/models/client_contract_spec.rb +93 -0
- data/spec/models/client_credit_card_spec.rb +95 -0
- data/spec/models/client_document_spec.rb +53 -0
- data/spec/models/client_index_spec.rb +75 -0
- data/spec/models/client_index_value_spec.rb +53 -0
- data/spec/models/client_membership_spec.rb +117 -0
- data/spec/models/client_purchase_record_spec.rb +89 -0
- data/spec/models/client_relationship_spec.rb +53 -0
- data/spec/models/client_service_spec.rb +105 -0
- data/spec/models/client_spec.rb +367 -0
- data/spec/models/color_spec.rb +47 -0
- data/spec/models/contact_log_comment_spec.rb +59 -0
- data/spec/models/contact_log_spec.rb +101 -0
- data/spec/models/contact_log_sub_type_spec.rb +41 -0
- data/spec/models/contact_log_type_spec.rb +47 -0
- data/spec/models/contract_item_spec.rb +77 -0
- data/spec/models/contract_spec.rb +239 -0
- data/spec/models/course_spec.rb +95 -0
- data/spec/models/credit_card_info_spec.rb +89 -0
- data/spec/models/cross_regional_client_association_spec.rb +53 -0
- data/spec/models/custom_client_field_spec.rb +53 -0
- data/spec/models/custom_client_field_value_spec.rb +59 -0
- data/spec/models/custom_payment_method_spec.rb +47 -0
- data/spec/models/formula_note_spec.rb +65 -0
- data/spec/models/get_activation_code_response_spec.rb +47 -0
- data/spec/models/get_active_client_memberships_request_spec.rb +59 -0
- data/spec/models/get_active_client_memberships_response_spec.rb +47 -0
- data/spec/models/get_active_session_times_request_spec.rb +75 -0
- data/spec/models/get_active_session_times_response_spec.rb +47 -0
- data/spec/models/get_appointment_options_response_spec.rb +41 -0
- data/spec/models/get_bookable_items_request_spec.rb +89 -0
- data/spec/models/get_bookable_items_response_spec.rb +47 -0
- data/spec/models/get_class_descriptions_request_spec.rb +83 -0
- data/spec/models/get_class_descriptions_response_spec.rb +47 -0
- data/spec/models/get_class_payroll_request_spec.rb +71 -0
- data/spec/models/get_class_payroll_response_spec.rb +47 -0
- data/spec/models/get_class_schedules_request_spec.rb +89 -0
- data/spec/models/get_class_schedules_response_spec.rb +47 -0
- data/spec/models/get_class_visits_request_spec.rb +47 -0
- data/spec/models/get_class_visits_response_spec.rb +41 -0
- data/spec/models/get_classes_request_spec.rb +125 -0
- data/spec/models/get_classes_response_spec.rb +47 -0
- data/spec/models/get_client_account_balances_request_spec.rb +65 -0
- data/spec/models/get_client_account_balances_response_spec.rb +47 -0
- data/spec/models/get_client_contracts_request_spec.rb +65 -0
- data/spec/models/get_client_contracts_response_spec.rb +47 -0
- data/spec/models/get_client_formula_notes_request_spec.rb +59 -0
- data/spec/models/get_client_formula_notes_response_spec.rb +47 -0
- data/spec/models/get_client_indexes_request_spec.rb +41 -0
- data/spec/models/get_client_indexes_response_spec.rb +41 -0
- data/spec/models/get_client_purchases_request_spec.rb +71 -0
- data/spec/models/get_client_purchases_response_spec.rb +47 -0
- data/spec/models/get_client_referral_types_request_spec.rb +41 -0
- data/spec/models/get_client_referral_types_response_spec.rb +41 -0
- data/spec/models/get_client_services_request_spec.rb +113 -0
- data/spec/models/get_client_services_response_spec.rb +47 -0
- data/spec/models/get_client_visits_request_spec.rb +83 -0
- data/spec/models/get_client_visits_response_spec.rb +47 -0
- data/spec/models/get_clients_request_spec.rb +71 -0
- data/spec/models/get_clients_response_spec.rb +47 -0
- data/spec/models/get_contact_logs_request_spec.rb +89 -0
- data/spec/models/get_contact_logs_response_spec.rb +47 -0
- data/spec/models/get_contracts_request_spec.rb +71 -0
- data/spec/models/get_contracts_response_spec.rb +47 -0
- data/spec/models/get_cross_regional_client_associations_request_spec.rb +59 -0
- data/spec/models/get_cross_regional_client_associations_response_spec.rb +47 -0
- data/spec/models/get_custom_client_fields_request_spec.rb +47 -0
- data/spec/models/get_custom_client_fields_response_spec.rb +47 -0
- data/spec/models/get_custom_payment_methods_request_spec.rb +47 -0
- data/spec/models/get_custom_payment_methods_response_spec.rb +47 -0
- data/spec/models/get_enrollments_request_spec.rb +89 -0
- data/spec/models/get_enrollments_response_spec.rb +47 -0
- data/spec/models/get_gift_card_response_spec.rb +47 -0
- data/spec/models/get_gift_cards_request_spec.rb +65 -0
- data/spec/models/get_locations_request_spec.rb +47 -0
- data/spec/models/get_locations_response_spec.rb +47 -0
- data/spec/models/get_packages_request_spec.rb +59 -0
- data/spec/models/get_packages_response_spec.rb +47 -0
- data/spec/models/get_products_request_spec.rb +83 -0
- data/spec/models/get_products_response_spec.rb +47 -0
- data/spec/models/get_programs_request_spec.rb +63 -0
- data/spec/models/get_programs_response_spec.rb +47 -0
- data/spec/models/get_required_client_fields_response_spec.rb +41 -0
- data/spec/models/get_resources_request_spec.rb +71 -0
- data/spec/models/get_resources_response_spec.rb +47 -0
- data/spec/models/get_sales_request_spec.rb +35 -0
- data/spec/models/get_sales_response_spec.rb +47 -0
- data/spec/models/get_schedule_items_request_spec.rb +77 -0
- data/spec/models/get_schedule_items_response_spec.rb +47 -0
- data/spec/models/get_services_request_spec.rb +101 -0
- data/spec/models/get_services_response_spec.rb +47 -0
- data/spec/models/get_session_types_request_spec.rb +59 -0
- data/spec/models/get_session_types_response_spec.rb +47 -0
- data/spec/models/get_sites_request_spec.rb +53 -0
- data/spec/models/get_sites_response_spec.rb +47 -0
- data/spec/models/get_staff_appointments_request_spec.rb +83 -0
- data/spec/models/get_staff_appointments_response_spec.rb +47 -0
- data/spec/models/get_staff_permissions_request_spec.rb +41 -0
- data/spec/models/get_staff_permissions_response_spec.rb +41 -0
- data/spec/models/get_staff_request_spec.rb +77 -0
- data/spec/models/get_staff_response_spec.rb +47 -0
- data/spec/models/get_time_clock_request_spec.rb +71 -0
- data/spec/models/get_time_clock_response_spec.rb +47 -0
- data/spec/models/get_waitlist_entries_request_spec.rb +77 -0
- data/spec/models/get_waitlist_entries_response_spec.rb +47 -0
- data/spec/models/gift_card_layout_spec.rb +47 -0
- data/spec/models/gift_card_spec.rb +107 -0
- data/spec/models/issue_request_spec.rb +47 -0
- data/spec/models/issue_response_spec.rb +53 -0
- data/spec/models/level_spec.rb +53 -0
- data/spec/models/liability_spec.rb +53 -0
- data/spec/models/location_spec.rb +185 -0
- data/spec/models/membership_type_restriction_spec.rb +47 -0
- data/spec/models/model_class_spec.rb +195 -0
- data/spec/models/package_spec.rb +71 -0
- data/spec/models/pagination_response_spec.rb +59 -0
- data/spec/models/product_spec.rb +101 -0
- data/spec/models/program_spec.rb +63 -0
- data/spec/models/prospect_stage_spec.rb +53 -0
- data/spec/models/purchase_contract_request_spec.rb +101 -0
- data/spec/models/purchase_contract_response_spec.rb +59 -0
- data/spec/models/purchase_gift_card_request_spec.rb +107 -0
- data/spec/models/purchase_gift_card_response_spec.rb +95 -0
- data/spec/models/purchased_item_spec.rb +47 -0
- data/spec/models/relationship_spec.rb +53 -0
- data/spec/models/remove_client_from_class_request_spec.rb +65 -0
- data/spec/models/remove_client_from_class_response_spec.rb +41 -0
- data/spec/models/remove_from_waitlist_request_spec.rb +41 -0
- data/spec/models/remove_from_waitlist_response_spec.rb +35 -0
- data/spec/models/resource_spec.rb +47 -0
- data/spec/models/sale_payment_spec.rb +65 -0
- data/spec/models/sale_spec.rb +83 -0
- data/spec/models/sales_rep_spec.rb +65 -0
- data/spec/models/send_password_reset_email_request_spec.rb +53 -0
- data/spec/models/service_spec.rb +89 -0
- data/spec/models/session_type_spec.rb +99 -0
- data/spec/models/site_spec.rb +155 -0
- data/spec/models/size_spec.rb +47 -0
- data/spec/models/staff_permission_group_spec.rb +67 -0
- data/spec/models/staff_spec.rb +179 -0
- data/spec/models/stored_card_info_spec.rb +41 -0
- data/spec/models/substitute_class_teacher_request_spec.rb +71 -0
- data/spec/models/substitute_class_teacher_response_spec.rb +41 -0
- data/spec/models/substitute_teacher_class_spec.rb +155 -0
- data/spec/models/time_card_event_spec.rb +53 -0
- data/spec/models/time_clock_report_spec.rb +71 -0
- data/spec/models/unavailability_spec.rb +59 -0
- data/spec/models/upcoming_autopay_event_spec.rb +63 -0
- data/spec/models/update_appointment_request_spec.rb +107 -0
- data/spec/models/update_appointment_response_spec.rb +41 -0
- data/spec/models/update_client_request_spec.rb +59 -0
- data/spec/models/update_client_response_spec.rb +41 -0
- data/spec/models/update_client_service_request_spec.rb +59 -0
- data/spec/models/update_client_service_response_spec.rb +41 -0
- data/spec/models/update_client_visit_request_spec.rb +71 -0
- data/spec/models/update_client_visit_response_spec.rb +41 -0
- data/spec/models/update_contact_log_comment_spec.rb +47 -0
- data/spec/models/update_contact_log_request_spec.rb +89 -0
- data/spec/models/update_contact_log_type_spec.rb +47 -0
- data/spec/models/upload_client_document_request_spec.rb +47 -0
- data/spec/models/upload_client_document_response_spec.rb +47 -0
- data/spec/models/upload_client_photo_request_spec.rb +47 -0
- data/spec/models/upload_client_photo_response_spec.rb +47 -0
- data/spec/models/user_spec.rb +59 -0
- data/spec/models/visit_spec.rb +155 -0
- data/spec/models/waitlist_entry_spec.rb +89 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger_client-1.0.0.gem +0 -0
- data/swagger_client.gemspec +45 -0
- metadata +1050 -0
@@ -0,0 +1,766 @@
|
|
1
|
+
=begin
|
2
|
+
#MINDBODY Public API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v6
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.6
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class AddClientRequest
|
17
|
+
# The client’s current [account balance](https://mindbody-online-support.force.com/support/s/article/203262013-Adding-account-payments-video-tutorial?language=en_US).
|
18
|
+
attr_accessor :account_balance
|
19
|
+
|
20
|
+
# The action taken.
|
21
|
+
attr_accessor :action
|
22
|
+
|
23
|
+
# When `true`, indicates that the client is active at the site.<br /> When `false`, indicates that the client is not active at the site.
|
24
|
+
attr_accessor :active
|
25
|
+
|
26
|
+
# The first line of the client’s street address.
|
27
|
+
attr_accessor :address_line1
|
28
|
+
|
29
|
+
# The second line of the client’s street address, if needed.
|
30
|
+
attr_accessor :address_line2
|
31
|
+
|
32
|
+
# When `true`, indicates that the client prefers services to be provided by a male service provider.<br /> When `false`, indicates that the client prefers services to be provided by a female service provider.<br /> When `null`, indicates that the client has no preference. Default: **null**
|
33
|
+
attr_accessor :appt_gender_pref_male
|
34
|
+
|
35
|
+
# The client’s date of birth.
|
36
|
+
attr_accessor :birth_date
|
37
|
+
|
38
|
+
# The client’s city.
|
39
|
+
attr_accessor :city
|
40
|
+
|
41
|
+
# Contains information about the client’s credit card.
|
42
|
+
attr_accessor :client_credit_card
|
43
|
+
|
44
|
+
# Contains a list of the indexes and client index values to be assigned to the client.
|
45
|
+
attr_accessor :client_indexes
|
46
|
+
|
47
|
+
# Contains information about client relationships to be assigned to the client.
|
48
|
+
attr_accessor :client_relationships
|
49
|
+
|
50
|
+
# The country in which the client is located.
|
51
|
+
attr_accessor :country
|
52
|
+
|
53
|
+
# The date when the client was added to the business, either by the client from the online store or by a staff member at the subscriber’s business. This value always returns in the format yyyy-mm-ddThh:mm:ss:ms.
|
54
|
+
attr_accessor :creation_date
|
55
|
+
|
56
|
+
# Contains information about the custom fields to be assigned to the client.
|
57
|
+
attr_accessor :custom_client_fields
|
58
|
+
|
59
|
+
# The client’s email address.
|
60
|
+
attr_accessor :email
|
61
|
+
|
62
|
+
# The email address of the client’s emergency contact.<br /> For more information, see [Children’s program features(emergency contact information)](https://support.mindbodyonline.com/s/article/203259283-Children-s-program-features-emergency-contact-information?language=en_US).
|
63
|
+
attr_accessor :emergency_contact_info_email
|
64
|
+
|
65
|
+
# The name of the client’s emergency contact.
|
66
|
+
attr_accessor :emergency_contact_info_name
|
67
|
+
|
68
|
+
# The phone number of the client’s emergency contact.
|
69
|
+
attr_accessor :emergency_contact_info_phone
|
70
|
+
|
71
|
+
# The client’s relationship with the emergency contact, for example, mother or spouse.
|
72
|
+
attr_accessor :emergency_contact_info_relationship
|
73
|
+
|
74
|
+
# The date of the client’s first booked appointment at the business.
|
75
|
+
attr_accessor :first_appointment_date
|
76
|
+
|
77
|
+
# The client’s first name. You must specify a first name when you add a client.
|
78
|
+
attr_accessor :first_name
|
79
|
+
|
80
|
+
# The client’s gender.
|
81
|
+
attr_accessor :gender
|
82
|
+
|
83
|
+
# Sets the client’s home location to the passed location, based on its ID.
|
84
|
+
attr_accessor :home_location
|
85
|
+
|
86
|
+
# The client’s home phone number.
|
87
|
+
attr_accessor :home_phone
|
88
|
+
|
89
|
+
# When `true`, indicates that the client should be marked as a company at the business.<br /> When `false`, indicates the client is an individual and does not represent a company.
|
90
|
+
attr_accessor :is_company
|
91
|
+
|
92
|
+
# This value is set only if the business owner allows individuals to be prospects.<br /> When `true`, indicates that the client should be marked as a prospect for the business.<br /> When `false`, indicates that the client should not be marked as a prospect for the business.
|
93
|
+
attr_accessor :is_prospect
|
94
|
+
|
95
|
+
# The last [formula note](https://support.mindbodyonline.com/s/article/203259903-Appointments-Formula-notes?language=en_US) entered for the client.
|
96
|
+
attr_accessor :last_formula_notes
|
97
|
+
|
98
|
+
# The UTC date and time when the client’s information was last modified.
|
99
|
+
attr_accessor :last_modified_date_time
|
100
|
+
|
101
|
+
# The client’s last name. You must specify a last name when you add a client.
|
102
|
+
attr_accessor :last_name
|
103
|
+
|
104
|
+
# Contains the client’s liability agreement information for the business.
|
105
|
+
attr_accessor :liability
|
106
|
+
|
107
|
+
# Passing `true` sets the client’s liability information as follows: * `IsReleased` is set to `true`. * `AgreementDate` is set to the time zone of the business when the call was processed. * `ReleasedBy` is set to `null` if the call is made by the client, `0` if the call was made by the business owner, or to a specific staff member’s ID if a staff member made the call. Passing `false` sets the client’s liability information as follows: * `IsReleased` is set to `false`. * `AgreementDate` is set to `null`. * `ReleasedBy` is set to `null`.
|
108
|
+
attr_accessor :liability_release
|
109
|
+
|
110
|
+
# The ID of the membership icon displayed next to the client’s name, if the client has a membership on their account.
|
111
|
+
attr_accessor :membership_icon
|
112
|
+
|
113
|
+
# The client’s middle name.
|
114
|
+
attr_accessor :middle_name
|
115
|
+
|
116
|
+
# The client’s mobile phone number.
|
117
|
+
attr_accessor :mobile_phone
|
118
|
+
|
119
|
+
# The client's mobile provider.
|
120
|
+
attr_accessor :mobile_provider
|
121
|
+
|
122
|
+
# When passed, sets the client's ID to this value. Otherwise, the client's ID will match their `UniqueId`.
|
123
|
+
attr_accessor :new_id
|
124
|
+
|
125
|
+
# Any notes entered on the client’s account by staff members. This value should never be shown to clients unless the business owner has a specific reason for showing them.
|
126
|
+
attr_accessor :notes
|
127
|
+
|
128
|
+
# The URL for the client’s photo, if one has been uploaded.
|
129
|
+
attr_accessor :photo_url
|
130
|
+
|
131
|
+
# The client’s postal code.
|
132
|
+
attr_accessor :postal_code
|
133
|
+
|
134
|
+
# Contains information about the client [prospect stage](https://support.mindbodyonline.com/s/article/206176457-Prospect-Stages?language=en_US).
|
135
|
+
attr_accessor :prospect_stage
|
136
|
+
|
137
|
+
# Contains any red alert information entered by the business owner for the client.
|
138
|
+
attr_accessor :red_alert
|
139
|
+
|
140
|
+
# Specifies how the client was referred to the business. You can get a list of possible strings using the `GET ClientReferralTypes` endpoint.<br /> For more information, see [Referral types and referral subtypes](https://support.mindbodyonline.com/s/article/203259393-Referral-types-and-referral-subtypes?language=en_US).
|
141
|
+
attr_accessor :referred_by
|
142
|
+
|
143
|
+
# Contains information about the sales representatives to be assigned to the new client.
|
144
|
+
attr_accessor :sales_reps
|
145
|
+
|
146
|
+
# The ID of the site.
|
147
|
+
attr_accessor :site_id
|
148
|
+
|
149
|
+
# The client’s state.
|
150
|
+
attr_accessor :state
|
151
|
+
|
152
|
+
# The client’s status.
|
153
|
+
attr_accessor :status
|
154
|
+
|
155
|
+
# When `true`, indicates that test mode is enabled. The method is validated, but no client data is added or updated.<br /> Default: **false**
|
156
|
+
attr_accessor :test
|
157
|
+
|
158
|
+
# The client’s system-generated ID at the business. This value cannot be changed by business owners and is always unique across all clients at the business. This ID is not widely used in the Public API, but can be used by your application to uniquely identify clients.
|
159
|
+
attr_accessor :unique_id
|
160
|
+
|
161
|
+
# The client’s work phone extension number.
|
162
|
+
attr_accessor :work_extension
|
163
|
+
|
164
|
+
# The client’s work phone number.
|
165
|
+
attr_accessor :work_phone
|
166
|
+
|
167
|
+
# Contains any yellow alert information entered by the business owner for the client.
|
168
|
+
attr_accessor :yellow_alert
|
169
|
+
|
170
|
+
# When `true`, indicates that the client opts to receive schedule emails.
|
171
|
+
attr_accessor :send_schedule_emails
|
172
|
+
|
173
|
+
# When `true`, indicates that the client opts to receive account emails.
|
174
|
+
attr_accessor :send_account_emails
|
175
|
+
|
176
|
+
# When `true`, indicates that the client opts to receive promotional emails.
|
177
|
+
attr_accessor :send_promotional_emails
|
178
|
+
|
179
|
+
class EnumAttributeValidator
|
180
|
+
attr_reader :datatype
|
181
|
+
attr_reader :allowable_values
|
182
|
+
|
183
|
+
def initialize(datatype, allowable_values)
|
184
|
+
@allowable_values = allowable_values.map do |value|
|
185
|
+
case datatype.to_s
|
186
|
+
when /Integer/i
|
187
|
+
value.to_i
|
188
|
+
when /Float/i
|
189
|
+
value.to_f
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
def valid?(value)
|
197
|
+
!value || allowable_values.include?(value)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
202
|
+
def self.attribute_map
|
203
|
+
{
|
204
|
+
:'account_balance' => :'AccountBalance',
|
205
|
+
:'action' => :'Action',
|
206
|
+
:'active' => :'Active',
|
207
|
+
:'address_line1' => :'AddressLine1',
|
208
|
+
:'address_line2' => :'AddressLine2',
|
209
|
+
:'appt_gender_pref_male' => :'ApptGenderPrefMale',
|
210
|
+
:'birth_date' => :'BirthDate',
|
211
|
+
:'city' => :'City',
|
212
|
+
:'client_credit_card' => :'ClientCreditCard',
|
213
|
+
:'client_indexes' => :'ClientIndexes',
|
214
|
+
:'client_relationships' => :'ClientRelationships',
|
215
|
+
:'country' => :'Country',
|
216
|
+
:'creation_date' => :'CreationDate',
|
217
|
+
:'custom_client_fields' => :'CustomClientFields',
|
218
|
+
:'email' => :'Email',
|
219
|
+
:'emergency_contact_info_email' => :'EmergencyContactInfoEmail',
|
220
|
+
:'emergency_contact_info_name' => :'EmergencyContactInfoName',
|
221
|
+
:'emergency_contact_info_phone' => :'EmergencyContactInfoPhone',
|
222
|
+
:'emergency_contact_info_relationship' => :'EmergencyContactInfoRelationship',
|
223
|
+
:'first_appointment_date' => :'FirstAppointmentDate',
|
224
|
+
:'first_name' => :'FirstName',
|
225
|
+
:'gender' => :'Gender',
|
226
|
+
:'home_location' => :'HomeLocation',
|
227
|
+
:'home_phone' => :'HomePhone',
|
228
|
+
:'is_company' => :'IsCompany',
|
229
|
+
:'is_prospect' => :'IsProspect',
|
230
|
+
:'last_formula_notes' => :'LastFormulaNotes',
|
231
|
+
:'last_modified_date_time' => :'LastModifiedDateTime',
|
232
|
+
:'last_name' => :'LastName',
|
233
|
+
:'liability' => :'Liability',
|
234
|
+
:'liability_release' => :'LiabilityRelease',
|
235
|
+
:'membership_icon' => :'MembershipIcon',
|
236
|
+
:'middle_name' => :'MiddleName',
|
237
|
+
:'mobile_phone' => :'MobilePhone',
|
238
|
+
:'mobile_provider' => :'MobileProvider',
|
239
|
+
:'new_id' => :'NewId',
|
240
|
+
:'notes' => :'Notes',
|
241
|
+
:'photo_url' => :'PhotoUrl',
|
242
|
+
:'postal_code' => :'PostalCode',
|
243
|
+
:'prospect_stage' => :'ProspectStage',
|
244
|
+
:'red_alert' => :'RedAlert',
|
245
|
+
:'referred_by' => :'ReferredBy',
|
246
|
+
:'sales_reps' => :'SalesReps',
|
247
|
+
:'site_id' => :'SiteId',
|
248
|
+
:'state' => :'State',
|
249
|
+
:'status' => :'Status',
|
250
|
+
:'test' => :'Test',
|
251
|
+
:'unique_id' => :'UniqueId',
|
252
|
+
:'work_extension' => :'WorkExtension',
|
253
|
+
:'work_phone' => :'WorkPhone',
|
254
|
+
:'yellow_alert' => :'YellowAlert',
|
255
|
+
:'send_schedule_emails' => :'SendScheduleEmails',
|
256
|
+
:'send_account_emails' => :'SendAccountEmails',
|
257
|
+
:'send_promotional_emails' => :'SendPromotionalEmails'
|
258
|
+
}
|
259
|
+
end
|
260
|
+
|
261
|
+
# Attribute type mapping.
|
262
|
+
def self.swagger_types
|
263
|
+
{
|
264
|
+
:'account_balance' => :'Float',
|
265
|
+
:'action' => :'String',
|
266
|
+
:'active' => :'BOOLEAN',
|
267
|
+
:'address_line1' => :'String',
|
268
|
+
:'address_line2' => :'String',
|
269
|
+
:'appt_gender_pref_male' => :'BOOLEAN',
|
270
|
+
:'birth_date' => :'DateTime',
|
271
|
+
:'city' => :'String',
|
272
|
+
:'client_credit_card' => :'ClientCreditCard',
|
273
|
+
:'client_indexes' => :'Array<AssignedClientIndex>',
|
274
|
+
:'client_relationships' => :'Array<ClientRelationship>',
|
275
|
+
:'country' => :'String',
|
276
|
+
:'creation_date' => :'DateTime',
|
277
|
+
:'custom_client_fields' => :'Array<CustomClientFieldValue>',
|
278
|
+
:'email' => :'String',
|
279
|
+
:'emergency_contact_info_email' => :'String',
|
280
|
+
:'emergency_contact_info_name' => :'String',
|
281
|
+
:'emergency_contact_info_phone' => :'String',
|
282
|
+
:'emergency_contact_info_relationship' => :'String',
|
283
|
+
:'first_appointment_date' => :'DateTime',
|
284
|
+
:'first_name' => :'String',
|
285
|
+
:'gender' => :'String',
|
286
|
+
:'home_location' => :'Location',
|
287
|
+
:'home_phone' => :'String',
|
288
|
+
:'is_company' => :'BOOLEAN',
|
289
|
+
:'is_prospect' => :'BOOLEAN',
|
290
|
+
:'last_formula_notes' => :'String',
|
291
|
+
:'last_modified_date_time' => :'DateTime',
|
292
|
+
:'last_name' => :'String',
|
293
|
+
:'liability' => :'Liability',
|
294
|
+
:'liability_release' => :'BOOLEAN',
|
295
|
+
:'membership_icon' => :'Integer',
|
296
|
+
:'middle_name' => :'String',
|
297
|
+
:'mobile_phone' => :'String',
|
298
|
+
:'mobile_provider' => :'Integer',
|
299
|
+
:'new_id' => :'String',
|
300
|
+
:'notes' => :'String',
|
301
|
+
:'photo_url' => :'String',
|
302
|
+
:'postal_code' => :'String',
|
303
|
+
:'prospect_stage' => :'ProspectStage',
|
304
|
+
:'red_alert' => :'String',
|
305
|
+
:'referred_by' => :'String',
|
306
|
+
:'sales_reps' => :'Array<SalesRep>',
|
307
|
+
:'site_id' => :'Integer',
|
308
|
+
:'state' => :'String',
|
309
|
+
:'status' => :'String',
|
310
|
+
:'test' => :'BOOLEAN',
|
311
|
+
:'unique_id' => :'Integer',
|
312
|
+
:'work_extension' => :'String',
|
313
|
+
:'work_phone' => :'String',
|
314
|
+
:'yellow_alert' => :'String',
|
315
|
+
:'send_schedule_emails' => :'BOOLEAN',
|
316
|
+
:'send_account_emails' => :'BOOLEAN',
|
317
|
+
:'send_promotional_emails' => :'BOOLEAN'
|
318
|
+
}
|
319
|
+
end
|
320
|
+
|
321
|
+
# Initializes the object
|
322
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
323
|
+
def initialize(attributes = {})
|
324
|
+
return unless attributes.is_a?(Hash)
|
325
|
+
|
326
|
+
# convert string to symbol for hash key
|
327
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
328
|
+
|
329
|
+
if attributes.has_key?(:'AccountBalance')
|
330
|
+
self.account_balance = attributes[:'AccountBalance']
|
331
|
+
end
|
332
|
+
|
333
|
+
if attributes.has_key?(:'Action')
|
334
|
+
self.action = attributes[:'Action']
|
335
|
+
end
|
336
|
+
|
337
|
+
if attributes.has_key?(:'Active')
|
338
|
+
self.active = attributes[:'Active']
|
339
|
+
end
|
340
|
+
|
341
|
+
if attributes.has_key?(:'AddressLine1')
|
342
|
+
self.address_line1 = attributes[:'AddressLine1']
|
343
|
+
end
|
344
|
+
|
345
|
+
if attributes.has_key?(:'AddressLine2')
|
346
|
+
self.address_line2 = attributes[:'AddressLine2']
|
347
|
+
end
|
348
|
+
|
349
|
+
if attributes.has_key?(:'ApptGenderPrefMale')
|
350
|
+
self.appt_gender_pref_male = attributes[:'ApptGenderPrefMale']
|
351
|
+
end
|
352
|
+
|
353
|
+
if attributes.has_key?(:'BirthDate')
|
354
|
+
self.birth_date = attributes[:'BirthDate']
|
355
|
+
end
|
356
|
+
|
357
|
+
if attributes.has_key?(:'City')
|
358
|
+
self.city = attributes[:'City']
|
359
|
+
end
|
360
|
+
|
361
|
+
if attributes.has_key?(:'ClientCreditCard')
|
362
|
+
self.client_credit_card = attributes[:'ClientCreditCard']
|
363
|
+
end
|
364
|
+
|
365
|
+
if attributes.has_key?(:'ClientIndexes')
|
366
|
+
if (value = attributes[:'ClientIndexes']).is_a?(Array)
|
367
|
+
self.client_indexes = value
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
if attributes.has_key?(:'ClientRelationships')
|
372
|
+
if (value = attributes[:'ClientRelationships']).is_a?(Array)
|
373
|
+
self.client_relationships = value
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
if attributes.has_key?(:'Country')
|
378
|
+
self.country = attributes[:'Country']
|
379
|
+
end
|
380
|
+
|
381
|
+
if attributes.has_key?(:'CreationDate')
|
382
|
+
self.creation_date = attributes[:'CreationDate']
|
383
|
+
end
|
384
|
+
|
385
|
+
if attributes.has_key?(:'CustomClientFields')
|
386
|
+
if (value = attributes[:'CustomClientFields']).is_a?(Array)
|
387
|
+
self.custom_client_fields = value
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
391
|
+
if attributes.has_key?(:'Email')
|
392
|
+
self.email = attributes[:'Email']
|
393
|
+
end
|
394
|
+
|
395
|
+
if attributes.has_key?(:'EmergencyContactInfoEmail')
|
396
|
+
self.emergency_contact_info_email = attributes[:'EmergencyContactInfoEmail']
|
397
|
+
end
|
398
|
+
|
399
|
+
if attributes.has_key?(:'EmergencyContactInfoName')
|
400
|
+
self.emergency_contact_info_name = attributes[:'EmergencyContactInfoName']
|
401
|
+
end
|
402
|
+
|
403
|
+
if attributes.has_key?(:'EmergencyContactInfoPhone')
|
404
|
+
self.emergency_contact_info_phone = attributes[:'EmergencyContactInfoPhone']
|
405
|
+
end
|
406
|
+
|
407
|
+
if attributes.has_key?(:'EmergencyContactInfoRelationship')
|
408
|
+
self.emergency_contact_info_relationship = attributes[:'EmergencyContactInfoRelationship']
|
409
|
+
end
|
410
|
+
|
411
|
+
if attributes.has_key?(:'FirstAppointmentDate')
|
412
|
+
self.first_appointment_date = attributes[:'FirstAppointmentDate']
|
413
|
+
end
|
414
|
+
|
415
|
+
if attributes.has_key?(:'FirstName')
|
416
|
+
self.first_name = attributes[:'FirstName']
|
417
|
+
end
|
418
|
+
|
419
|
+
if attributes.has_key?(:'Gender')
|
420
|
+
self.gender = attributes[:'Gender']
|
421
|
+
end
|
422
|
+
|
423
|
+
if attributes.has_key?(:'HomeLocation')
|
424
|
+
self.home_location = attributes[:'HomeLocation']
|
425
|
+
end
|
426
|
+
|
427
|
+
if attributes.has_key?(:'HomePhone')
|
428
|
+
self.home_phone = attributes[:'HomePhone']
|
429
|
+
end
|
430
|
+
|
431
|
+
if attributes.has_key?(:'IsCompany')
|
432
|
+
self.is_company = attributes[:'IsCompany']
|
433
|
+
end
|
434
|
+
|
435
|
+
if attributes.has_key?(:'IsProspect')
|
436
|
+
self.is_prospect = attributes[:'IsProspect']
|
437
|
+
end
|
438
|
+
|
439
|
+
if attributes.has_key?(:'LastFormulaNotes')
|
440
|
+
self.last_formula_notes = attributes[:'LastFormulaNotes']
|
441
|
+
end
|
442
|
+
|
443
|
+
if attributes.has_key?(:'LastModifiedDateTime')
|
444
|
+
self.last_modified_date_time = attributes[:'LastModifiedDateTime']
|
445
|
+
end
|
446
|
+
|
447
|
+
if attributes.has_key?(:'LastName')
|
448
|
+
self.last_name = attributes[:'LastName']
|
449
|
+
end
|
450
|
+
|
451
|
+
if attributes.has_key?(:'Liability')
|
452
|
+
self.liability = attributes[:'Liability']
|
453
|
+
end
|
454
|
+
|
455
|
+
if attributes.has_key?(:'LiabilityRelease')
|
456
|
+
self.liability_release = attributes[:'LiabilityRelease']
|
457
|
+
end
|
458
|
+
|
459
|
+
if attributes.has_key?(:'MembershipIcon')
|
460
|
+
self.membership_icon = attributes[:'MembershipIcon']
|
461
|
+
end
|
462
|
+
|
463
|
+
if attributes.has_key?(:'MiddleName')
|
464
|
+
self.middle_name = attributes[:'MiddleName']
|
465
|
+
end
|
466
|
+
|
467
|
+
if attributes.has_key?(:'MobilePhone')
|
468
|
+
self.mobile_phone = attributes[:'MobilePhone']
|
469
|
+
end
|
470
|
+
|
471
|
+
if attributes.has_key?(:'MobileProvider')
|
472
|
+
self.mobile_provider = attributes[:'MobileProvider']
|
473
|
+
end
|
474
|
+
|
475
|
+
if attributes.has_key?(:'NewId')
|
476
|
+
self.new_id = attributes[:'NewId']
|
477
|
+
end
|
478
|
+
|
479
|
+
if attributes.has_key?(:'Notes')
|
480
|
+
self.notes = attributes[:'Notes']
|
481
|
+
end
|
482
|
+
|
483
|
+
if attributes.has_key?(:'PhotoUrl')
|
484
|
+
self.photo_url = attributes[:'PhotoUrl']
|
485
|
+
end
|
486
|
+
|
487
|
+
if attributes.has_key?(:'PostalCode')
|
488
|
+
self.postal_code = attributes[:'PostalCode']
|
489
|
+
end
|
490
|
+
|
491
|
+
if attributes.has_key?(:'ProspectStage')
|
492
|
+
self.prospect_stage = attributes[:'ProspectStage']
|
493
|
+
end
|
494
|
+
|
495
|
+
if attributes.has_key?(:'RedAlert')
|
496
|
+
self.red_alert = attributes[:'RedAlert']
|
497
|
+
end
|
498
|
+
|
499
|
+
if attributes.has_key?(:'ReferredBy')
|
500
|
+
self.referred_by = attributes[:'ReferredBy']
|
501
|
+
end
|
502
|
+
|
503
|
+
if attributes.has_key?(:'SalesReps')
|
504
|
+
if (value = attributes[:'SalesReps']).is_a?(Array)
|
505
|
+
self.sales_reps = value
|
506
|
+
end
|
507
|
+
end
|
508
|
+
|
509
|
+
if attributes.has_key?(:'SiteId')
|
510
|
+
self.site_id = attributes[:'SiteId']
|
511
|
+
end
|
512
|
+
|
513
|
+
if attributes.has_key?(:'State')
|
514
|
+
self.state = attributes[:'State']
|
515
|
+
end
|
516
|
+
|
517
|
+
if attributes.has_key?(:'Status')
|
518
|
+
self.status = attributes[:'Status']
|
519
|
+
end
|
520
|
+
|
521
|
+
if attributes.has_key?(:'Test')
|
522
|
+
self.test = attributes[:'Test']
|
523
|
+
end
|
524
|
+
|
525
|
+
if attributes.has_key?(:'UniqueId')
|
526
|
+
self.unique_id = attributes[:'UniqueId']
|
527
|
+
end
|
528
|
+
|
529
|
+
if attributes.has_key?(:'WorkExtension')
|
530
|
+
self.work_extension = attributes[:'WorkExtension']
|
531
|
+
end
|
532
|
+
|
533
|
+
if attributes.has_key?(:'WorkPhone')
|
534
|
+
self.work_phone = attributes[:'WorkPhone']
|
535
|
+
end
|
536
|
+
|
537
|
+
if attributes.has_key?(:'YellowAlert')
|
538
|
+
self.yellow_alert = attributes[:'YellowAlert']
|
539
|
+
end
|
540
|
+
|
541
|
+
if attributes.has_key?(:'SendScheduleEmails')
|
542
|
+
self.send_schedule_emails = attributes[:'SendScheduleEmails']
|
543
|
+
end
|
544
|
+
|
545
|
+
if attributes.has_key?(:'SendAccountEmails')
|
546
|
+
self.send_account_emails = attributes[:'SendAccountEmails']
|
547
|
+
end
|
548
|
+
|
549
|
+
if attributes.has_key?(:'SendPromotionalEmails')
|
550
|
+
self.send_promotional_emails = attributes[:'SendPromotionalEmails']
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
555
|
+
# @return Array for valid properties with the reasons
|
556
|
+
def list_invalid_properties
|
557
|
+
invalid_properties = Array.new
|
558
|
+
if @first_name.nil?
|
559
|
+
invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
|
560
|
+
end
|
561
|
+
|
562
|
+
if @last_name.nil?
|
563
|
+
invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
|
564
|
+
end
|
565
|
+
|
566
|
+
invalid_properties
|
567
|
+
end
|
568
|
+
|
569
|
+
# Check to see if the all the properties in the model are valid
|
570
|
+
# @return true if the model is valid
|
571
|
+
def valid?
|
572
|
+
action_validator = EnumAttributeValidator.new('String', ['None', 'Added', 'Updated', 'Failed', 'Removed'])
|
573
|
+
return false unless action_validator.valid?(@action)
|
574
|
+
return false if @first_name.nil?
|
575
|
+
return false if @last_name.nil?
|
576
|
+
true
|
577
|
+
end
|
578
|
+
|
579
|
+
# Custom attribute writer method checking allowed values (enum).
|
580
|
+
# @param [Object] action Object to be assigned
|
581
|
+
def action=(action)
|
582
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Added', 'Updated', 'Failed', 'Removed'])
|
583
|
+
unless validator.valid?(action)
|
584
|
+
fail ArgumentError, 'invalid value for "action", must be one of #{validator.allowable_values}.'
|
585
|
+
end
|
586
|
+
@action = action
|
587
|
+
end
|
588
|
+
|
589
|
+
# Checks equality by comparing each attribute.
|
590
|
+
# @param [Object] Object to be compared
|
591
|
+
def ==(o)
|
592
|
+
return true if self.equal?(o)
|
593
|
+
self.class == o.class &&
|
594
|
+
account_balance == o.account_balance &&
|
595
|
+
action == o.action &&
|
596
|
+
active == o.active &&
|
597
|
+
address_line1 == o.address_line1 &&
|
598
|
+
address_line2 == o.address_line2 &&
|
599
|
+
appt_gender_pref_male == o.appt_gender_pref_male &&
|
600
|
+
birth_date == o.birth_date &&
|
601
|
+
city == o.city &&
|
602
|
+
client_credit_card == o.client_credit_card &&
|
603
|
+
client_indexes == o.client_indexes &&
|
604
|
+
client_relationships == o.client_relationships &&
|
605
|
+
country == o.country &&
|
606
|
+
creation_date == o.creation_date &&
|
607
|
+
custom_client_fields == o.custom_client_fields &&
|
608
|
+
email == o.email &&
|
609
|
+
emergency_contact_info_email == o.emergency_contact_info_email &&
|
610
|
+
emergency_contact_info_name == o.emergency_contact_info_name &&
|
611
|
+
emergency_contact_info_phone == o.emergency_contact_info_phone &&
|
612
|
+
emergency_contact_info_relationship == o.emergency_contact_info_relationship &&
|
613
|
+
first_appointment_date == o.first_appointment_date &&
|
614
|
+
first_name == o.first_name &&
|
615
|
+
gender == o.gender &&
|
616
|
+
home_location == o.home_location &&
|
617
|
+
home_phone == o.home_phone &&
|
618
|
+
is_company == o.is_company &&
|
619
|
+
is_prospect == o.is_prospect &&
|
620
|
+
last_formula_notes == o.last_formula_notes &&
|
621
|
+
last_modified_date_time == o.last_modified_date_time &&
|
622
|
+
last_name == o.last_name &&
|
623
|
+
liability == o.liability &&
|
624
|
+
liability_release == o.liability_release &&
|
625
|
+
membership_icon == o.membership_icon &&
|
626
|
+
middle_name == o.middle_name &&
|
627
|
+
mobile_phone == o.mobile_phone &&
|
628
|
+
mobile_provider == o.mobile_provider &&
|
629
|
+
new_id == o.new_id &&
|
630
|
+
notes == o.notes &&
|
631
|
+
photo_url == o.photo_url &&
|
632
|
+
postal_code == o.postal_code &&
|
633
|
+
prospect_stage == o.prospect_stage &&
|
634
|
+
red_alert == o.red_alert &&
|
635
|
+
referred_by == o.referred_by &&
|
636
|
+
sales_reps == o.sales_reps &&
|
637
|
+
site_id == o.site_id &&
|
638
|
+
state == o.state &&
|
639
|
+
status == o.status &&
|
640
|
+
test == o.test &&
|
641
|
+
unique_id == o.unique_id &&
|
642
|
+
work_extension == o.work_extension &&
|
643
|
+
work_phone == o.work_phone &&
|
644
|
+
yellow_alert == o.yellow_alert &&
|
645
|
+
send_schedule_emails == o.send_schedule_emails &&
|
646
|
+
send_account_emails == o.send_account_emails &&
|
647
|
+
send_promotional_emails == o.send_promotional_emails
|
648
|
+
end
|
649
|
+
|
650
|
+
# @see the `==` method
|
651
|
+
# @param [Object] Object to be compared
|
652
|
+
def eql?(o)
|
653
|
+
self == o
|
654
|
+
end
|
655
|
+
|
656
|
+
# Calculates hash code according to all attributes.
|
657
|
+
# @return [Fixnum] Hash code
|
658
|
+
def hash
|
659
|
+
[account_balance, action, active, address_line1, address_line2, appt_gender_pref_male, birth_date, city, client_credit_card, client_indexes, client_relationships, country, creation_date, custom_client_fields, email, emergency_contact_info_email, emergency_contact_info_name, emergency_contact_info_phone, emergency_contact_info_relationship, first_appointment_date, first_name, gender, home_location, home_phone, is_company, is_prospect, last_formula_notes, last_modified_date_time, last_name, liability, liability_release, membership_icon, middle_name, mobile_phone, mobile_provider, new_id, notes, photo_url, postal_code, prospect_stage, red_alert, referred_by, sales_reps, site_id, state, status, test, unique_id, work_extension, work_phone, yellow_alert, send_schedule_emails, send_account_emails, send_promotional_emails].hash
|
660
|
+
end
|
661
|
+
|
662
|
+
# Builds the object from hash
|
663
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
664
|
+
# @return [Object] Returns the model itself
|
665
|
+
def build_from_hash(attributes)
|
666
|
+
return nil unless attributes.is_a?(Hash)
|
667
|
+
self.class.swagger_types.each_pair do |key, type|
|
668
|
+
if type =~ /\AArray<(.*)>/i
|
669
|
+
# check to ensure the input is an array given that the the attribute
|
670
|
+
# is documented as an array but the input is not
|
671
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
672
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
673
|
+
end
|
674
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
675
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
676
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
677
|
+
end
|
678
|
+
|
679
|
+
self
|
680
|
+
end
|
681
|
+
|
682
|
+
# Deserializes the data based on type
|
683
|
+
# @param string type Data type
|
684
|
+
# @param string value Value to be deserialized
|
685
|
+
# @return [Object] Deserialized data
|
686
|
+
def _deserialize(type, value)
|
687
|
+
case type.to_sym
|
688
|
+
when :DateTime
|
689
|
+
DateTime.parse(value)
|
690
|
+
when :Date
|
691
|
+
Date.parse(value)
|
692
|
+
when :String
|
693
|
+
value.to_s
|
694
|
+
when :Integer
|
695
|
+
value.to_i
|
696
|
+
when :Float
|
697
|
+
value.to_f
|
698
|
+
when :BOOLEAN
|
699
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
700
|
+
true
|
701
|
+
else
|
702
|
+
false
|
703
|
+
end
|
704
|
+
when :Object
|
705
|
+
# generic object (usually a Hash), return directly
|
706
|
+
value
|
707
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
708
|
+
inner_type = Regexp.last_match[:inner_type]
|
709
|
+
value.map { |v| _deserialize(inner_type, v) }
|
710
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
711
|
+
k_type = Regexp.last_match[:k_type]
|
712
|
+
v_type = Regexp.last_match[:v_type]
|
713
|
+
{}.tap do |hash|
|
714
|
+
value.each do |k, v|
|
715
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
else # model
|
719
|
+
temp_model = SwaggerClient.const_get(type).new
|
720
|
+
temp_model.build_from_hash(value)
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
# Returns the string representation of the object
|
725
|
+
# @return [String] String presentation of the object
|
726
|
+
def to_s
|
727
|
+
to_hash.to_s
|
728
|
+
end
|
729
|
+
|
730
|
+
# to_body is an alias to to_hash (backward compatibility)
|
731
|
+
# @return [Hash] Returns the object in the form of hash
|
732
|
+
def to_body
|
733
|
+
to_hash
|
734
|
+
end
|
735
|
+
|
736
|
+
# Returns the object in the form of hash
|
737
|
+
# @return [Hash] Returns the object in the form of hash
|
738
|
+
def to_hash
|
739
|
+
hash = {}
|
740
|
+
self.class.attribute_map.each_pair do |attr, param|
|
741
|
+
value = self.send(attr)
|
742
|
+
next if value.nil?
|
743
|
+
hash[param] = _to_hash(value)
|
744
|
+
end
|
745
|
+
hash
|
746
|
+
end
|
747
|
+
|
748
|
+
# Outputs non-array value in the form of hash
|
749
|
+
# For object, use to_hash. Otherwise, just return the value
|
750
|
+
# @param [Object] value Any valid value
|
751
|
+
# @return [Hash] Returns the value in the form of hash
|
752
|
+
def _to_hash(value)
|
753
|
+
if value.is_a?(Array)
|
754
|
+
value.compact.map { |v| _to_hash(v) }
|
755
|
+
elsif value.is_a?(Hash)
|
756
|
+
{}.tap do |hash|
|
757
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
758
|
+
end
|
759
|
+
elsif value.respond_to? :to_hash
|
760
|
+
value.to_hash
|
761
|
+
else
|
762
|
+
value
|
763
|
+
end
|
764
|
+
end
|
765
|
+
end
|
766
|
+
end
|