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,185 @@
|
|
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
|
+
# A contact log subtype.
|
17
|
+
class ContactLogSubType
|
18
|
+
# The contact log subtype’s ID.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'id' => :'Id'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'id' => :'Integer'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
|
+
|
43
|
+
if attributes.has_key?(:'Id')
|
44
|
+
self.id = attributes[:'Id']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Checks equality by comparing each attribute.
|
62
|
+
# @param [Object] Object to be compared
|
63
|
+
def ==(o)
|
64
|
+
return true if self.equal?(o)
|
65
|
+
self.class == o.class &&
|
66
|
+
id == o.id
|
67
|
+
end
|
68
|
+
|
69
|
+
# @see the `==` method
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def eql?(o)
|
72
|
+
self == o
|
73
|
+
end
|
74
|
+
|
75
|
+
# Calculates hash code according to all attributes.
|
76
|
+
# @return [Fixnum] Hash code
|
77
|
+
def hash
|
78
|
+
[id].hash
|
79
|
+
end
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def build_from_hash(attributes)
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
88
|
+
# check to ensure the input is an array given that the the attribute
|
89
|
+
# is documented as an array but the input is not
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
92
|
+
end
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
96
|
+
end
|
97
|
+
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
# Deserializes the data based on type
|
102
|
+
# @param string type Data type
|
103
|
+
# @param string value Value to be deserialized
|
104
|
+
# @return [Object] Deserialized data
|
105
|
+
def _deserialize(type, value)
|
106
|
+
case type.to_sym
|
107
|
+
when :DateTime
|
108
|
+
DateTime.parse(value)
|
109
|
+
when :Date
|
110
|
+
Date.parse(value)
|
111
|
+
when :String
|
112
|
+
value.to_s
|
113
|
+
when :Integer
|
114
|
+
value.to_i
|
115
|
+
when :Float
|
116
|
+
value.to_f
|
117
|
+
when :BOOLEAN
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
119
|
+
true
|
120
|
+
else
|
121
|
+
false
|
122
|
+
end
|
123
|
+
when :Object
|
124
|
+
# generic object (usually a Hash), return directly
|
125
|
+
value
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
132
|
+
{}.tap do |hash|
|
133
|
+
value.each do |k, v|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
else # model
|
138
|
+
temp_model = SwaggerClient.const_get(type).new
|
139
|
+
temp_model.build_from_hash(value)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the string representation of the object
|
144
|
+
# @return [String] String presentation of the object
|
145
|
+
def to_s
|
146
|
+
to_hash.to_s
|
147
|
+
end
|
148
|
+
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
151
|
+
def to_body
|
152
|
+
to_hash
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the object in the form of hash
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_hash
|
158
|
+
hash = {}
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
160
|
+
value = self.send(attr)
|
161
|
+
next if value.nil?
|
162
|
+
hash[param] = _to_hash(value)
|
163
|
+
end
|
164
|
+
hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Outputs non-array value in the form of hash
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
169
|
+
# @param [Object] value Any valid value
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
171
|
+
def _to_hash(value)
|
172
|
+
if value.is_a?(Array)
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
174
|
+
elsif value.is_a?(Hash)
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
177
|
+
end
|
178
|
+
elsif value.respond_to? :to_hash
|
179
|
+
value.to_hash
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,197 @@
|
|
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
|
+
# A contact log type.
|
17
|
+
class ContactLogType
|
18
|
+
# The contact log type’s ID.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# A list of the subtypes being used to tag this contact log type.
|
22
|
+
attr_accessor :sub_types
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'id' => :'Id',
|
28
|
+
:'sub_types' => :'SubTypes'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'id' => :'Integer',
|
36
|
+
:'sub_types' => :'Array<ContactLogSubType>'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'Id')
|
49
|
+
self.id = attributes[:'Id']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'SubTypes')
|
53
|
+
if (value = attributes[:'SubTypes']).is_a?(Array)
|
54
|
+
self.sub_types = value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
invalid_properties
|
64
|
+
end
|
65
|
+
|
66
|
+
# Check to see if the all the properties in the model are valid
|
67
|
+
# @return true if the model is valid
|
68
|
+
def valid?
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
72
|
+
# Checks equality by comparing each attribute.
|
73
|
+
# @param [Object] Object to be compared
|
74
|
+
def ==(o)
|
75
|
+
return true if self.equal?(o)
|
76
|
+
self.class == o.class &&
|
77
|
+
id == o.id &&
|
78
|
+
sub_types == o.sub_types
|
79
|
+
end
|
80
|
+
|
81
|
+
# @see the `==` method
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def eql?(o)
|
84
|
+
self == o
|
85
|
+
end
|
86
|
+
|
87
|
+
# Calculates hash code according to all attributes.
|
88
|
+
# @return [Fixnum] Hash code
|
89
|
+
def hash
|
90
|
+
[id, sub_types].hash
|
91
|
+
end
|
92
|
+
|
93
|
+
# Builds the object from hash
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
+
# @return [Object] Returns the model itself
|
96
|
+
def build_from_hash(attributes)
|
97
|
+
return nil unless attributes.is_a?(Hash)
|
98
|
+
self.class.swagger_types.each_pair do |key, type|
|
99
|
+
if type =~ /\AArray<(.*)>/i
|
100
|
+
# check to ensure the input is an array given that the the attribute
|
101
|
+
# is documented as an array but the input is not
|
102
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
104
|
+
end
|
105
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
106
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
107
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
108
|
+
end
|
109
|
+
|
110
|
+
self
|
111
|
+
end
|
112
|
+
|
113
|
+
# Deserializes the data based on type
|
114
|
+
# @param string type Data type
|
115
|
+
# @param string value Value to be deserialized
|
116
|
+
# @return [Object] Deserialized data
|
117
|
+
def _deserialize(type, value)
|
118
|
+
case type.to_sym
|
119
|
+
when :DateTime
|
120
|
+
DateTime.parse(value)
|
121
|
+
when :Date
|
122
|
+
Date.parse(value)
|
123
|
+
when :String
|
124
|
+
value.to_s
|
125
|
+
when :Integer
|
126
|
+
value.to_i
|
127
|
+
when :Float
|
128
|
+
value.to_f
|
129
|
+
when :BOOLEAN
|
130
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
131
|
+
true
|
132
|
+
else
|
133
|
+
false
|
134
|
+
end
|
135
|
+
when :Object
|
136
|
+
# generic object (usually a Hash), return directly
|
137
|
+
value
|
138
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
139
|
+
inner_type = Regexp.last_match[:inner_type]
|
140
|
+
value.map { |v| _deserialize(inner_type, v) }
|
141
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
142
|
+
k_type = Regexp.last_match[:k_type]
|
143
|
+
v_type = Regexp.last_match[:v_type]
|
144
|
+
{}.tap do |hash|
|
145
|
+
value.each do |k, v|
|
146
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
else # model
|
150
|
+
temp_model = SwaggerClient.const_get(type).new
|
151
|
+
temp_model.build_from_hash(value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the string representation of the object
|
156
|
+
# @return [String] String presentation of the object
|
157
|
+
def to_s
|
158
|
+
to_hash.to_s
|
159
|
+
end
|
160
|
+
|
161
|
+
# to_body is an alias to to_hash (backward compatibility)
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_body
|
164
|
+
to_hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the object in the form of hash
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_hash
|
170
|
+
hash = {}
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
172
|
+
value = self.send(attr)
|
173
|
+
next if value.nil?
|
174
|
+
hash[param] = _to_hash(value)
|
175
|
+
end
|
176
|
+
hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Outputs non-array value in the form of hash
|
180
|
+
# For object, use to_hash. Otherwise, just return the value
|
181
|
+
# @param [Object] value Any valid value
|
182
|
+
# @return [Hash] Returns the value in the form of hash
|
183
|
+
def _to_hash(value)
|
184
|
+
if value.is_a?(Array)
|
185
|
+
value.compact.map { |v| _to_hash(v) }
|
186
|
+
elsif value.is_a?(Hash)
|
187
|
+
{}.tap do |hash|
|
188
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
189
|
+
end
|
190
|
+
elsif value.respond_to? :to_hash
|
191
|
+
value.to_hash
|
192
|
+
else
|
193
|
+
value
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
@@ -0,0 +1,522 @@
|
|
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 Contract
|
17
|
+
# The contract’s ID at the subscriber’s business.
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# The name of the contract.
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# A description of the contract.
|
24
|
+
attr_accessor :description
|
25
|
+
|
26
|
+
# The ID of the membership that was assigned to the client when the client signed up for a contract.
|
27
|
+
attr_accessor :assigns_membership_id
|
28
|
+
|
29
|
+
# The name of the membership that was assigned to the client when the client signed up for this contract.
|
30
|
+
attr_accessor :assigns_membership_name
|
31
|
+
|
32
|
+
# When `true`, indicates that this membership is intended to be shown to clients in client experiences.<br /> When `false`, this contract should only be shown to staff members.
|
33
|
+
attr_accessor :sold_online
|
34
|
+
|
35
|
+
# Contains information about the items in the contract.
|
36
|
+
attr_accessor :contract_items
|
37
|
+
|
38
|
+
# Defines whether this contract is treated as an introductory offer. If this is an introductory offer, then clients are always charged a set number of times rather than month to month, using their AutoPays. Possible values are: * None * NewConsumer * NewAndReturningConsumer
|
39
|
+
attr_accessor :intro_offer
|
40
|
+
|
41
|
+
# Contains information about the AutoPay schedule. This parameter is null if `AutopayTriggerType` has a value of `PricingOptionRunsOutOrExpires`.
|
42
|
+
attr_accessor :autopay_schedule
|
43
|
+
|
44
|
+
# The number of times that the AutoPay is to be run. This value is null if `FrequencyType` is `MonthToMonth`.
|
45
|
+
attr_accessor :number_of_autopays
|
46
|
+
|
47
|
+
# Defines whether the AutoPay, if applicable to this contract, runs on a set schedule or when the pricing option runs out or expires. Possible values are: * OnSetSchedule * PricingOptionRunsOutOrExpires
|
48
|
+
attr_accessor :autopay_trigger_type
|
49
|
+
|
50
|
+
# The renewal action to be taken when this AutoPay is completed. Possible values are: * ContractExpires * ContractAutomaticallyRenews
|
51
|
+
attr_accessor :action_upon_completion_of_autopays
|
52
|
+
|
53
|
+
# The value that indicates when clients are charged. Possible values are: * OnSaleDate * FirstOfTheMonth * FifteenthOfTheMonth * LastDayOfTheMonth * FirstOrFifteenthOfTheMonth * FirstOrSixteenthOfTheMonth * FifteenthOrEndOfTheMonth * SpecificDate
|
54
|
+
attr_accessor :clients_charged_on
|
55
|
+
|
56
|
+
# If `ClientsChargedOn` is defined as a specific date, this property holds the value of that date. Otherwise, this property is null.
|
57
|
+
attr_accessor :clients_charged_on_specific_date
|
58
|
+
|
59
|
+
# The calculated discount applied to the items in this contract.
|
60
|
+
attr_accessor :discount_amount
|
61
|
+
|
62
|
+
# The amount of the deposit required for this contract.
|
63
|
+
attr_accessor :deposit_amount
|
64
|
+
|
65
|
+
# When `true`, indicates that the first payment for the AutoPay is free.
|
66
|
+
attr_accessor :first_autopay_free
|
67
|
+
|
68
|
+
# When `true`, indicates that the last payment for the AutoPay is free.
|
69
|
+
attr_accessor :last_autopay_free
|
70
|
+
|
71
|
+
# When `true`, indicates that the client can terminate this contract on the Internet.
|
72
|
+
attr_accessor :client_terminate_online
|
73
|
+
|
74
|
+
# Contains information about the memberships that can purchase this contract. If null, then no membership restrictions exist, and anyone can purchase the contract.
|
75
|
+
attr_accessor :membership_type_restrictions
|
76
|
+
|
77
|
+
# The IDs of the locations where this contract may be sold. If there are no restrictions, this value is null.
|
78
|
+
attr_accessor :location_purchase_restriction_ids
|
79
|
+
|
80
|
+
# Location names where the contract may be purchased. If this value is null, there are no restrictions.
|
81
|
+
attr_accessor :location_purchase_restriction_names
|
82
|
+
|
83
|
+
# Business-defined terms and conditions for the contract.
|
84
|
+
attr_accessor :agreement_terms
|
85
|
+
|
86
|
+
# When `true`, clients who purchase the contract are prompted to agree to the terms of the contract the next time that they log in.
|
87
|
+
attr_accessor :requires_electronic_confirmation
|
88
|
+
|
89
|
+
# When `true`, this contract establishes an AutoPay on the client’s account.
|
90
|
+
attr_accessor :autopay_enabled
|
91
|
+
|
92
|
+
# The subtotal of the amount that the client is to be charged when signing up for the contract.
|
93
|
+
attr_accessor :first_payment_amount_subtotal
|
94
|
+
|
95
|
+
# The amount of tax that the client is to be charged when signing up for the contract.
|
96
|
+
attr_accessor :first_payment_amount_tax
|
97
|
+
|
98
|
+
# The total amount that the client is to be charged when signing up for the contract.
|
99
|
+
attr_accessor :first_payment_amount_total
|
100
|
+
|
101
|
+
# The subtotal amount that the client is to be charged on an ongoing basis.
|
102
|
+
attr_accessor :recurring_payment_amount_subtotal
|
103
|
+
|
104
|
+
# The amount of tax the client is to be charged on an ongoing basis.
|
105
|
+
attr_accessor :recurring_payment_amount_tax
|
106
|
+
|
107
|
+
# The total amount that the client is to be charged on an ongoing basis.
|
108
|
+
attr_accessor :recurring_payment_amount_total
|
109
|
+
|
110
|
+
# The subtotal amount that the client is to be charged over the lifespan of the contract.
|
111
|
+
attr_accessor :total_contract_amount_subtotal
|
112
|
+
|
113
|
+
# The total amount of tax the client is to be charged over the lifespan of the contract.
|
114
|
+
attr_accessor :total_contract_amount_tax
|
115
|
+
|
116
|
+
# The total amount the client is to be charged over the lifespan of the contract.
|
117
|
+
attr_accessor :total_contract_amount_total
|
118
|
+
|
119
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
120
|
+
def self.attribute_map
|
121
|
+
{
|
122
|
+
:'id' => :'Id',
|
123
|
+
:'name' => :'Name',
|
124
|
+
:'description' => :'Description',
|
125
|
+
:'assigns_membership_id' => :'AssignsMembershipId',
|
126
|
+
:'assigns_membership_name' => :'AssignsMembershipName',
|
127
|
+
:'sold_online' => :'SoldOnline',
|
128
|
+
:'contract_items' => :'ContractItems',
|
129
|
+
:'intro_offer' => :'IntroOffer',
|
130
|
+
:'autopay_schedule' => :'AutopaySchedule',
|
131
|
+
:'number_of_autopays' => :'NumberOfAutopays',
|
132
|
+
:'autopay_trigger_type' => :'AutopayTriggerType',
|
133
|
+
:'action_upon_completion_of_autopays' => :'ActionUponCompletionOfAutopays',
|
134
|
+
:'clients_charged_on' => :'ClientsChargedOn',
|
135
|
+
:'clients_charged_on_specific_date' => :'ClientsChargedOnSpecificDate',
|
136
|
+
:'discount_amount' => :'DiscountAmount',
|
137
|
+
:'deposit_amount' => :'DepositAmount',
|
138
|
+
:'first_autopay_free' => :'FirstAutopayFree',
|
139
|
+
:'last_autopay_free' => :'LastAutopayFree',
|
140
|
+
:'client_terminate_online' => :'ClientTerminateOnline',
|
141
|
+
:'membership_type_restrictions' => :'MembershipTypeRestrictions',
|
142
|
+
:'location_purchase_restriction_ids' => :'LocationPurchaseRestrictionIds',
|
143
|
+
:'location_purchase_restriction_names' => :'LocationPurchaseRestrictionNames',
|
144
|
+
:'agreement_terms' => :'AgreementTerms',
|
145
|
+
:'requires_electronic_confirmation' => :'RequiresElectronicConfirmation',
|
146
|
+
:'autopay_enabled' => :'AutopayEnabled',
|
147
|
+
:'first_payment_amount_subtotal' => :'FirstPaymentAmountSubtotal',
|
148
|
+
:'first_payment_amount_tax' => :'FirstPaymentAmountTax',
|
149
|
+
:'first_payment_amount_total' => :'FirstPaymentAmountTotal',
|
150
|
+
:'recurring_payment_amount_subtotal' => :'RecurringPaymentAmountSubtotal',
|
151
|
+
:'recurring_payment_amount_tax' => :'RecurringPaymentAmountTax',
|
152
|
+
:'recurring_payment_amount_total' => :'RecurringPaymentAmountTotal',
|
153
|
+
:'total_contract_amount_subtotal' => :'TotalContractAmountSubtotal',
|
154
|
+
:'total_contract_amount_tax' => :'TotalContractAmountTax',
|
155
|
+
:'total_contract_amount_total' => :'TotalContractAmountTotal'
|
156
|
+
}
|
157
|
+
end
|
158
|
+
|
159
|
+
# Attribute type mapping.
|
160
|
+
def self.swagger_types
|
161
|
+
{
|
162
|
+
:'id' => :'Integer',
|
163
|
+
:'name' => :'String',
|
164
|
+
:'description' => :'String',
|
165
|
+
:'assigns_membership_id' => :'Integer',
|
166
|
+
:'assigns_membership_name' => :'String',
|
167
|
+
:'sold_online' => :'BOOLEAN',
|
168
|
+
:'contract_items' => :'Array<ContractItem>',
|
169
|
+
:'intro_offer' => :'String',
|
170
|
+
:'autopay_schedule' => :'AutopaySchedule',
|
171
|
+
:'number_of_autopays' => :'Integer',
|
172
|
+
:'autopay_trigger_type' => :'String',
|
173
|
+
:'action_upon_completion_of_autopays' => :'String',
|
174
|
+
:'clients_charged_on' => :'String',
|
175
|
+
:'clients_charged_on_specific_date' => :'DateTime',
|
176
|
+
:'discount_amount' => :'Float',
|
177
|
+
:'deposit_amount' => :'Float',
|
178
|
+
:'first_autopay_free' => :'BOOLEAN',
|
179
|
+
:'last_autopay_free' => :'BOOLEAN',
|
180
|
+
:'client_terminate_online' => :'BOOLEAN',
|
181
|
+
:'membership_type_restrictions' => :'Array<MembershipTypeRestriction>',
|
182
|
+
:'location_purchase_restriction_ids' => :'Array<Integer>',
|
183
|
+
:'location_purchase_restriction_names' => :'Array<String>',
|
184
|
+
:'agreement_terms' => :'String',
|
185
|
+
:'requires_electronic_confirmation' => :'BOOLEAN',
|
186
|
+
:'autopay_enabled' => :'BOOLEAN',
|
187
|
+
:'first_payment_amount_subtotal' => :'Float',
|
188
|
+
:'first_payment_amount_tax' => :'Float',
|
189
|
+
:'first_payment_amount_total' => :'Float',
|
190
|
+
:'recurring_payment_amount_subtotal' => :'Float',
|
191
|
+
:'recurring_payment_amount_tax' => :'Float',
|
192
|
+
:'recurring_payment_amount_total' => :'Float',
|
193
|
+
:'total_contract_amount_subtotal' => :'Float',
|
194
|
+
:'total_contract_amount_tax' => :'Float',
|
195
|
+
:'total_contract_amount_total' => :'Float'
|
196
|
+
}
|
197
|
+
end
|
198
|
+
|
199
|
+
# Initializes the object
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
+
def initialize(attributes = {})
|
202
|
+
return unless attributes.is_a?(Hash)
|
203
|
+
|
204
|
+
# convert string to symbol for hash key
|
205
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
206
|
+
|
207
|
+
if attributes.has_key?(:'Id')
|
208
|
+
self.id = attributes[:'Id']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.has_key?(:'Name')
|
212
|
+
self.name = attributes[:'Name']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.has_key?(:'Description')
|
216
|
+
self.description = attributes[:'Description']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.has_key?(:'AssignsMembershipId')
|
220
|
+
self.assigns_membership_id = attributes[:'AssignsMembershipId']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.has_key?(:'AssignsMembershipName')
|
224
|
+
self.assigns_membership_name = attributes[:'AssignsMembershipName']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.has_key?(:'SoldOnline')
|
228
|
+
self.sold_online = attributes[:'SoldOnline']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.has_key?(:'ContractItems')
|
232
|
+
if (value = attributes[:'ContractItems']).is_a?(Array)
|
233
|
+
self.contract_items = value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
if attributes.has_key?(:'IntroOffer')
|
238
|
+
self.intro_offer = attributes[:'IntroOffer']
|
239
|
+
end
|
240
|
+
|
241
|
+
if attributes.has_key?(:'AutopaySchedule')
|
242
|
+
self.autopay_schedule = attributes[:'AutopaySchedule']
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.has_key?(:'NumberOfAutopays')
|
246
|
+
self.number_of_autopays = attributes[:'NumberOfAutopays']
|
247
|
+
end
|
248
|
+
|
249
|
+
if attributes.has_key?(:'AutopayTriggerType')
|
250
|
+
self.autopay_trigger_type = attributes[:'AutopayTriggerType']
|
251
|
+
end
|
252
|
+
|
253
|
+
if attributes.has_key?(:'ActionUponCompletionOfAutopays')
|
254
|
+
self.action_upon_completion_of_autopays = attributes[:'ActionUponCompletionOfAutopays']
|
255
|
+
end
|
256
|
+
|
257
|
+
if attributes.has_key?(:'ClientsChargedOn')
|
258
|
+
self.clients_charged_on = attributes[:'ClientsChargedOn']
|
259
|
+
end
|
260
|
+
|
261
|
+
if attributes.has_key?(:'ClientsChargedOnSpecificDate')
|
262
|
+
self.clients_charged_on_specific_date = attributes[:'ClientsChargedOnSpecificDate']
|
263
|
+
end
|
264
|
+
|
265
|
+
if attributes.has_key?(:'DiscountAmount')
|
266
|
+
self.discount_amount = attributes[:'DiscountAmount']
|
267
|
+
end
|
268
|
+
|
269
|
+
if attributes.has_key?(:'DepositAmount')
|
270
|
+
self.deposit_amount = attributes[:'DepositAmount']
|
271
|
+
end
|
272
|
+
|
273
|
+
if attributes.has_key?(:'FirstAutopayFree')
|
274
|
+
self.first_autopay_free = attributes[:'FirstAutopayFree']
|
275
|
+
end
|
276
|
+
|
277
|
+
if attributes.has_key?(:'LastAutopayFree')
|
278
|
+
self.last_autopay_free = attributes[:'LastAutopayFree']
|
279
|
+
end
|
280
|
+
|
281
|
+
if attributes.has_key?(:'ClientTerminateOnline')
|
282
|
+
self.client_terminate_online = attributes[:'ClientTerminateOnline']
|
283
|
+
end
|
284
|
+
|
285
|
+
if attributes.has_key?(:'MembershipTypeRestrictions')
|
286
|
+
if (value = attributes[:'MembershipTypeRestrictions']).is_a?(Array)
|
287
|
+
self.membership_type_restrictions = value
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
if attributes.has_key?(:'LocationPurchaseRestrictionIds')
|
292
|
+
if (value = attributes[:'LocationPurchaseRestrictionIds']).is_a?(Array)
|
293
|
+
self.location_purchase_restriction_ids = value
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
if attributes.has_key?(:'LocationPurchaseRestrictionNames')
|
298
|
+
if (value = attributes[:'LocationPurchaseRestrictionNames']).is_a?(Array)
|
299
|
+
self.location_purchase_restriction_names = value
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
if attributes.has_key?(:'AgreementTerms')
|
304
|
+
self.agreement_terms = attributes[:'AgreementTerms']
|
305
|
+
end
|
306
|
+
|
307
|
+
if attributes.has_key?(:'RequiresElectronicConfirmation')
|
308
|
+
self.requires_electronic_confirmation = attributes[:'RequiresElectronicConfirmation']
|
309
|
+
end
|
310
|
+
|
311
|
+
if attributes.has_key?(:'AutopayEnabled')
|
312
|
+
self.autopay_enabled = attributes[:'AutopayEnabled']
|
313
|
+
end
|
314
|
+
|
315
|
+
if attributes.has_key?(:'FirstPaymentAmountSubtotal')
|
316
|
+
self.first_payment_amount_subtotal = attributes[:'FirstPaymentAmountSubtotal']
|
317
|
+
end
|
318
|
+
|
319
|
+
if attributes.has_key?(:'FirstPaymentAmountTax')
|
320
|
+
self.first_payment_amount_tax = attributes[:'FirstPaymentAmountTax']
|
321
|
+
end
|
322
|
+
|
323
|
+
if attributes.has_key?(:'FirstPaymentAmountTotal')
|
324
|
+
self.first_payment_amount_total = attributes[:'FirstPaymentAmountTotal']
|
325
|
+
end
|
326
|
+
|
327
|
+
if attributes.has_key?(:'RecurringPaymentAmountSubtotal')
|
328
|
+
self.recurring_payment_amount_subtotal = attributes[:'RecurringPaymentAmountSubtotal']
|
329
|
+
end
|
330
|
+
|
331
|
+
if attributes.has_key?(:'RecurringPaymentAmountTax')
|
332
|
+
self.recurring_payment_amount_tax = attributes[:'RecurringPaymentAmountTax']
|
333
|
+
end
|
334
|
+
|
335
|
+
if attributes.has_key?(:'RecurringPaymentAmountTotal')
|
336
|
+
self.recurring_payment_amount_total = attributes[:'RecurringPaymentAmountTotal']
|
337
|
+
end
|
338
|
+
|
339
|
+
if attributes.has_key?(:'TotalContractAmountSubtotal')
|
340
|
+
self.total_contract_amount_subtotal = attributes[:'TotalContractAmountSubtotal']
|
341
|
+
end
|
342
|
+
|
343
|
+
if attributes.has_key?(:'TotalContractAmountTax')
|
344
|
+
self.total_contract_amount_tax = attributes[:'TotalContractAmountTax']
|
345
|
+
end
|
346
|
+
|
347
|
+
if attributes.has_key?(:'TotalContractAmountTotal')
|
348
|
+
self.total_contract_amount_total = attributes[:'TotalContractAmountTotal']
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
353
|
+
# @return Array for valid properties with the reasons
|
354
|
+
def list_invalid_properties
|
355
|
+
invalid_properties = Array.new
|
356
|
+
invalid_properties
|
357
|
+
end
|
358
|
+
|
359
|
+
# Check to see if the all the properties in the model are valid
|
360
|
+
# @return true if the model is valid
|
361
|
+
def valid?
|
362
|
+
true
|
363
|
+
end
|
364
|
+
|
365
|
+
# Checks equality by comparing each attribute.
|
366
|
+
# @param [Object] Object to be compared
|
367
|
+
def ==(o)
|
368
|
+
return true if self.equal?(o)
|
369
|
+
self.class == o.class &&
|
370
|
+
id == o.id &&
|
371
|
+
name == o.name &&
|
372
|
+
description == o.description &&
|
373
|
+
assigns_membership_id == o.assigns_membership_id &&
|
374
|
+
assigns_membership_name == o.assigns_membership_name &&
|
375
|
+
sold_online == o.sold_online &&
|
376
|
+
contract_items == o.contract_items &&
|
377
|
+
intro_offer == o.intro_offer &&
|
378
|
+
autopay_schedule == o.autopay_schedule &&
|
379
|
+
number_of_autopays == o.number_of_autopays &&
|
380
|
+
autopay_trigger_type == o.autopay_trigger_type &&
|
381
|
+
action_upon_completion_of_autopays == o.action_upon_completion_of_autopays &&
|
382
|
+
clients_charged_on == o.clients_charged_on &&
|
383
|
+
clients_charged_on_specific_date == o.clients_charged_on_specific_date &&
|
384
|
+
discount_amount == o.discount_amount &&
|
385
|
+
deposit_amount == o.deposit_amount &&
|
386
|
+
first_autopay_free == o.first_autopay_free &&
|
387
|
+
last_autopay_free == o.last_autopay_free &&
|
388
|
+
client_terminate_online == o.client_terminate_online &&
|
389
|
+
membership_type_restrictions == o.membership_type_restrictions &&
|
390
|
+
location_purchase_restriction_ids == o.location_purchase_restriction_ids &&
|
391
|
+
location_purchase_restriction_names == o.location_purchase_restriction_names &&
|
392
|
+
agreement_terms == o.agreement_terms &&
|
393
|
+
requires_electronic_confirmation == o.requires_electronic_confirmation &&
|
394
|
+
autopay_enabled == o.autopay_enabled &&
|
395
|
+
first_payment_amount_subtotal == o.first_payment_amount_subtotal &&
|
396
|
+
first_payment_amount_tax == o.first_payment_amount_tax &&
|
397
|
+
first_payment_amount_total == o.first_payment_amount_total &&
|
398
|
+
recurring_payment_amount_subtotal == o.recurring_payment_amount_subtotal &&
|
399
|
+
recurring_payment_amount_tax == o.recurring_payment_amount_tax &&
|
400
|
+
recurring_payment_amount_total == o.recurring_payment_amount_total &&
|
401
|
+
total_contract_amount_subtotal == o.total_contract_amount_subtotal &&
|
402
|
+
total_contract_amount_tax == o.total_contract_amount_tax &&
|
403
|
+
total_contract_amount_total == o.total_contract_amount_total
|
404
|
+
end
|
405
|
+
|
406
|
+
# @see the `==` method
|
407
|
+
# @param [Object] Object to be compared
|
408
|
+
def eql?(o)
|
409
|
+
self == o
|
410
|
+
end
|
411
|
+
|
412
|
+
# Calculates hash code according to all attributes.
|
413
|
+
# @return [Fixnum] Hash code
|
414
|
+
def hash
|
415
|
+
[id, name, description, assigns_membership_id, assigns_membership_name, sold_online, contract_items, intro_offer, autopay_schedule, number_of_autopays, autopay_trigger_type, action_upon_completion_of_autopays, clients_charged_on, clients_charged_on_specific_date, discount_amount, deposit_amount, first_autopay_free, last_autopay_free, client_terminate_online, membership_type_restrictions, location_purchase_restriction_ids, location_purchase_restriction_names, agreement_terms, requires_electronic_confirmation, autopay_enabled, first_payment_amount_subtotal, first_payment_amount_tax, first_payment_amount_total, recurring_payment_amount_subtotal, recurring_payment_amount_tax, recurring_payment_amount_total, total_contract_amount_subtotal, total_contract_amount_tax, total_contract_amount_total].hash
|
416
|
+
end
|
417
|
+
|
418
|
+
# Builds the object from hash
|
419
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
420
|
+
# @return [Object] Returns the model itself
|
421
|
+
def build_from_hash(attributes)
|
422
|
+
return nil unless attributes.is_a?(Hash)
|
423
|
+
self.class.swagger_types.each_pair do |key, type|
|
424
|
+
if type =~ /\AArray<(.*)>/i
|
425
|
+
# check to ensure the input is an array given that the the attribute
|
426
|
+
# is documented as an array but the input is not
|
427
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
428
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
429
|
+
end
|
430
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
431
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
432
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
433
|
+
end
|
434
|
+
|
435
|
+
self
|
436
|
+
end
|
437
|
+
|
438
|
+
# Deserializes the data based on type
|
439
|
+
# @param string type Data type
|
440
|
+
# @param string value Value to be deserialized
|
441
|
+
# @return [Object] Deserialized data
|
442
|
+
def _deserialize(type, value)
|
443
|
+
case type.to_sym
|
444
|
+
when :DateTime
|
445
|
+
DateTime.parse(value)
|
446
|
+
when :Date
|
447
|
+
Date.parse(value)
|
448
|
+
when :String
|
449
|
+
value.to_s
|
450
|
+
when :Integer
|
451
|
+
value.to_i
|
452
|
+
when :Float
|
453
|
+
value.to_f
|
454
|
+
when :BOOLEAN
|
455
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
456
|
+
true
|
457
|
+
else
|
458
|
+
false
|
459
|
+
end
|
460
|
+
when :Object
|
461
|
+
# generic object (usually a Hash), return directly
|
462
|
+
value
|
463
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
464
|
+
inner_type = Regexp.last_match[:inner_type]
|
465
|
+
value.map { |v| _deserialize(inner_type, v) }
|
466
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
467
|
+
k_type = Regexp.last_match[:k_type]
|
468
|
+
v_type = Regexp.last_match[:v_type]
|
469
|
+
{}.tap do |hash|
|
470
|
+
value.each do |k, v|
|
471
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
472
|
+
end
|
473
|
+
end
|
474
|
+
else # model
|
475
|
+
temp_model = SwaggerClient.const_get(type).new
|
476
|
+
temp_model.build_from_hash(value)
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
# Returns the string representation of the object
|
481
|
+
# @return [String] String presentation of the object
|
482
|
+
def to_s
|
483
|
+
to_hash.to_s
|
484
|
+
end
|
485
|
+
|
486
|
+
# to_body is an alias to to_hash (backward compatibility)
|
487
|
+
# @return [Hash] Returns the object in the form of hash
|
488
|
+
def to_body
|
489
|
+
to_hash
|
490
|
+
end
|
491
|
+
|
492
|
+
# Returns the object in the form of hash
|
493
|
+
# @return [Hash] Returns the object in the form of hash
|
494
|
+
def to_hash
|
495
|
+
hash = {}
|
496
|
+
self.class.attribute_map.each_pair do |attr, param|
|
497
|
+
value = self.send(attr)
|
498
|
+
next if value.nil?
|
499
|
+
hash[param] = _to_hash(value)
|
500
|
+
end
|
501
|
+
hash
|
502
|
+
end
|
503
|
+
|
504
|
+
# Outputs non-array value in the form of hash
|
505
|
+
# For object, use to_hash. Otherwise, just return the value
|
506
|
+
# @param [Object] value Any valid value
|
507
|
+
# @return [Hash] Returns the value in the form of hash
|
508
|
+
def _to_hash(value)
|
509
|
+
if value.is_a?(Array)
|
510
|
+
value.compact.map { |v| _to_hash(v) }
|
511
|
+
elsif value.is_a?(Hash)
|
512
|
+
{}.tap do |hash|
|
513
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
514
|
+
end
|
515
|
+
elsif value.respond_to? :to_hash
|
516
|
+
value.to_hash
|
517
|
+
else
|
518
|
+
value
|
519
|
+
end
|
520
|
+
end
|
521
|
+
end
|
522
|
+
end
|