mb-apimatic-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +139 -0
- data/bin/console +15 -0
- data/lib/mindbody_public_api/api_helper.rb +10 -0
- data/lib/mindbody_public_api/client.rb +138 -0
- data/lib/mindbody_public_api/configuration.rb +181 -0
- data/lib/mindbody_public_api/controllers/appointment_controller.rb +746 -0
- data/lib/mindbody_public_api/controllers/base_controller.rb +60 -0
- data/lib/mindbody_public_api/controllers/class_controller.rb +826 -0
- data/lib/mindbody_public_api/controllers/client_controller.rb +2106 -0
- data/lib/mindbody_public_api/controllers/cross_site_controller.rb +43 -0
- data/lib/mindbody_public_api/controllers/enrollment_controller.rb +188 -0
- data/lib/mindbody_public_api/controllers/payroll_controller.rb +290 -0
- data/lib/mindbody_public_api/controllers/pick_a_spot_controller.rb +213 -0
- data/lib/mindbody_public_api/controllers/pricing_option_controller.rb +41 -0
- data/lib/mindbody_public_api/controllers/sale_controller.rb +1226 -0
- data/lib/mindbody_public_api/controllers/site_controller.rb +815 -0
- data/lib/mindbody_public_api/controllers/staff_controller.rb +408 -0
- data/lib/mindbody_public_api/controllers/user_token_controller.rb +92 -0
- data/lib/mindbody_public_api/exceptions/api_exception.rb +21 -0
- data/lib/mindbody_public_api/http/auth/custom_header_authentication.rb +52 -0
- data/lib/mindbody_public_api/http/http_call_back.rb +10 -0
- data/lib/mindbody_public_api/http/http_method_enum.rb +10 -0
- data/lib/mindbody_public_api/http/http_request.rb +10 -0
- data/lib/mindbody_public_api/http/http_response.rb +10 -0
- data/lib/mindbody_public_api/http/proxy_settings.rb +22 -0
- data/lib/mindbody_public_api/models/action10_enum.rb +48 -0
- data/lib/mindbody_public_api/models/action1_enum.rb +48 -0
- data/lib/mindbody_public_api/models/action8_enum.rb +48 -0
- data/lib/mindbody_public_api/models/action_enum.rb +48 -0
- data/lib/mindbody_public_api/models/add_appointment_add_on_request.rb +108 -0
- data/lib/mindbody_public_api/models/add_appointment_add_on_response.rb +74 -0
- data/lib/mindbody_public_api/models/add_appointment_outcome.rb +83 -0
- data/lib/mindbody_public_api/models/add_appointment_request.rb +319 -0
- data/lib/mindbody_public_api/models/add_appointment_response.rb +62 -0
- data/lib/mindbody_public_api/models/add_arrival_request.rb +113 -0
- data/lib/mindbody_public_api/models/add_arrival_response.rb +72 -0
- data/lib/mindbody_public_api/models/add_availabilities_request.rb +187 -0
- data/lib/mindbody_public_api/models/add_availabilities_response.rb +89 -0
- data/lib/mindbody_public_api/models/add_class_enrollment_schedule_request.rb +351 -0
- data/lib/mindbody_public_api/models/add_client_direct_debit_info_request.rb +119 -0
- data/lib/mindbody_public_api/models/add_client_direct_debit_info_response.rb +108 -0
- data/lib/mindbody_public_api/models/add_client_request.rb +854 -0
- data/lib/mindbody_public_api/models/add_client_response.rb +62 -0
- data/lib/mindbody_public_api/models/add_client_to_class_request.rb +199 -0
- data/lib/mindbody_public_api/models/add_client_to_class_response.rb +62 -0
- data/lib/mindbody_public_api/models/add_client_to_class_visit.rb +353 -0
- data/lib/mindbody_public_api/models/add_client_to_enrollment_request.rb +165 -0
- data/lib/mindbody_public_api/models/add_contact_log_request.rb +175 -0
- data/lib/mindbody_public_api/models/add_contact_log_type.rb +71 -0
- data/lib/mindbody_public_api/models/add_formula_note_request.rb +80 -0
- data/lib/mindbody_public_api/models/add_multiple_appointments_request.rb +71 -0
- data/lib/mindbody_public_api/models/add_multiple_appointments_response.rb +71 -0
- data/lib/mindbody_public_api/models/add_on_small.rb +90 -0
- data/lib/mindbody_public_api/models/add_on_small1.rb +90 -0
- data/lib/mindbody_public_api/models/add_promo_code_request.rb +201 -0
- data/lib/mindbody_public_api/models/add_promo_code_response.rb +62 -0
- data/lib/mindbody_public_api/models/add_site_client_index_request.rb +163 -0
- data/lib/mindbody_public_api/models/add_site_client_index_response.rb +175 -0
- data/lib/mindbody_public_api/models/add_staff_availability_request.rb +170 -0
- data/lib/mindbody_public_api/models/add_staff_request.rb +357 -0
- data/lib/mindbody_public_api/models/add_staff_response.rb +62 -0
- data/lib/mindbody_public_api/models/allowed_permission_enum.rb +764 -0
- data/lib/mindbody_public_api/models/alternative_payment_method.rb +71 -0
- data/lib/mindbody_public_api/models/amenity.rb +71 -0
- data/lib/mindbody_public_api/models/amenity1.rb +71 -0
- data/lib/mindbody_public_api/models/api_error.rb +71 -0
- data/lib/mindbody_public_api/models/api_error1.rb +76 -0
- data/lib/mindbody_public_api/models/applicable_item.rb +86 -0
- data/lib/mindbody_public_api/models/appointment.rb +351 -0
- data/lib/mindbody_public_api/models/appointment1.rb +322 -0
- data/lib/mindbody_public_api/models/appointment_add_on.rb +103 -0
- data/lib/mindbody_public_api/models/appointment_gender_preference1_enum.rb +41 -0
- data/lib/mindbody_public_api/models/appointment_gender_preference_enum.rb +44 -0
- data/lib/mindbody_public_api/models/appointment_option.rb +91 -0
- data/lib/mindbody_public_api/models/appointment_staff.rb +92 -0
- data/lib/mindbody_public_api/models/appointment_status_enum.rb +64 -0
- data/lib/mindbody_public_api/models/assign_staff_session_type_request.rb +146 -0
- data/lib/mindbody_public_api/models/assign_staff_session_type_response.rb +138 -0
- data/lib/mindbody_public_api/models/assigned_client_index.rb +71 -0
- data/lib/mindbody_public_api/models/autopay_schedule.rb +93 -0
- data/lib/mindbody_public_api/models/autopay_status_enum.rb +40 -0
- data/lib/mindbody_public_api/models/availability.rb +233 -0
- data/lib/mindbody_public_api/models/availability1.rb +228 -0
- data/lib/mindbody_public_api/models/base_model.rb +110 -0
- data/lib/mindbody_public_api/models/booking_status_enum.rb +40 -0
- data/lib/mindbody_public_api/models/booking_window.rb +130 -0
- data/lib/mindbody_public_api/models/cancel_single_class_request.rb +98 -0
- data/lib/mindbody_public_api/models/cancel_single_class_response.rb +63 -0
- data/lib/mindbody_public_api/models/cart_item.rb +147 -0
- data/lib/mindbody_public_api/models/category.rb +192 -0
- data/lib/mindbody_public_api/models/checkout_alternative_payment_info.rb +72 -0
- data/lib/mindbody_public_api/models/checkout_appointment_booking_request.rb +155 -0
- data/lib/mindbody_public_api/models/checkout_item.rb +77 -0
- data/lib/mindbody_public_api/models/checkout_item_wrapper.rb +183 -0
- data/lib/mindbody_public_api/models/checkout_payment_info.rb +101 -0
- data/lib/mindbody_public_api/models/checkout_shopping_cart_request.rb +339 -0
- data/lib/mindbody_public_api/models/checkout_shopping_cart_response.rb +119 -0
- data/lib/mindbody_public_api/models/class_client_detail.rb +68 -0
- data/lib/mindbody_public_api/models/class_description.rb +215 -0
- data/lib/mindbody_public_api/models/class_schedule.rb +365 -0
- data/lib/mindbody_public_api/models/client.rb +832 -0
- data/lib/mindbody_public_api/models/client_arrival.rb +95 -0
- data/lib/mindbody_public_api/models/client_contract.rb +353 -0
- data/lib/mindbody_public_api/models/client_credit_card.rb +153 -0
- data/lib/mindbody_public_api/models/client_document.rb +96 -0
- data/lib/mindbody_public_api/models/client_duplicate.rb +109 -0
- data/lib/mindbody_public_api/models/client_index.rb +127 -0
- data/lib/mindbody_public_api/models/client_index_value.rb +82 -0
- data/lib/mindbody_public_api/models/client_membership.rb +272 -0
- data/lib/mindbody_public_api/models/client_memberships.rb +91 -0
- data/lib/mindbody_public_api/models/client_purchase_record.rb +142 -0
- data/lib/mindbody_public_api/models/client_relationship.rb +109 -0
- data/lib/mindbody_public_api/models/client_reward_transaction.rb +132 -0
- data/lib/mindbody_public_api/models/client_service.rb +228 -0
- data/lib/mindbody_public_api/models/client_suspension_info.rb +86 -0
- data/lib/mindbody_public_api/models/client_with_suspension_info.rb +844 -0
- data/lib/mindbody_public_api/models/color.rb +71 -0
- data/lib/mindbody_public_api/models/commission_detail.rb +83 -0
- data/lib/mindbody_public_api/models/commission_payroll_purchase_event.rb +143 -0
- data/lib/mindbody_public_api/models/complete_checkout_shopping_cart_using_alternative_payments_request.rb +86 -0
- data/lib/mindbody_public_api/models/contact_log.rb +198 -0
- data/lib/mindbody_public_api/models/contact_log_comment.rb +101 -0
- data/lib/mindbody_public_api/models/contact_log_sub_type.rb +71 -0
- data/lib/mindbody_public_api/models/contact_log_type.rb +91 -0
- data/lib/mindbody_public_api/models/content_format_enum.rb +40 -0
- data/lib/mindbody_public_api/models/contract.rb +636 -0
- data/lib/mindbody_public_api/models/contract_item.rb +121 -0
- data/lib/mindbody_public_api/models/copy_credit_card_request.rb +120 -0
- data/lib/mindbody_public_api/models/copy_credit_card_response.rb +72 -0
- data/lib/mindbody_public_api/models/copy_credit_card_response_client.rb +102 -0
- data/lib/mindbody_public_api/models/course.rb +167 -0
- data/lib/mindbody_public_api/models/create_reservation_response.rb +73 -0
- data/lib/mindbody_public_api/models/credit_card_info.rb +168 -0
- data/lib/mindbody_public_api/models/cross_regional_client_association.rb +92 -0
- data/lib/mindbody_public_api/models/custom_client_field.rb +81 -0
- data/lib/mindbody_public_api/models/custom_client_field_value.rb +90 -0
- data/lib/mindbody_public_api/models/custom_payment_method.rb +71 -0
- data/lib/mindbody_public_api/models/days_of_week_enum.rb +56 -0
- data/lib/mindbody_public_api/models/days_valid_enum.rb +56 -0
- data/lib/mindbody_public_api/models/deactivate_promo_code_request.rb +60 -0
- data/lib/mindbody_public_api/models/delete_availability_request.rb +75 -0
- data/lib/mindbody_public_api/models/delete_client_formula_note_request.rb +90 -0
- data/lib/mindbody_public_api/models/delete_contact_log_request.rb +82 -0
- data/lib/mindbody_public_api/models/denied_permission_enum.rb +764 -0
- data/lib/mindbody_public_api/models/direct_debit_info.rb +97 -0
- data/lib/mindbody_public_api/models/discount.rb +71 -0
- data/lib/mindbody_public_api/models/formula_note_response.rb +172 -0
- data/lib/mindbody_public_api/models/frequency_type_enum.rb +40 -0
- data/lib/mindbody_public_api/models/gender_option.rb +93 -0
- data/lib/mindbody_public_api/models/gender_preference_enum.rb +41 -0
- data/lib/mindbody_public_api/models/get_activation_code_response.rb +76 -0
- data/lib/mindbody_public_api/models/get_active_client_memberships_request.rb +163 -0
- data/lib/mindbody_public_api/models/get_active_client_memberships_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_active_clients_memberships_request.rb +151 -0
- data/lib/mindbody_public_api/models/get_active_clients_memberships_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_active_session_times_request.rb +136 -0
- data/lib/mindbody_public_api/models/get_active_session_times_response.rb +81 -0
- data/lib/mindbody_public_api/models/get_add_ons_request.rb +81 -0
- data/lib/mindbody_public_api/models/get_add_ons_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_alternative_payment_methods_request.rb +72 -0
- data/lib/mindbody_public_api/models/get_alternative_payment_methods_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_appointment_options_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_available_dates_request.rb +121 -0
- data/lib/mindbody_public_api/models/get_available_dates_response.rb +77 -0
- data/lib/mindbody_public_api/models/get_bookable_items_request.rb +190 -0
- data/lib/mindbody_public_api/models/get_bookable_items_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_categories_request.rb +118 -0
- data/lib/mindbody_public_api/models/get_categories_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_class_descriptions_request.rb +168 -0
- data/lib/mindbody_public_api/models/get_class_descriptions_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_class_schedules_request.rb +172 -0
- data/lib/mindbody_public_api/models/get_class_schedules_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_class_visits_request.rb +100 -0
- data/lib/mindbody_public_api/models/get_class_visits_response.rb +63 -0
- data/lib/mindbody_public_api/models/get_classes_request.rb +281 -0
- data/lib/mindbody_public_api/models/get_classes_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_client_account_balances_request.rb +110 -0
- data/lib/mindbody_public_api/models/get_client_account_balances_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_client_complete_info_request.rb +239 -0
- data/lib/mindbody_public_api/models/get_client_complete_info_response.rb +140 -0
- data/lib/mindbody_public_api/models/get_client_contracts_request.rb +127 -0
- data/lib/mindbody_public_api/models/get_client_contracts_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_client_duplicates_request.rb +101 -0
- data/lib/mindbody_public_api/models/get_client_duplicates_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_client_formula_notes_request.rb +93 -0
- data/lib/mindbody_public_api/models/get_client_formula_notes_response.rb +85 -0
- data/lib/mindbody_public_api/models/get_client_indexes_request.rb +64 -0
- data/lib/mindbody_public_api/models/get_client_indexes_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_client_purchases_request.rb +141 -0
- data/lib/mindbody_public_api/models/get_client_purchases_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_client_referral_types_request.rb +66 -0
- data/lib/mindbody_public_api/models/get_client_referral_types_response.rb +62 -0
- data/lib/mindbody_public_api/models/get_client_rewards_request.rb +119 -0
- data/lib/mindbody_public_api/models/get_client_rewards_response.rb +94 -0
- data/lib/mindbody_public_api/models/get_client_schedule_request.rb +180 -0
- data/lib/mindbody_public_api/models/get_client_schedule_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_client_services_request.rb +356 -0
- data/lib/mindbody_public_api/models/get_client_services_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_client_visits_request.rb +180 -0
- data/lib/mindbody_public_api/models/get_client_visits_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_clients_request.rb +157 -0
- data/lib/mindbody_public_api/models/get_clients_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_commissions_request.rb +144 -0
- data/lib/mindbody_public_api/models/get_commissions_response.rb +84 -0
- data/lib/mindbody_public_api/models/get_contact_log_types_request.rb +84 -0
- data/lib/mindbody_public_api/models/get_contact_log_types_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_contact_logs_request.rb +167 -0
- data/lib/mindbody_public_api/models/get_contact_logs_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_contracts_request.rb +128 -0
- data/lib/mindbody_public_api/models/get_contracts_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_courses_reponse.rb +82 -0
- data/lib/mindbody_public_api/models/get_courses_request.rb +161 -0
- data/lib/mindbody_public_api/models/get_cross_regional_client_associations_request.rb +152 -0
- data/lib/mindbody_public_api/models/get_cross_regional_client_associations_response.rb +88 -0
- data/lib/mindbody_public_api/models/get_custom_client_fields_request.rb +71 -0
- data/lib/mindbody_public_api/models/get_custom_client_fields_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_custom_payment_methods_request.rb +71 -0
- data/lib/mindbody_public_api/models/get_custom_payment_methods_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_enrollments_request.rb +172 -0
- data/lib/mindbody_public_api/models/get_enrollments_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_genders_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_gift_card_balance_response.rb +73 -0
- data/lib/mindbody_public_api/models/get_gift_card_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_gift_cards_request.rb +119 -0
- data/lib/mindbody_public_api/models/get_liability_waiver_response.rb +63 -0
- data/lib/mindbody_public_api/models/get_locations_request.rb +71 -0
- data/lib/mindbody_public_api/models/get_locations_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_memberships_request.rb +63 -0
- data/lib/mindbody_public_api/models/get_memberships_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_mobile_providers_request.rb +65 -0
- data/lib/mindbody_public_api/models/get_mobile_providers_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_packages_request.rb +106 -0
- data/lib/mindbody_public_api/models/get_packages_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_payment_types_request.rb +64 -0
- data/lib/mindbody_public_api/models/get_payment_types_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_pick_a_spot_class_response.rb +92 -0
- data/lib/mindbody_public_api/models/get_products_inventory_request.rb +105 -0
- data/lib/mindbody_public_api/models/get_products_inventory_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_products_request.rb +153 -0
- data/lib/mindbody_public_api/models/get_products_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_programs_request.rb +112 -0
- data/lib/mindbody_public_api/models/get_programs_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_promo_codes_request.rb +152 -0
- data/lib/mindbody_public_api/models/get_promo_codes_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_prospect_stages_request.rb +65 -0
- data/lib/mindbody_public_api/models/get_prospect_stages_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_relationships_request.rb +83 -0
- data/lib/mindbody_public_api/models/get_relationships_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_required_client_fields_response.rb +64 -0
- data/lib/mindbody_public_api/models/get_reservation_response.rb +93 -0
- data/lib/mindbody_public_api/models/get_resource_availabilities_request.rb +149 -0
- data/lib/mindbody_public_api/models/get_resources_request.rb +124 -0
- data/lib/mindbody_public_api/models/get_resources_response.rb +71 -0
- data/lib/mindbody_public_api/models/get_sales_reps_request.rb +95 -0
- data/lib/mindbody_public_api/models/get_sales_reps_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_sales_request.rb +134 -0
- data/lib/mindbody_public_api/models/get_sales_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_schedule_items_request.rb +145 -0
- data/lib/mindbody_public_api/models/get_schedule_items_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_scheduled_service_earnings_request.rb +172 -0
- data/lib/mindbody_public_api/models/get_scheduled_service_earnings_response.rb +87 -0
- data/lib/mindbody_public_api/models/get_semesters_request.rb +132 -0
- data/lib/mindbody_public_api/models/get_semesters_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_services_request.rb +221 -0
- data/lib/mindbody_public_api/models/get_services_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_session_types_request.rb +95 -0
- data/lib/mindbody_public_api/models/get_session_types_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_sites_request.rb +111 -0
- data/lib/mindbody_public_api/models/get_sites_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_staff_appointments_request.rb +173 -0
- data/lib/mindbody_public_api/models/get_staff_appointments_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_staff_image_url_request.rb +62 -0
- data/lib/mindbody_public_api/models/get_staff_image_url_response.rb +73 -0
- data/lib/mindbody_public_api/models/get_staff_permissions_request.rb +60 -0
- data/lib/mindbody_public_api/models/get_staff_permissions_response.rb +62 -0
- data/lib/mindbody_public_api/models/get_staff_request.rb +144 -0
- data/lib/mindbody_public_api/models/get_staff_response.rb +84 -0
- data/lib/mindbody_public_api/models/get_staff_session_types_request.rb +104 -0
- data/lib/mindbody_public_api/models/get_staff_session_types_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_time_cards_request.rb +144 -0
- data/lib/mindbody_public_api/models/get_time_cards_response.rb +82 -0
- data/lib/mindbody_public_api/models/get_tips_request.rb +144 -0
- data/lib/mindbody_public_api/models/get_tips_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_transactions_request.rb +173 -0
- data/lib/mindbody_public_api/models/get_transactions_response.rb +84 -0
- data/lib/mindbody_public_api/models/get_unavailabilities_request.rb +120 -0
- data/lib/mindbody_public_api/models/get_unavailabilities_response.rb +83 -0
- data/lib/mindbody_public_api/models/get_waitlist_entries_request.rb +144 -0
- data/lib/mindbody_public_api/models/get_waitlist_entries_response.rb +83 -0
- data/lib/mindbody_public_api/models/gift_card.rb +191 -0
- data/lib/mindbody_public_api/models/gift_card_layout.rb +82 -0
- data/lib/mindbody_public_api/models/http_content.rb +71 -0
- data/lib/mindbody_public_api/models/initiate_checkout_shopping_cart_using_alternative_payments_request.rb +265 -0
- data/lib/mindbody_public_api/models/initiate_purchase_contract_request.rb +184 -0
- data/lib/mindbody_public_api/models/issue_request.rb +71 -0
- data/lib/mindbody_public_api/models/issue_response.rb +101 -0
- data/lib/mindbody_public_api/models/lead_channel.rb +104 -0
- data/lib/mindbody_public_api/models/level.rb +81 -0
- data/lib/mindbody_public_api/models/liability.rb +102 -0
- data/lib/mindbody_public_api/models/location.rb +331 -0
- data/lib/mindbody_public_api/models/location1.rb +639 -0
- data/lib/mindbody_public_api/models/m0_culture_neutral_public_key_token_b77a5c561934e089.rb +71 -0
- data/lib/mindbody_public_api/models/mclass.rb +430 -0
- data/lib/mindbody_public_api/models/membership.rb +255 -0
- data/lib/mindbody_public_api/models/membership_type_restriction.rb +71 -0
- data/lib/mindbody_public_api/models/merge_clients_request.rb +75 -0
- data/lib/mindbody_public_api/models/minimum_commitment_unit_enum.rb +40 -0
- data/lib/mindbody_public_api/models/mobile_provider.rb +93 -0
- data/lib/mindbody_public_api/models/package.rb +131 -0
- data/lib/mindbody_public_api/models/pagination.rb +95 -0
- data/lib/mindbody_public_api/models/pagination_response.rb +95 -0
- data/lib/mindbody_public_api/models/payment_method_enum.rb +44 -0
- data/lib/mindbody_public_api/models/payment_processing_failure.rb +88 -0
- data/lib/mindbody_public_api/models/payment_type.rb +93 -0
- data/lib/mindbody_public_api/models/pick_a_spot_class.rb +193 -0
- data/lib/mindbody_public_api/models/pricing_relationships.rb +71 -0
- data/lib/mindbody_public_api/models/product.rb +267 -0
- data/lib/mindbody_public_api/models/products_inventory.rb +173 -0
- data/lib/mindbody_public_api/models/program.rb +129 -0
- data/lib/mindbody_public_api/models/program1.rb +150 -0
- data/lib/mindbody_public_api/models/program_membership.rb +71 -0
- data/lib/mindbody_public_api/models/promo_code.rb +233 -0
- data/lib/mindbody_public_api/models/prospect_stage.rb +84 -0
- data/lib/mindbody_public_api/models/public_display1_enum.rb +42 -0
- data/lib/mindbody_public_api/models/public_display_enum.rb +41 -0
- data/lib/mindbody_public_api/models/purchase_account_credit_request.rb +154 -0
- data/lib/mindbody_public_api/models/purchase_account_credit_response.rb +118 -0
- data/lib/mindbody_public_api/models/purchase_contract_request.rb +324 -0
- data/lib/mindbody_public_api/models/purchase_contract_response.rb +141 -0
- data/lib/mindbody_public_api/models/purchase_contract_response_totals.rb +92 -0
- data/lib/mindbody_public_api/models/purchase_gift_card_request.rb +273 -0
- data/lib/mindbody_public_api/models/purchase_gift_card_response.rb +183 -0
- data/lib/mindbody_public_api/models/purchased_item.rb +337 -0
- data/lib/mindbody_public_api/models/relationship.rb +85 -0
- data/lib/mindbody_public_api/models/remove_client_from_class_request.rb +142 -0
- data/lib/mindbody_public_api/models/remove_client_from_class_response.rb +63 -0
- data/lib/mindbody_public_api/models/remove_clients_from_classes_request.rb +140 -0
- data/lib/mindbody_public_api/models/remove_clients_from_classes_response.rb +102 -0
- data/lib/mindbody_public_api/models/remove_from_waitlist_request.rb +61 -0
- data/lib/mindbody_public_api/models/request_schedule_type_enum.rb +56 -0
- data/lib/mindbody_public_api/models/reservation.rb +158 -0
- data/lib/mindbody_public_api/models/resource.rb +71 -0
- data/lib/mindbody_public_api/models/resource1.rb +124 -0
- data/lib/mindbody_public_api/models/resource_availability.rb +100 -0
- data/lib/mindbody_public_api/models/resource_availability1.rb +124 -0
- data/lib/mindbody_public_api/models/resource_slim.rb +71 -0
- data/lib/mindbody_public_api/models/response_details.rb +82 -0
- data/lib/mindbody_public_api/models/return_sale_request.rb +71 -0
- data/lib/mindbody_public_api/models/return_sale_response.rb +82 -0
- data/lib/mindbody_public_api/models/sale.rb +210 -0
- data/lib/mindbody_public_api/models/sale_payment.rb +114 -0
- data/lib/mindbody_public_api/models/sales_rep.rb +107 -0
- data/lib/mindbody_public_api/models/sales_rep_response.rb +93 -0
- data/lib/mindbody_public_api/models/schedule_type1_enum.rb +57 -0
- data/lib/mindbody_public_api/models/schedule_type2_enum.rb +56 -0
- data/lib/mindbody_public_api/models/schedule_type3_enum.rb +57 -0
- data/lib/mindbody_public_api/models/schedule_type4_enum.rb +56 -0
- data/lib/mindbody_public_api/models/schedule_type_enum.rb +57 -0
- data/lib/mindbody_public_api/models/scheduled_service_earnings_event.rb +117 -0
- data/lib/mindbody_public_api/models/scheduled_service_type_enum.rb +44 -0
- data/lib/mindbody_public_api/models/semester.rb +167 -0
- data/lib/mindbody_public_api/models/send_auto_email_request.rb +71 -0
- data/lib/mindbody_public_api/models/send_password_reset_email_request.rb +81 -0
- data/lib/mindbody_public_api/models/service.rb +366 -0
- data/lib/mindbody_public_api/models/service_tag.rb +72 -0
- data/lib/mindbody_public_api/models/session_type.rb +198 -0
- data/lib/mindbody_public_api/models/session_type1.rb +204 -0
- data/lib/mindbody_public_api/models/shopping_cart.rb +151 -0
- data/lib/mindbody_public_api/models/site.rb +347 -0
- data/lib/mindbody_public_api/models/size.rb +71 -0
- data/lib/mindbody_public_api/models/spot.rb +87 -0
- data/lib/mindbody_public_api/models/staff.rb +501 -0
- data/lib/mindbody_public_api/models/staff1.rb +588 -0
- data/lib/mindbody_public_api/models/staff_permission_group.rb +105 -0
- data/lib/mindbody_public_api/models/staff_session_type.rb +205 -0
- data/lib/mindbody_public_api/models/staff_setting.rb +84 -0
- data/lib/mindbody_public_api/models/status1_enum.rb +56 -0
- data/lib/mindbody_public_api/models/status_enum.rb +66 -0
- data/lib/mindbody_public_api/models/stored_card_info.rb +62 -0
- data/lib/mindbody_public_api/models/sub_category.rb +82 -0
- data/lib/mindbody_public_api/models/substitute_class_teacher_request.rb +127 -0
- data/lib/mindbody_public_api/models/substitute_class_teacher_response.rb +63 -0
- data/lib/mindbody_public_api/models/substitute_teacher_class.rb +318 -0
- data/lib/mindbody_public_api/models/suspend_contract_request.rb +162 -0
- data/lib/mindbody_public_api/models/suspend_contract_response.rb +62 -0
- data/lib/mindbody_public_api/models/terminate_contract_request.rb +113 -0
- data/lib/mindbody_public_api/models/terminate_contract_response.rb +62 -0
- data/lib/mindbody_public_api/models/time_card_event.rb +139 -0
- data/lib/mindbody_public_api/models/tip.rb +101 -0
- data/lib/mindbody_public_api/models/transaction.rb +245 -0
- data/lib/mindbody_public_api/models/transaction_response.rb +74 -0
- data/lib/mindbody_public_api/models/type1_enum.rb +56 -0
- data/lib/mindbody_public_api/models/type2_enum.rb +56 -0
- data/lib/mindbody_public_api/models/type_enum.rb +57 -0
- data/lib/mindbody_public_api/models/unavailability.rb +109 -0
- data/lib/mindbody_public_api/models/unavailability1.rb +109 -0
- data/lib/mindbody_public_api/models/unavailability_plain.rb +119 -0
- data/lib/mindbody_public_api/models/upcoming_autopay_event.rb +133 -0
- data/lib/mindbody_public_api/models/update_appointment_request.rb +225 -0
- data/lib/mindbody_public_api/models/update_appointment_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_availability_request.rb +171 -0
- data/lib/mindbody_public_api/models/update_availability_response.rb +89 -0
- data/lib/mindbody_public_api/models/update_class_enrollment_schedule_request.rb +343 -0
- data/lib/mindbody_public_api/models/update_class_schedule_notes_request.rb +62 -0
- data/lib/mindbody_public_api/models/update_client_contract_autopays_request.rb +149 -0
- data/lib/mindbody_public_api/models/update_client_request.rb +128 -0
- data/lib/mindbody_public_api/models/update_client_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_client_rewards_request.rb +143 -0
- data/lib/mindbody_public_api/models/update_client_service_request.rb +121 -0
- data/lib/mindbody_public_api/models/update_client_service_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_client_visit_request.rb +130 -0
- data/lib/mindbody_public_api/models/update_client_visit_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_contact_log_comment.rb +72 -0
- data/lib/mindbody_public_api/models/update_contact_log_request.rb +188 -0
- data/lib/mindbody_public_api/models/update_contact_log_type.rb +71 -0
- data/lib/mindbody_public_api/models/update_pricing_option_request.rb +252 -0
- data/lib/mindbody_public_api/models/update_product_price_request.rb +83 -0
- data/lib/mindbody_public_api/models/update_product_price_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_product_request.rb +83 -0
- data/lib/mindbody_public_api/models/update_reservation_response.rb +73 -0
- data/lib/mindbody_public_api/models/update_sale_date_request.rb +81 -0
- data/lib/mindbody_public_api/models/update_sale_date_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_service_request.rb +82 -0
- data/lib/mindbody_public_api/models/update_service_response.rb +71 -0
- data/lib/mindbody_public_api/models/update_site_client_index_request.rb +172 -0
- data/lib/mindbody_public_api/models/update_site_client_index_response.rb +175 -0
- data/lib/mindbody_public_api/models/update_staff_permissions_request.rb +71 -0
- data/lib/mindbody_public_api/models/update_staff_permissions_response.rb +62 -0
- data/lib/mindbody_public_api/models/update_staff_request.rb +378 -0
- data/lib/mindbody_public_api/models/update_staff_response.rb +62 -0
- data/lib/mindbody_public_api/models/upload_client_document_request.rb +68 -0
- data/lib/mindbody_public_api/models/upload_client_document_response.rb +71 -0
- data/lib/mindbody_public_api/models/upload_client_photo_request.rb +68 -0
- data/lib/mindbody_public_api/models/upload_client_photo_response.rb +71 -0
- data/lib/mindbody_public_api/models/user.rb +95 -0
- data/lib/mindbody_public_api/models/visit.rb +399 -0
- data/lib/mindbody_public_api/models/visit_waitlist_info.rb +74 -0
- data/lib/mindbody_public_api/models/visit_with_waitlist_info.rb +410 -0
- data/lib/mindbody_public_api/models/waitlist_entry.rb +173 -0
- data/lib/mindbody_public_api/models/written_class_schedules_info.rb +73 -0
- data/lib/mindbody_public_api/utilities/date_time_helper.rb +11 -0
- data/lib/mindbody_public_api/utilities/file_wrapper.rb +28 -0
- data/lib/mindbody_public_api.rb +495 -0
- metadata +529 -0
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
# mindbody_public_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module MindbodyPublicApi
|
|
8
|
+
# AddClientRequest Model.
|
|
9
|
+
class AddClientRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The client’s current [account
|
|
14
|
+
# balance](https://mindbody-online-support.force.com/support/s/article/20326
|
|
15
|
+
# 2013-Adding-account-payments-video-tutorial?language=en_US).
|
|
16
|
+
# @return [Float]
|
|
17
|
+
attr_accessor :account_balance
|
|
18
|
+
|
|
19
|
+
# The action taken.
|
|
20
|
+
# @return [Action1Enum]
|
|
21
|
+
attr_accessor :action
|
|
22
|
+
|
|
23
|
+
# When `true`, indicates that the client is active at the site.<br />
|
|
24
|
+
# When `false`, indicates that the client is not active at the site.
|
|
25
|
+
# @return [TrueClass | FalseClass]
|
|
26
|
+
attr_accessor :active
|
|
27
|
+
|
|
28
|
+
# The first line of the client’s street address.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :address_line1
|
|
31
|
+
|
|
32
|
+
# The second line of the client’s street address, if needed.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :address_line2
|
|
35
|
+
|
|
36
|
+
# When `true`, indicates that the client prefers services to be provided by
|
|
37
|
+
# a male service provider.<br />
|
|
38
|
+
# When `false`, indicates that the client prefers services to be provided by
|
|
39
|
+
# a female service provider.<br />
|
|
40
|
+
# When `null`, indicates that the client has no preference.
|
|
41
|
+
# Default: **null**
|
|
42
|
+
# @return [TrueClass | FalseClass]
|
|
43
|
+
attr_accessor :appt_gender_pref_male
|
|
44
|
+
|
|
45
|
+
# The client’s date of birth.
|
|
46
|
+
# @return [DateTime]
|
|
47
|
+
attr_accessor :birth_date
|
|
48
|
+
|
|
49
|
+
# The client’s city.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :city
|
|
52
|
+
|
|
53
|
+
# A client credit card.
|
|
54
|
+
# @return [ClientCreditCard]
|
|
55
|
+
attr_accessor :client_credit_card
|
|
56
|
+
|
|
57
|
+
# Contains a list of the indexes and client index values to be assigned to
|
|
58
|
+
# the client.
|
|
59
|
+
# If an index is already assigned to the client, it is overwritten with the
|
|
60
|
+
# passed index value. You cannot currently remove client indexes using the
|
|
61
|
+
# Public API. Only the indexes passed in the request are returned in the
|
|
62
|
+
# response.
|
|
63
|
+
# @return [Array[AssignedClientIndex]]
|
|
64
|
+
attr_accessor :client_indexes
|
|
65
|
+
|
|
66
|
+
# Contains information about client relationships that were added or updated
|
|
67
|
+
# for the client. This parameter does not include all of the relationships
|
|
68
|
+
# assigned to the client, only the ones passed in the request.
|
|
69
|
+
# @return [Array[ClientRelationship]]
|
|
70
|
+
attr_accessor :client_relationships
|
|
71
|
+
|
|
72
|
+
# The country in which the client is located.
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :country
|
|
75
|
+
|
|
76
|
+
# The date when the client was added to the business, either by the client
|
|
77
|
+
# from the online store or by a staff member at the subscriber’s business.
|
|
78
|
+
# This value always returns in the format yyyy-mm-ddThh:mm:ss:ms.
|
|
79
|
+
# @return [DateTime]
|
|
80
|
+
attr_accessor :creation_date
|
|
81
|
+
|
|
82
|
+
# Contains information about the custom fields used for clients in the
|
|
83
|
+
# business.
|
|
84
|
+
# @return [Array[CustomClientFieldValue]]
|
|
85
|
+
attr_accessor :custom_client_fields
|
|
86
|
+
|
|
87
|
+
# The client’s email address.
|
|
88
|
+
# @return [String]
|
|
89
|
+
attr_accessor :email
|
|
90
|
+
|
|
91
|
+
# The email address of the client’s emergency contact.<br />
|
|
92
|
+
# For more information, see [Children’s program features(emergency contact
|
|
93
|
+
# information)](https://support.mindbodyonline.com/s/article/203259283-Child
|
|
94
|
+
# ren-s-program-features-emergency-contact-information?language=en_US).
|
|
95
|
+
# @return [String]
|
|
96
|
+
attr_accessor :emergency_contact_info_email
|
|
97
|
+
|
|
98
|
+
# The name of the client’s emergency contact.
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :emergency_contact_info_name
|
|
101
|
+
|
|
102
|
+
# The phone number of the client’s emergency contact.
|
|
103
|
+
# @return [String]
|
|
104
|
+
attr_accessor :emergency_contact_info_phone
|
|
105
|
+
|
|
106
|
+
# The client’s relationship with the emergency contact, for example, mother
|
|
107
|
+
# or spouse.
|
|
108
|
+
# @return [String]
|
|
109
|
+
attr_accessor :emergency_contact_info_relationship
|
|
110
|
+
|
|
111
|
+
# The date of the client’s first booked appointment at the business.
|
|
112
|
+
# @return [DateTime]
|
|
113
|
+
attr_accessor :first_appointment_date
|
|
114
|
+
|
|
115
|
+
# The client’s first name. You must specify a first name when you add a
|
|
116
|
+
# client.
|
|
117
|
+
# @return [String]
|
|
118
|
+
attr_accessor :first_name
|
|
119
|
+
|
|
120
|
+
# The client’s gender.
|
|
121
|
+
# @return [String]
|
|
122
|
+
attr_accessor :gender
|
|
123
|
+
|
|
124
|
+
# The client’s gender.
|
|
125
|
+
# @return [Location]
|
|
126
|
+
attr_accessor :home_location
|
|
127
|
+
|
|
128
|
+
# The client’s home phone number.
|
|
129
|
+
# @return [String]
|
|
130
|
+
attr_accessor :home_phone
|
|
131
|
+
|
|
132
|
+
# When `true`, indicates that the client should be marked as a company at
|
|
133
|
+
# the business.<br />
|
|
134
|
+
# When `false`, indicates the client is an individual and does not represent
|
|
135
|
+
# a company.
|
|
136
|
+
# @return [TrueClass | FalseClass]
|
|
137
|
+
attr_accessor :is_company
|
|
138
|
+
|
|
139
|
+
# This value is set only if the business owner allows individuals to be
|
|
140
|
+
# prospects.<br />
|
|
141
|
+
# If the business owner has enabled the setting to default new client as a
|
|
142
|
+
# Prospect, the isProspect value will always be true. Otherwise,<br />
|
|
143
|
+
# When `true`, indicates that the client should be marked as a prospect for
|
|
144
|
+
# the business.<br />
|
|
145
|
+
# When `false`, indicates that the client should not be marked as a prospect
|
|
146
|
+
# for the business.
|
|
147
|
+
# @return [TrueClass | FalseClass]
|
|
148
|
+
attr_accessor :is_prospect
|
|
149
|
+
|
|
150
|
+
# The last [formula
|
|
151
|
+
# note](https://support.mindbodyonline.com/s/article/203259903-Appointments-
|
|
152
|
+
# Formula-notes?language=en_US) entered for the client.
|
|
153
|
+
# @return [String]
|
|
154
|
+
attr_accessor :last_formula_notes
|
|
155
|
+
|
|
156
|
+
# The UTC date and time when the client’s information was last modified.
|
|
157
|
+
# @return [DateTime]
|
|
158
|
+
attr_accessor :last_modified_date_time
|
|
159
|
+
|
|
160
|
+
# The client’s last name. You must specify a last name when you add a
|
|
161
|
+
# client.
|
|
162
|
+
# @return [String]
|
|
163
|
+
attr_accessor :last_name
|
|
164
|
+
|
|
165
|
+
# The client’s last name. You must specify a last name when you add a
|
|
166
|
+
# client.
|
|
167
|
+
# @return [Liability]
|
|
168
|
+
attr_accessor :liability
|
|
169
|
+
|
|
170
|
+
# When `true`, sets the client’s liability information as follows:
|
|
171
|
+
# * `IsReleased` is set to true.
|
|
172
|
+
# * `AgreementDate` is set to the time zone of the business when the call
|
|
173
|
+
# was processed.
|
|
174
|
+
# * `ReleasedBy` is set to `null` if the call is made by the client, `0` if
|
|
175
|
+
# the call was made by the business owner, or to a specific staff member’s
|
|
176
|
+
# ID if a staff member made the call.
|
|
177
|
+
# When `false`, sets the client’s liability information as follows:
|
|
178
|
+
# * `IsReleased` is set to `false`.
|
|
179
|
+
# * `AgreementDate` is set to `null`.
|
|
180
|
+
# * `ReleasedBy` is set to `null`.
|
|
181
|
+
# @return [TrueClass | FalseClass]
|
|
182
|
+
attr_accessor :liability_release
|
|
183
|
+
|
|
184
|
+
# The ID of the membership icon displayed next to the client’s name, if the
|
|
185
|
+
# client has a membership on their account.
|
|
186
|
+
# @return [Integer]
|
|
187
|
+
attr_accessor :membership_icon
|
|
188
|
+
|
|
189
|
+
# The client’s middle name.
|
|
190
|
+
# @return [String]
|
|
191
|
+
attr_accessor :middle_name
|
|
192
|
+
|
|
193
|
+
# The client’s mobile phone number.
|
|
194
|
+
# @return [String]
|
|
195
|
+
attr_accessor :mobile_phone
|
|
196
|
+
|
|
197
|
+
# The client's mobile provider.
|
|
198
|
+
# @return [Integer]
|
|
199
|
+
attr_accessor :mobile_provider
|
|
200
|
+
|
|
201
|
+
# The new RSSID to be used for the client. Use `NewId` to assign a specific
|
|
202
|
+
# alphanumeric value to be a client’s ID. This RSSID must be unique within
|
|
203
|
+
# the subscriber’s site. If this is a cross-regional update, the RSSID must
|
|
204
|
+
# be unique across the region. If the requested value is already in use, the
|
|
205
|
+
# call returns an error.
|
|
206
|
+
# Note: NewId value cannot fall within the reserved default ID range
|
|
207
|
+
# (100000000 -> 101000000)
|
|
208
|
+
# @return [String]
|
|
209
|
+
attr_accessor :new_id
|
|
210
|
+
|
|
211
|
+
# Any notes entered on the client’s account by staff members. This value
|
|
212
|
+
# should never be shown to clients unless the business owner has a specific
|
|
213
|
+
# reason for showing them.
|
|
214
|
+
# @return [String]
|
|
215
|
+
attr_accessor :notes
|
|
216
|
+
|
|
217
|
+
# The URL for the client’s photo, if one has been uploaded.
|
|
218
|
+
# @return [String]
|
|
219
|
+
attr_accessor :photo_url
|
|
220
|
+
|
|
221
|
+
# The client’s postal code.
|
|
222
|
+
# @return [String]
|
|
223
|
+
attr_accessor :postal_code
|
|
224
|
+
|
|
225
|
+
# The client’s postal code.
|
|
226
|
+
# @return [ProspectStage]
|
|
227
|
+
attr_accessor :prospect_stage
|
|
228
|
+
|
|
229
|
+
# Contains any red alert information entered by the business owner for the
|
|
230
|
+
# client.
|
|
231
|
+
# @return [String]
|
|
232
|
+
attr_accessor :red_alert
|
|
233
|
+
|
|
234
|
+
# Specifies how the client was referred to the business. You can get a list
|
|
235
|
+
# of possible strings using the `GET ClientReferralTypes` endpoint.<br />
|
|
236
|
+
# For more information, see [Referral types and referral
|
|
237
|
+
# subtypes](https://support.mindbodyonline.com/s/article/203259393-Referral-
|
|
238
|
+
# types-and-referral-subtypes?language=en_US).
|
|
239
|
+
# @return [String]
|
|
240
|
+
attr_accessor :referred_by
|
|
241
|
+
|
|
242
|
+
# Contains information about the sales representatives to be assigned to the
|
|
243
|
+
# new client.
|
|
244
|
+
# @return [Array[SalesRep]]
|
|
245
|
+
attr_accessor :sales_reps
|
|
246
|
+
|
|
247
|
+
# The ID of the site.
|
|
248
|
+
# @return [Integer]
|
|
249
|
+
attr_accessor :site_id
|
|
250
|
+
|
|
251
|
+
# The client’s state.
|
|
252
|
+
# @return [String]
|
|
253
|
+
attr_accessor :state
|
|
254
|
+
|
|
255
|
+
# The client’s status.
|
|
256
|
+
# @return [String]
|
|
257
|
+
attr_accessor :status
|
|
258
|
+
|
|
259
|
+
# When `true`, indicates that test mode is enabled. The method is validated,
|
|
260
|
+
# but no client data is added or updated.<br />
|
|
261
|
+
# Default: **false**
|
|
262
|
+
# @return [TrueClass | FalseClass]
|
|
263
|
+
attr_accessor :test
|
|
264
|
+
|
|
265
|
+
# The client’s system-generated ID at the business. This value cannot be
|
|
266
|
+
# changed by business owners and is always unique across all clients at the
|
|
267
|
+
# business. This ID is not widely used in the Public API, but can be used by
|
|
268
|
+
# your application to uniquely identify clients.
|
|
269
|
+
# @return [Integer]
|
|
270
|
+
attr_accessor :unique_id
|
|
271
|
+
|
|
272
|
+
# The client’s work phone extension number.
|
|
273
|
+
# @return [String]
|
|
274
|
+
attr_accessor :work_extension
|
|
275
|
+
|
|
276
|
+
# The client’s work phone number.
|
|
277
|
+
# @return [String]
|
|
278
|
+
attr_accessor :work_phone
|
|
279
|
+
|
|
280
|
+
# Contains any yellow alert information entered by the business owner for
|
|
281
|
+
# the client.
|
|
282
|
+
# @return [String]
|
|
283
|
+
attr_accessor :yellow_alert
|
|
284
|
+
|
|
285
|
+
# When `true`, indicates that the client opts to receive schedule emails.
|
|
286
|
+
# Default : **false**
|
|
287
|
+
# @return [TrueClass | FalseClass]
|
|
288
|
+
attr_accessor :send_schedule_emails
|
|
289
|
+
|
|
290
|
+
# When `true`, indicates that the client opts to receive account emails.
|
|
291
|
+
# Default : **false**
|
|
292
|
+
# @return [TrueClass | FalseClass]
|
|
293
|
+
attr_accessor :send_account_emails
|
|
294
|
+
|
|
295
|
+
# When `true`, indicates that the client opts to receive promotional emails.
|
|
296
|
+
# Default : **false**
|
|
297
|
+
# @return [TrueClass | FalseClass]
|
|
298
|
+
attr_accessor :send_promotional_emails
|
|
299
|
+
|
|
300
|
+
# When `true`, indicates that the client opts to receive schedule texts.
|
|
301
|
+
# @return [TrueClass | FalseClass]
|
|
302
|
+
attr_accessor :send_schedule_texts
|
|
303
|
+
|
|
304
|
+
# When `true`, indicates that the client opts to receive account texts.
|
|
305
|
+
# @return [TrueClass | FalseClass]
|
|
306
|
+
attr_accessor :send_account_texts
|
|
307
|
+
|
|
308
|
+
# When `true`, indicates that the client opts to receive promotional texts.
|
|
309
|
+
# @return [TrueClass | FalseClass]
|
|
310
|
+
attr_accessor :send_promotional_texts
|
|
311
|
+
|
|
312
|
+
# The clients locker number.
|
|
313
|
+
# @return [String]
|
|
314
|
+
attr_accessor :locker_number
|
|
315
|
+
|
|
316
|
+
# When `true`, indicates that the client opts to reactive existing Inactive
|
|
317
|
+
# client.
|
|
318
|
+
# @return [TrueClass | FalseClass]
|
|
319
|
+
attr_accessor :reactivate_inactive_client
|
|
320
|
+
|
|
321
|
+
# The ID of the LeadChannel from LeadManagement. This parameter is required
|
|
322
|
+
# by LeadManagement to track the LeadChannel from where the new client is
|
|
323
|
+
# added.
|
|
324
|
+
# If this value is not supplied then it won't save anything.
|
|
325
|
+
# @return [Integer]
|
|
326
|
+
attr_accessor :lead_channel_id
|
|
327
|
+
|
|
328
|
+
# A mapping from model property names to API property names.
|
|
329
|
+
def self.names
|
|
330
|
+
@_hash = {} if @_hash.nil?
|
|
331
|
+
@_hash['account_balance'] = 'AccountBalance'
|
|
332
|
+
@_hash['action'] = 'Action'
|
|
333
|
+
@_hash['active'] = 'Active'
|
|
334
|
+
@_hash['address_line1'] = 'AddressLine1'
|
|
335
|
+
@_hash['address_line2'] = 'AddressLine2'
|
|
336
|
+
@_hash['appt_gender_pref_male'] = 'ApptGenderPrefMale'
|
|
337
|
+
@_hash['birth_date'] = 'BirthDate'
|
|
338
|
+
@_hash['city'] = 'City'
|
|
339
|
+
@_hash['client_credit_card'] = 'ClientCreditCard'
|
|
340
|
+
@_hash['client_indexes'] = 'ClientIndexes'
|
|
341
|
+
@_hash['client_relationships'] = 'ClientRelationships'
|
|
342
|
+
@_hash['country'] = 'Country'
|
|
343
|
+
@_hash['creation_date'] = 'CreationDate'
|
|
344
|
+
@_hash['custom_client_fields'] = 'CustomClientFields'
|
|
345
|
+
@_hash['email'] = 'Email'
|
|
346
|
+
@_hash['emergency_contact_info_email'] = 'EmergencyContactInfoEmail'
|
|
347
|
+
@_hash['emergency_contact_info_name'] = 'EmergencyContactInfoName'
|
|
348
|
+
@_hash['emergency_contact_info_phone'] = 'EmergencyContactInfoPhone'
|
|
349
|
+
@_hash['emergency_contact_info_relationship'] =
|
|
350
|
+
'EmergencyContactInfoRelationship'
|
|
351
|
+
@_hash['first_appointment_date'] = 'FirstAppointmentDate'
|
|
352
|
+
@_hash['first_name'] = 'FirstName'
|
|
353
|
+
@_hash['gender'] = 'Gender'
|
|
354
|
+
@_hash['home_location'] = 'HomeLocation'
|
|
355
|
+
@_hash['home_phone'] = 'HomePhone'
|
|
356
|
+
@_hash['is_company'] = 'IsCompany'
|
|
357
|
+
@_hash['is_prospect'] = 'IsProspect'
|
|
358
|
+
@_hash['last_formula_notes'] = 'LastFormulaNotes'
|
|
359
|
+
@_hash['last_modified_date_time'] = 'LastModifiedDateTime'
|
|
360
|
+
@_hash['last_name'] = 'LastName'
|
|
361
|
+
@_hash['liability'] = 'Liability'
|
|
362
|
+
@_hash['liability_release'] = 'LiabilityRelease'
|
|
363
|
+
@_hash['membership_icon'] = 'MembershipIcon'
|
|
364
|
+
@_hash['middle_name'] = 'MiddleName'
|
|
365
|
+
@_hash['mobile_phone'] = 'MobilePhone'
|
|
366
|
+
@_hash['mobile_provider'] = 'MobileProvider'
|
|
367
|
+
@_hash['new_id'] = 'NewId'
|
|
368
|
+
@_hash['notes'] = 'Notes'
|
|
369
|
+
@_hash['photo_url'] = 'PhotoUrl'
|
|
370
|
+
@_hash['postal_code'] = 'PostalCode'
|
|
371
|
+
@_hash['prospect_stage'] = 'ProspectStage'
|
|
372
|
+
@_hash['red_alert'] = 'RedAlert'
|
|
373
|
+
@_hash['referred_by'] = 'ReferredBy'
|
|
374
|
+
@_hash['sales_reps'] = 'SalesReps'
|
|
375
|
+
@_hash['site_id'] = 'SiteId'
|
|
376
|
+
@_hash['state'] = 'State'
|
|
377
|
+
@_hash['status'] = 'Status'
|
|
378
|
+
@_hash['test'] = 'Test'
|
|
379
|
+
@_hash['unique_id'] = 'UniqueId'
|
|
380
|
+
@_hash['work_extension'] = 'WorkExtension'
|
|
381
|
+
@_hash['work_phone'] = 'WorkPhone'
|
|
382
|
+
@_hash['yellow_alert'] = 'YellowAlert'
|
|
383
|
+
@_hash['send_schedule_emails'] = 'SendScheduleEmails'
|
|
384
|
+
@_hash['send_account_emails'] = 'SendAccountEmails'
|
|
385
|
+
@_hash['send_promotional_emails'] = 'SendPromotionalEmails'
|
|
386
|
+
@_hash['send_schedule_texts'] = 'SendScheduleTexts'
|
|
387
|
+
@_hash['send_account_texts'] = 'SendAccountTexts'
|
|
388
|
+
@_hash['send_promotional_texts'] = 'SendPromotionalTexts'
|
|
389
|
+
@_hash['locker_number'] = 'LockerNumber'
|
|
390
|
+
@_hash['reactivate_inactive_client'] = 'ReactivateInactiveClient'
|
|
391
|
+
@_hash['lead_channel_id'] = 'LeadChannelId'
|
|
392
|
+
@_hash
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# An array for optional fields
|
|
396
|
+
def self.optionals
|
|
397
|
+
%w[
|
|
398
|
+
account_balance
|
|
399
|
+
action
|
|
400
|
+
active
|
|
401
|
+
address_line1
|
|
402
|
+
address_line2
|
|
403
|
+
appt_gender_pref_male
|
|
404
|
+
birth_date
|
|
405
|
+
city
|
|
406
|
+
client_credit_card
|
|
407
|
+
client_indexes
|
|
408
|
+
client_relationships
|
|
409
|
+
country
|
|
410
|
+
creation_date
|
|
411
|
+
custom_client_fields
|
|
412
|
+
email
|
|
413
|
+
emergency_contact_info_email
|
|
414
|
+
emergency_contact_info_name
|
|
415
|
+
emergency_contact_info_phone
|
|
416
|
+
emergency_contact_info_relationship
|
|
417
|
+
first_appointment_date
|
|
418
|
+
gender
|
|
419
|
+
home_location
|
|
420
|
+
home_phone
|
|
421
|
+
is_company
|
|
422
|
+
is_prospect
|
|
423
|
+
last_formula_notes
|
|
424
|
+
last_modified_date_time
|
|
425
|
+
liability
|
|
426
|
+
liability_release
|
|
427
|
+
membership_icon
|
|
428
|
+
middle_name
|
|
429
|
+
mobile_phone
|
|
430
|
+
mobile_provider
|
|
431
|
+
new_id
|
|
432
|
+
notes
|
|
433
|
+
photo_url
|
|
434
|
+
postal_code
|
|
435
|
+
prospect_stage
|
|
436
|
+
red_alert
|
|
437
|
+
referred_by
|
|
438
|
+
sales_reps
|
|
439
|
+
site_id
|
|
440
|
+
state
|
|
441
|
+
status
|
|
442
|
+
test
|
|
443
|
+
unique_id
|
|
444
|
+
work_extension
|
|
445
|
+
work_phone
|
|
446
|
+
yellow_alert
|
|
447
|
+
send_schedule_emails
|
|
448
|
+
send_account_emails
|
|
449
|
+
send_promotional_emails
|
|
450
|
+
send_schedule_texts
|
|
451
|
+
send_account_texts
|
|
452
|
+
send_promotional_texts
|
|
453
|
+
locker_number
|
|
454
|
+
reactivate_inactive_client
|
|
455
|
+
lead_channel_id
|
|
456
|
+
]
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# An array for nullable fields
|
|
460
|
+
def self.nullables
|
|
461
|
+
[]
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def initialize(first_name = nil, last_name = nil, account_balance = SKIP,
|
|
465
|
+
action = SKIP, active = SKIP, address_line1 = SKIP,
|
|
466
|
+
address_line2 = SKIP, appt_gender_pref_male = SKIP,
|
|
467
|
+
birth_date = SKIP, city = SKIP, client_credit_card = SKIP,
|
|
468
|
+
client_indexes = SKIP, client_relationships = SKIP,
|
|
469
|
+
country = SKIP, creation_date = SKIP,
|
|
470
|
+
custom_client_fields = SKIP, email = SKIP,
|
|
471
|
+
emergency_contact_info_email = SKIP,
|
|
472
|
+
emergency_contact_info_name = SKIP,
|
|
473
|
+
emergency_contact_info_phone = SKIP,
|
|
474
|
+
emergency_contact_info_relationship = SKIP,
|
|
475
|
+
first_appointment_date = SKIP, gender = SKIP,
|
|
476
|
+
home_location = SKIP, home_phone = SKIP, is_company = SKIP,
|
|
477
|
+
is_prospect = SKIP, last_formula_notes = SKIP,
|
|
478
|
+
last_modified_date_time = SKIP, liability = SKIP,
|
|
479
|
+
liability_release = SKIP, membership_icon = SKIP,
|
|
480
|
+
middle_name = SKIP, mobile_phone = SKIP,
|
|
481
|
+
mobile_provider = SKIP, new_id = SKIP, notes = SKIP,
|
|
482
|
+
photo_url = SKIP, postal_code = SKIP, prospect_stage = SKIP,
|
|
483
|
+
red_alert = SKIP, referred_by = SKIP, sales_reps = SKIP,
|
|
484
|
+
site_id = SKIP, state = SKIP, status = SKIP, test = SKIP,
|
|
485
|
+
unique_id = SKIP, work_extension = SKIP, work_phone = SKIP,
|
|
486
|
+
yellow_alert = SKIP, send_schedule_emails = SKIP,
|
|
487
|
+
send_account_emails = SKIP, send_promotional_emails = SKIP,
|
|
488
|
+
send_schedule_texts = SKIP, send_account_texts = SKIP,
|
|
489
|
+
send_promotional_texts = SKIP, locker_number = SKIP,
|
|
490
|
+
reactivate_inactive_client = SKIP, lead_channel_id = SKIP)
|
|
491
|
+
@account_balance = account_balance unless account_balance == SKIP
|
|
492
|
+
@action = action unless action == SKIP
|
|
493
|
+
@active = active unless active == SKIP
|
|
494
|
+
@address_line1 = address_line1 unless address_line1 == SKIP
|
|
495
|
+
@address_line2 = address_line2 unless address_line2 == SKIP
|
|
496
|
+
@appt_gender_pref_male = appt_gender_pref_male unless appt_gender_pref_male == SKIP
|
|
497
|
+
@birth_date = birth_date unless birth_date == SKIP
|
|
498
|
+
@city = city unless city == SKIP
|
|
499
|
+
@client_credit_card = client_credit_card unless client_credit_card == SKIP
|
|
500
|
+
@client_indexes = client_indexes unless client_indexes == SKIP
|
|
501
|
+
@client_relationships = client_relationships unless client_relationships == SKIP
|
|
502
|
+
@country = country unless country == SKIP
|
|
503
|
+
@creation_date = creation_date unless creation_date == SKIP
|
|
504
|
+
@custom_client_fields = custom_client_fields unless custom_client_fields == SKIP
|
|
505
|
+
@email = email unless email == SKIP
|
|
506
|
+
unless emergency_contact_info_email == SKIP
|
|
507
|
+
@emergency_contact_info_email =
|
|
508
|
+
emergency_contact_info_email
|
|
509
|
+
end
|
|
510
|
+
unless emergency_contact_info_name == SKIP
|
|
511
|
+
@emergency_contact_info_name =
|
|
512
|
+
emergency_contact_info_name
|
|
513
|
+
end
|
|
514
|
+
unless emergency_contact_info_phone == SKIP
|
|
515
|
+
@emergency_contact_info_phone =
|
|
516
|
+
emergency_contact_info_phone
|
|
517
|
+
end
|
|
518
|
+
unless emergency_contact_info_relationship == SKIP
|
|
519
|
+
@emergency_contact_info_relationship =
|
|
520
|
+
emergency_contact_info_relationship
|
|
521
|
+
end
|
|
522
|
+
@first_appointment_date = first_appointment_date unless first_appointment_date == SKIP
|
|
523
|
+
@first_name = first_name
|
|
524
|
+
@gender = gender unless gender == SKIP
|
|
525
|
+
@home_location = home_location unless home_location == SKIP
|
|
526
|
+
@home_phone = home_phone unless home_phone == SKIP
|
|
527
|
+
@is_company = is_company unless is_company == SKIP
|
|
528
|
+
@is_prospect = is_prospect unless is_prospect == SKIP
|
|
529
|
+
@last_formula_notes = last_formula_notes unless last_formula_notes == SKIP
|
|
530
|
+
@last_modified_date_time = last_modified_date_time unless last_modified_date_time == SKIP
|
|
531
|
+
@last_name = last_name
|
|
532
|
+
@liability = liability unless liability == SKIP
|
|
533
|
+
@liability_release = liability_release unless liability_release == SKIP
|
|
534
|
+
@membership_icon = membership_icon unless membership_icon == SKIP
|
|
535
|
+
@middle_name = middle_name unless middle_name == SKIP
|
|
536
|
+
@mobile_phone = mobile_phone unless mobile_phone == SKIP
|
|
537
|
+
@mobile_provider = mobile_provider unless mobile_provider == SKIP
|
|
538
|
+
@new_id = new_id unless new_id == SKIP
|
|
539
|
+
@notes = notes unless notes == SKIP
|
|
540
|
+
@photo_url = photo_url unless photo_url == SKIP
|
|
541
|
+
@postal_code = postal_code unless postal_code == SKIP
|
|
542
|
+
@prospect_stage = prospect_stage unless prospect_stage == SKIP
|
|
543
|
+
@red_alert = red_alert unless red_alert == SKIP
|
|
544
|
+
@referred_by = referred_by unless referred_by == SKIP
|
|
545
|
+
@sales_reps = sales_reps unless sales_reps == SKIP
|
|
546
|
+
@site_id = site_id unless site_id == SKIP
|
|
547
|
+
@state = state unless state == SKIP
|
|
548
|
+
@status = status unless status == SKIP
|
|
549
|
+
@test = test unless test == SKIP
|
|
550
|
+
@unique_id = unique_id unless unique_id == SKIP
|
|
551
|
+
@work_extension = work_extension unless work_extension == SKIP
|
|
552
|
+
@work_phone = work_phone unless work_phone == SKIP
|
|
553
|
+
@yellow_alert = yellow_alert unless yellow_alert == SKIP
|
|
554
|
+
@send_schedule_emails = send_schedule_emails unless send_schedule_emails == SKIP
|
|
555
|
+
@send_account_emails = send_account_emails unless send_account_emails == SKIP
|
|
556
|
+
@send_promotional_emails = send_promotional_emails unless send_promotional_emails == SKIP
|
|
557
|
+
@send_schedule_texts = send_schedule_texts unless send_schedule_texts == SKIP
|
|
558
|
+
@send_account_texts = send_account_texts unless send_account_texts == SKIP
|
|
559
|
+
@send_promotional_texts = send_promotional_texts unless send_promotional_texts == SKIP
|
|
560
|
+
@locker_number = locker_number unless locker_number == SKIP
|
|
561
|
+
unless reactivate_inactive_client == SKIP
|
|
562
|
+
@reactivate_inactive_client =
|
|
563
|
+
reactivate_inactive_client
|
|
564
|
+
end
|
|
565
|
+
@lead_channel_id = lead_channel_id unless lead_channel_id == SKIP
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# Creates an instance of the object from a hash.
|
|
569
|
+
def self.from_hash(hash)
|
|
570
|
+
return nil unless hash
|
|
571
|
+
|
|
572
|
+
# Extract variables from the hash.
|
|
573
|
+
first_name = hash.key?('FirstName') ? hash['FirstName'] : nil
|
|
574
|
+
last_name = hash.key?('LastName') ? hash['LastName'] : nil
|
|
575
|
+
account_balance =
|
|
576
|
+
hash.key?('AccountBalance') ? hash['AccountBalance'] : SKIP
|
|
577
|
+
action = hash.key?('Action') ? hash['Action'] : SKIP
|
|
578
|
+
active = hash.key?('Active') ? hash['Active'] : SKIP
|
|
579
|
+
address_line1 = hash.key?('AddressLine1') ? hash['AddressLine1'] : SKIP
|
|
580
|
+
address_line2 = hash.key?('AddressLine2') ? hash['AddressLine2'] : SKIP
|
|
581
|
+
appt_gender_pref_male =
|
|
582
|
+
hash.key?('ApptGenderPrefMale') ? hash['ApptGenderPrefMale'] : SKIP
|
|
583
|
+
birth_date = if hash.key?('BirthDate')
|
|
584
|
+
(DateTimeHelper.from_rfc3339(hash['BirthDate']) if hash['BirthDate'])
|
|
585
|
+
else
|
|
586
|
+
SKIP
|
|
587
|
+
end
|
|
588
|
+
city = hash.key?('City') ? hash['City'] : SKIP
|
|
589
|
+
client_credit_card = ClientCreditCard.from_hash(hash['ClientCreditCard']) if
|
|
590
|
+
hash['ClientCreditCard']
|
|
591
|
+
# Parameter is an array, so we need to iterate through it
|
|
592
|
+
client_indexes = nil
|
|
593
|
+
unless hash['ClientIndexes'].nil?
|
|
594
|
+
client_indexes = []
|
|
595
|
+
hash['ClientIndexes'].each do |structure|
|
|
596
|
+
client_indexes << (AssignedClientIndex.from_hash(structure) if structure)
|
|
597
|
+
end
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
client_indexes = SKIP unless hash.key?('ClientIndexes')
|
|
601
|
+
# Parameter is an array, so we need to iterate through it
|
|
602
|
+
client_relationships = nil
|
|
603
|
+
unless hash['ClientRelationships'].nil?
|
|
604
|
+
client_relationships = []
|
|
605
|
+
hash['ClientRelationships'].each do |structure|
|
|
606
|
+
client_relationships << (ClientRelationship.from_hash(structure) if structure)
|
|
607
|
+
end
|
|
608
|
+
end
|
|
609
|
+
|
|
610
|
+
client_relationships = SKIP unless hash.key?('ClientRelationships')
|
|
611
|
+
country = hash.key?('Country') ? hash['Country'] : SKIP
|
|
612
|
+
creation_date = if hash.key?('CreationDate')
|
|
613
|
+
(DateTimeHelper.from_rfc3339(hash['CreationDate']) if hash['CreationDate'])
|
|
614
|
+
else
|
|
615
|
+
SKIP
|
|
616
|
+
end
|
|
617
|
+
# Parameter is an array, so we need to iterate through it
|
|
618
|
+
custom_client_fields = nil
|
|
619
|
+
unless hash['CustomClientFields'].nil?
|
|
620
|
+
custom_client_fields = []
|
|
621
|
+
hash['CustomClientFields'].each do |structure|
|
|
622
|
+
custom_client_fields << (CustomClientFieldValue.from_hash(structure) if structure)
|
|
623
|
+
end
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
custom_client_fields = SKIP unless hash.key?('CustomClientFields')
|
|
627
|
+
email = hash.key?('Email') ? hash['Email'] : SKIP
|
|
628
|
+
emergency_contact_info_email =
|
|
629
|
+
hash.key?('EmergencyContactInfoEmail') ? hash['EmergencyContactInfoEmail'] : SKIP
|
|
630
|
+
emergency_contact_info_name =
|
|
631
|
+
hash.key?('EmergencyContactInfoName') ? hash['EmergencyContactInfoName'] : SKIP
|
|
632
|
+
emergency_contact_info_phone =
|
|
633
|
+
hash.key?('EmergencyContactInfoPhone') ? hash['EmergencyContactInfoPhone'] : SKIP
|
|
634
|
+
emergency_contact_info_relationship =
|
|
635
|
+
hash.key?('EmergencyContactInfoRelationship') ? hash['EmergencyContactInfoRelationship'] : SKIP
|
|
636
|
+
first_appointment_date = if hash.key?('FirstAppointmentDate')
|
|
637
|
+
(DateTimeHelper.from_rfc3339(hash['FirstAppointmentDate']) if hash['FirstAppointmentDate'])
|
|
638
|
+
else
|
|
639
|
+
SKIP
|
|
640
|
+
end
|
|
641
|
+
gender = hash.key?('Gender') ? hash['Gender'] : SKIP
|
|
642
|
+
home_location = Location.from_hash(hash['HomeLocation']) if hash['HomeLocation']
|
|
643
|
+
home_phone = hash.key?('HomePhone') ? hash['HomePhone'] : SKIP
|
|
644
|
+
is_company = hash.key?('IsCompany') ? hash['IsCompany'] : SKIP
|
|
645
|
+
is_prospect = hash.key?('IsProspect') ? hash['IsProspect'] : SKIP
|
|
646
|
+
last_formula_notes =
|
|
647
|
+
hash.key?('LastFormulaNotes') ? hash['LastFormulaNotes'] : SKIP
|
|
648
|
+
last_modified_date_time = if hash.key?('LastModifiedDateTime')
|
|
649
|
+
(DateTimeHelper.from_rfc3339(hash['LastModifiedDateTime']) if hash['LastModifiedDateTime'])
|
|
650
|
+
else
|
|
651
|
+
SKIP
|
|
652
|
+
end
|
|
653
|
+
liability = Liability.from_hash(hash['Liability']) if hash['Liability']
|
|
654
|
+
liability_release =
|
|
655
|
+
hash.key?('LiabilityRelease') ? hash['LiabilityRelease'] : SKIP
|
|
656
|
+
membership_icon =
|
|
657
|
+
hash.key?('MembershipIcon') ? hash['MembershipIcon'] : SKIP
|
|
658
|
+
middle_name = hash.key?('MiddleName') ? hash['MiddleName'] : SKIP
|
|
659
|
+
mobile_phone = hash.key?('MobilePhone') ? hash['MobilePhone'] : SKIP
|
|
660
|
+
mobile_provider =
|
|
661
|
+
hash.key?('MobileProvider') ? hash['MobileProvider'] : SKIP
|
|
662
|
+
new_id = hash.key?('NewId') ? hash['NewId'] : SKIP
|
|
663
|
+
notes = hash.key?('Notes') ? hash['Notes'] : SKIP
|
|
664
|
+
photo_url = hash.key?('PhotoUrl') ? hash['PhotoUrl'] : SKIP
|
|
665
|
+
postal_code = hash.key?('PostalCode') ? hash['PostalCode'] : SKIP
|
|
666
|
+
prospect_stage = ProspectStage.from_hash(hash['ProspectStage']) if hash['ProspectStage']
|
|
667
|
+
red_alert = hash.key?('RedAlert') ? hash['RedAlert'] : SKIP
|
|
668
|
+
referred_by = hash.key?('ReferredBy') ? hash['ReferredBy'] : SKIP
|
|
669
|
+
# Parameter is an array, so we need to iterate through it
|
|
670
|
+
sales_reps = nil
|
|
671
|
+
unless hash['SalesReps'].nil?
|
|
672
|
+
sales_reps = []
|
|
673
|
+
hash['SalesReps'].each do |structure|
|
|
674
|
+
sales_reps << (SalesRep.from_hash(structure) if structure)
|
|
675
|
+
end
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
sales_reps = SKIP unless hash.key?('SalesReps')
|
|
679
|
+
site_id = hash.key?('SiteId') ? hash['SiteId'] : SKIP
|
|
680
|
+
state = hash.key?('State') ? hash['State'] : SKIP
|
|
681
|
+
status = hash.key?('Status') ? hash['Status'] : SKIP
|
|
682
|
+
test = hash.key?('Test') ? hash['Test'] : SKIP
|
|
683
|
+
unique_id = hash.key?('UniqueId') ? hash['UniqueId'] : SKIP
|
|
684
|
+
work_extension = hash.key?('WorkExtension') ? hash['WorkExtension'] : SKIP
|
|
685
|
+
work_phone = hash.key?('WorkPhone') ? hash['WorkPhone'] : SKIP
|
|
686
|
+
yellow_alert = hash.key?('YellowAlert') ? hash['YellowAlert'] : SKIP
|
|
687
|
+
send_schedule_emails =
|
|
688
|
+
hash.key?('SendScheduleEmails') ? hash['SendScheduleEmails'] : SKIP
|
|
689
|
+
send_account_emails =
|
|
690
|
+
hash.key?('SendAccountEmails') ? hash['SendAccountEmails'] : SKIP
|
|
691
|
+
send_promotional_emails =
|
|
692
|
+
hash.key?('SendPromotionalEmails') ? hash['SendPromotionalEmails'] : SKIP
|
|
693
|
+
send_schedule_texts =
|
|
694
|
+
hash.key?('SendScheduleTexts') ? hash['SendScheduleTexts'] : SKIP
|
|
695
|
+
send_account_texts =
|
|
696
|
+
hash.key?('SendAccountTexts') ? hash['SendAccountTexts'] : SKIP
|
|
697
|
+
send_promotional_texts =
|
|
698
|
+
hash.key?('SendPromotionalTexts') ? hash['SendPromotionalTexts'] : SKIP
|
|
699
|
+
locker_number = hash.key?('LockerNumber') ? hash['LockerNumber'] : SKIP
|
|
700
|
+
reactivate_inactive_client =
|
|
701
|
+
hash.key?('ReactivateInactiveClient') ? hash['ReactivateInactiveClient'] : SKIP
|
|
702
|
+
lead_channel_id =
|
|
703
|
+
hash.key?('LeadChannelId') ? hash['LeadChannelId'] : SKIP
|
|
704
|
+
|
|
705
|
+
# Create object from extracted values.
|
|
706
|
+
AddClientRequest.new(first_name,
|
|
707
|
+
last_name,
|
|
708
|
+
account_balance,
|
|
709
|
+
action,
|
|
710
|
+
active,
|
|
711
|
+
address_line1,
|
|
712
|
+
address_line2,
|
|
713
|
+
appt_gender_pref_male,
|
|
714
|
+
birth_date,
|
|
715
|
+
city,
|
|
716
|
+
client_credit_card,
|
|
717
|
+
client_indexes,
|
|
718
|
+
client_relationships,
|
|
719
|
+
country,
|
|
720
|
+
creation_date,
|
|
721
|
+
custom_client_fields,
|
|
722
|
+
email,
|
|
723
|
+
emergency_contact_info_email,
|
|
724
|
+
emergency_contact_info_name,
|
|
725
|
+
emergency_contact_info_phone,
|
|
726
|
+
emergency_contact_info_relationship,
|
|
727
|
+
first_appointment_date,
|
|
728
|
+
gender,
|
|
729
|
+
home_location,
|
|
730
|
+
home_phone,
|
|
731
|
+
is_company,
|
|
732
|
+
is_prospect,
|
|
733
|
+
last_formula_notes,
|
|
734
|
+
last_modified_date_time,
|
|
735
|
+
liability,
|
|
736
|
+
liability_release,
|
|
737
|
+
membership_icon,
|
|
738
|
+
middle_name,
|
|
739
|
+
mobile_phone,
|
|
740
|
+
mobile_provider,
|
|
741
|
+
new_id,
|
|
742
|
+
notes,
|
|
743
|
+
photo_url,
|
|
744
|
+
postal_code,
|
|
745
|
+
prospect_stage,
|
|
746
|
+
red_alert,
|
|
747
|
+
referred_by,
|
|
748
|
+
sales_reps,
|
|
749
|
+
site_id,
|
|
750
|
+
state,
|
|
751
|
+
status,
|
|
752
|
+
test,
|
|
753
|
+
unique_id,
|
|
754
|
+
work_extension,
|
|
755
|
+
work_phone,
|
|
756
|
+
yellow_alert,
|
|
757
|
+
send_schedule_emails,
|
|
758
|
+
send_account_emails,
|
|
759
|
+
send_promotional_emails,
|
|
760
|
+
send_schedule_texts,
|
|
761
|
+
send_account_texts,
|
|
762
|
+
send_promotional_texts,
|
|
763
|
+
locker_number,
|
|
764
|
+
reactivate_inactive_client,
|
|
765
|
+
lead_channel_id)
|
|
766
|
+
end
|
|
767
|
+
|
|
768
|
+
def to_custom_birth_date
|
|
769
|
+
DateTimeHelper.to_rfc3339(birth_date)
|
|
770
|
+
end
|
|
771
|
+
|
|
772
|
+
def to_custom_creation_date
|
|
773
|
+
DateTimeHelper.to_rfc3339(creation_date)
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
def to_custom_first_appointment_date
|
|
777
|
+
DateTimeHelper.to_rfc3339(first_appointment_date)
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
def to_custom_last_modified_date_time
|
|
781
|
+
DateTimeHelper.to_rfc3339(last_modified_date_time)
|
|
782
|
+
end
|
|
783
|
+
|
|
784
|
+
# Provides a human-readable string representation of the object.
|
|
785
|
+
def to_s
|
|
786
|
+
class_name = self.class.name.split('::').last
|
|
787
|
+
"<#{class_name} account_balance: #{@account_balance}, action: #{@action}, active:"\
|
|
788
|
+
" #{@active}, address_line1: #{@address_line1}, address_line2: #{@address_line2},"\
|
|
789
|
+
" appt_gender_pref_male: #{@appt_gender_pref_male}, birth_date: #{@birth_date}, city:"\
|
|
790
|
+
" #{@city}, client_credit_card: #{@client_credit_card}, client_indexes: #{@client_indexes},"\
|
|
791
|
+
" client_relationships: #{@client_relationships}, country: #{@country}, creation_date:"\
|
|
792
|
+
" #{@creation_date}, custom_client_fields: #{@custom_client_fields}, email: #{@email},"\
|
|
793
|
+
" emergency_contact_info_email: #{@emergency_contact_info_email},"\
|
|
794
|
+
" emergency_contact_info_name: #{@emergency_contact_info_name},"\
|
|
795
|
+
" emergency_contact_info_phone: #{@emergency_contact_info_phone},"\
|
|
796
|
+
" emergency_contact_info_relationship: #{@emergency_contact_info_relationship},"\
|
|
797
|
+
" first_appointment_date: #{@first_appointment_date}, first_name: #{@first_name}, gender:"\
|
|
798
|
+
" #{@gender}, home_location: #{@home_location}, home_phone: #{@home_phone}, is_company:"\
|
|
799
|
+
" #{@is_company}, is_prospect: #{@is_prospect}, last_formula_notes: #{@last_formula_notes},"\
|
|
800
|
+
" last_modified_date_time: #{@last_modified_date_time}, last_name: #{@last_name}, liability:"\
|
|
801
|
+
" #{@liability}, liability_release: #{@liability_release}, membership_icon:"\
|
|
802
|
+
" #{@membership_icon}, middle_name: #{@middle_name}, mobile_phone: #{@mobile_phone},"\
|
|
803
|
+
" mobile_provider: #{@mobile_provider}, new_id: #{@new_id}, notes: #{@notes}, photo_url:"\
|
|
804
|
+
" #{@photo_url}, postal_code: #{@postal_code}, prospect_stage: #{@prospect_stage},"\
|
|
805
|
+
" red_alert: #{@red_alert}, referred_by: #{@referred_by}, sales_reps: #{@sales_reps},"\
|
|
806
|
+
" site_id: #{@site_id}, state: #{@state}, status: #{@status}, test: #{@test}, unique_id:"\
|
|
807
|
+
" #{@unique_id}, work_extension: #{@work_extension}, work_phone: #{@work_phone},"\
|
|
808
|
+
" yellow_alert: #{@yellow_alert}, send_schedule_emails: #{@send_schedule_emails},"\
|
|
809
|
+
" send_account_emails: #{@send_account_emails}, send_promotional_emails:"\
|
|
810
|
+
" #{@send_promotional_emails}, send_schedule_texts: #{@send_schedule_texts},"\
|
|
811
|
+
" send_account_texts: #{@send_account_texts}, send_promotional_texts:"\
|
|
812
|
+
" #{@send_promotional_texts}, locker_number: #{@locker_number}, reactivate_inactive_client:"\
|
|
813
|
+
" #{@reactivate_inactive_client}, lead_channel_id: #{@lead_channel_id}>"
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
817
|
+
def inspect
|
|
818
|
+
class_name = self.class.name.split('::').last
|
|
819
|
+
"<#{class_name} account_balance: #{@account_balance.inspect}, action: #{@action.inspect},"\
|
|
820
|
+
" active: #{@active.inspect}, address_line1: #{@address_line1.inspect}, address_line2:"\
|
|
821
|
+
" #{@address_line2.inspect}, appt_gender_pref_male: #{@appt_gender_pref_male.inspect},"\
|
|
822
|
+
" birth_date: #{@birth_date.inspect}, city: #{@city.inspect}, client_credit_card:"\
|
|
823
|
+
" #{@client_credit_card.inspect}, client_indexes: #{@client_indexes.inspect},"\
|
|
824
|
+
" client_relationships: #{@client_relationships.inspect}, country: #{@country.inspect},"\
|
|
825
|
+
" creation_date: #{@creation_date.inspect}, custom_client_fields:"\
|
|
826
|
+
" #{@custom_client_fields.inspect}, email: #{@email.inspect}, emergency_contact_info_email:"\
|
|
827
|
+
" #{@emergency_contact_info_email.inspect}, emergency_contact_info_name:"\
|
|
828
|
+
" #{@emergency_contact_info_name.inspect}, emergency_contact_info_phone:"\
|
|
829
|
+
" #{@emergency_contact_info_phone.inspect}, emergency_contact_info_relationship:"\
|
|
830
|
+
" #{@emergency_contact_info_relationship.inspect}, first_appointment_date:"\
|
|
831
|
+
" #{@first_appointment_date.inspect}, first_name: #{@first_name.inspect}, gender:"\
|
|
832
|
+
" #{@gender.inspect}, home_location: #{@home_location.inspect}, home_phone:"\
|
|
833
|
+
" #{@home_phone.inspect}, is_company: #{@is_company.inspect}, is_prospect:"\
|
|
834
|
+
" #{@is_prospect.inspect}, last_formula_notes: #{@last_formula_notes.inspect},"\
|
|
835
|
+
" last_modified_date_time: #{@last_modified_date_time.inspect}, last_name:"\
|
|
836
|
+
" #{@last_name.inspect}, liability: #{@liability.inspect}, liability_release:"\
|
|
837
|
+
" #{@liability_release.inspect}, membership_icon: #{@membership_icon.inspect}, middle_name:"\
|
|
838
|
+
" #{@middle_name.inspect}, mobile_phone: #{@mobile_phone.inspect}, mobile_provider:"\
|
|
839
|
+
" #{@mobile_provider.inspect}, new_id: #{@new_id.inspect}, notes: #{@notes.inspect},"\
|
|
840
|
+
" photo_url: #{@photo_url.inspect}, postal_code: #{@postal_code.inspect}, prospect_stage:"\
|
|
841
|
+
" #{@prospect_stage.inspect}, red_alert: #{@red_alert.inspect}, referred_by:"\
|
|
842
|
+
" #{@referred_by.inspect}, sales_reps: #{@sales_reps.inspect}, site_id: #{@site_id.inspect},"\
|
|
843
|
+
" state: #{@state.inspect}, status: #{@status.inspect}, test: #{@test.inspect}, unique_id:"\
|
|
844
|
+
" #{@unique_id.inspect}, work_extension: #{@work_extension.inspect}, work_phone:"\
|
|
845
|
+
" #{@work_phone.inspect}, yellow_alert: #{@yellow_alert.inspect}, send_schedule_emails:"\
|
|
846
|
+
" #{@send_schedule_emails.inspect}, send_account_emails: #{@send_account_emails.inspect},"\
|
|
847
|
+
" send_promotional_emails: #{@send_promotional_emails.inspect}, send_schedule_texts:"\
|
|
848
|
+
" #{@send_schedule_texts.inspect}, send_account_texts: #{@send_account_texts.inspect},"\
|
|
849
|
+
" send_promotional_texts: #{@send_promotional_texts.inspect}, locker_number:"\
|
|
850
|
+
" #{@locker_number.inspect}, reactivate_inactive_client:"\
|
|
851
|
+
" #{@reactivate_inactive_client.inspect}, lead_channel_id: #{@lead_channel_id.inspect}>"
|
|
852
|
+
end
|
|
853
|
+
end
|
|
854
|
+
end
|