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,1226 @@
|
|
|
1
|
+
# mindbody_public_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module MindbodyPublicApi
|
|
7
|
+
# SaleController
|
|
8
|
+
class SaleController < BaseController
|
|
9
|
+
# Gets a list of card types that the site accepts. You can also use `GET
|
|
10
|
+
# Sites` to return the Site object, which contains individual accepted card
|
|
11
|
+
# types for requested sites.
|
|
12
|
+
# This endpoint has no query parameters.The response returns a list of
|
|
13
|
+
# strings. Possible values are:
|
|
14
|
+
# * Visa
|
|
15
|
+
# * MasterCard
|
|
16
|
+
# * Discover
|
|
17
|
+
# * AMEX
|
|
18
|
+
# @param [String] version Required parameter: version of the api.
|
|
19
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
20
|
+
# pull data.
|
|
21
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
22
|
+
# authorization token.
|
|
23
|
+
# @return [Array[String]] Response from the API call.
|
|
24
|
+
def get_accepted_card_types(version,
|
|
25
|
+
site_id,
|
|
26
|
+
authorization: nil)
|
|
27
|
+
@api_call
|
|
28
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
29
|
+
'/public/v{version}/sale/acceptedcardtypes',
|
|
30
|
+
Server::DEFAULT)
|
|
31
|
+
.template_param(new_parameter(version, key: 'version')
|
|
32
|
+
.should_encode(true))
|
|
33
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
34
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
35
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
36
|
+
.auth(Single.new('API-Key')))
|
|
37
|
+
.response(new_response_handler
|
|
38
|
+
.deserializer(APIHelper.method(:deserialize_primitive_types))
|
|
39
|
+
.is_response_array(true)
|
|
40
|
+
.is_primitive_response(true))
|
|
41
|
+
.execute
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Get alternative and local payment methods that are allowed for a site.
|
|
45
|
+
# These payment methods can later be used in `Initiate Checkout Shopping
|
|
46
|
+
# Cart Using Alternative Payments`
|
|
47
|
+
# and `Initiate Purchase Contract Using Alternative Payments` to make the
|
|
48
|
+
# payment.
|
|
49
|
+
#
|
|
50
|
+
# The currently supported alternative payments are:
|
|
51
|
+
# - iDEAL
|
|
52
|
+
# - Apple Pay
|
|
53
|
+
# **Notes:**
|
|
54
|
+
# - This endpoint is only available for Studios on MBPS (Mindbody Payments)
|
|
55
|
+
# with Stripe payment processor.
|
|
56
|
+
# - This endpoint only supports the online store location (LocationId = 98).
|
|
57
|
+
# If LocationId is not provided, it will default to 98.
|
|
58
|
+
# @param [String] version Required parameter: version of the api.
|
|
59
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
60
|
+
# pull data.
|
|
61
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
62
|
+
# authorization token.
|
|
63
|
+
# @param [String] request_client_id Optional parameter: The client ID
|
|
64
|
+
# @param [Integer] request_location_id Optional parameter: The location ID
|
|
65
|
+
# Default: **null** (Online store location)
|
|
66
|
+
# @return [GetAlternativePaymentMethodsResponse] Response from the API call.
|
|
67
|
+
def get_alternative_payment_methods(version,
|
|
68
|
+
site_id,
|
|
69
|
+
authorization: nil,
|
|
70
|
+
request_client_id: nil,
|
|
71
|
+
request_location_id: nil)
|
|
72
|
+
@api_call
|
|
73
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
74
|
+
'/public/v{version}/sale/alternativepaymentmethods',
|
|
75
|
+
Server::DEFAULT)
|
|
76
|
+
.template_param(new_parameter(version, key: 'version')
|
|
77
|
+
.should_encode(true))
|
|
78
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
79
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
80
|
+
.query_param(new_parameter(request_client_id, key: 'request.clientId'))
|
|
81
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
82
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
83
|
+
.auth(Single.new('API-Key')))
|
|
84
|
+
.response(new_response_handler
|
|
85
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
86
|
+
.deserialize_into(GetAlternativePaymentMethodsResponse.method(:from_hash)))
|
|
87
|
+
.execute
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Returns the contracts and autopay options that are available on a
|
|
91
|
+
# location-by-location basis. Depending on the configurations established by
|
|
92
|
+
# the site, this endpoint returns options that can be used to sign up
|
|
93
|
+
# clients for recurring payments for services offered by the business.
|
|
94
|
+
# @param [String] version Required parameter: version of the api.
|
|
95
|
+
# @param [Integer] request_location_id Required parameter: The ID of the
|
|
96
|
+
# location that has the requested contracts and AutoPay options.
|
|
97
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
98
|
+
# pull data.
|
|
99
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
100
|
+
# authorization token.
|
|
101
|
+
# @param [Array[Integer]] request_contract_ids Optional parameter: When
|
|
102
|
+
# included, the response only contains details about the specified contract
|
|
103
|
+
# IDs.
|
|
104
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
105
|
+
# include, defaults to 100
|
|
106
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
107
|
+
# to 0.
|
|
108
|
+
# @param [String] request_promo_code Optional parameter: PromoCode to
|
|
109
|
+
# apply
|
|
110
|
+
# @param [TrueClass | FalseClass] request_sold_online Optional parameter:
|
|
111
|
+
# When `true`, the response only contains details about contracts and
|
|
112
|
+
# AutoPay options that can be sold online. When `false`, all contracts are
|
|
113
|
+
# returned. Default: **false**
|
|
114
|
+
# @param [Integer] request_unique_client_id Optional parameter: The ID of
|
|
115
|
+
# the client.
|
|
116
|
+
# @return [GetContractsResponse] Response from the API call.
|
|
117
|
+
def get_contracts(version,
|
|
118
|
+
request_location_id,
|
|
119
|
+
site_id,
|
|
120
|
+
authorization: nil,
|
|
121
|
+
request_contract_ids: nil,
|
|
122
|
+
request_limit: nil,
|
|
123
|
+
request_offset: nil,
|
|
124
|
+
request_promo_code: nil,
|
|
125
|
+
request_sold_online: nil,
|
|
126
|
+
request_unique_client_id: nil)
|
|
127
|
+
@api_call
|
|
128
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
129
|
+
'/public/v{version}/sale/contracts',
|
|
130
|
+
Server::DEFAULT)
|
|
131
|
+
.template_param(new_parameter(version, key: 'version')
|
|
132
|
+
.should_encode(true))
|
|
133
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
134
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
135
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
136
|
+
.query_param(new_parameter(request_contract_ids, key: 'request.contractIds'))
|
|
137
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
138
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
139
|
+
.query_param(new_parameter(request_promo_code, key: 'request.promoCode'))
|
|
140
|
+
.query_param(new_parameter(request_sold_online, key: 'request.soldOnline'))
|
|
141
|
+
.query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
|
|
142
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
143
|
+
.auth(Single.new('API-Key')))
|
|
144
|
+
.response(new_response_handler
|
|
145
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
146
|
+
.deserialize_into(GetContractsResponse.method(:from_hash)))
|
|
147
|
+
.execute
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Get payment methods that can be used to pay for sales at a site.
|
|
151
|
+
# @param [String] version Required parameter: version of the api.
|
|
152
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
153
|
+
# pull data.
|
|
154
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
155
|
+
# authorization token.
|
|
156
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
157
|
+
# include, defaults to 100
|
|
158
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
159
|
+
# to 0.
|
|
160
|
+
# @return [GetCustomPaymentMethodsResponse] Response from the API call.
|
|
161
|
+
def get_custom_payment_methods(version,
|
|
162
|
+
site_id,
|
|
163
|
+
authorization: nil,
|
|
164
|
+
request_limit: nil,
|
|
165
|
+
request_offset: nil)
|
|
166
|
+
@api_call
|
|
167
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
168
|
+
'/public/v{version}/sale/custompaymentmethods',
|
|
169
|
+
Server::DEFAULT)
|
|
170
|
+
.template_param(new_parameter(version, key: 'version')
|
|
171
|
+
.should_encode(true))
|
|
172
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
173
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
174
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
175
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
176
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
177
|
+
.auth(Single.new('API-Key')))
|
|
178
|
+
.response(new_response_handler
|
|
179
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
180
|
+
.deserialize_into(GetCustomPaymentMethodsResponse.method(:from_hash)))
|
|
181
|
+
.execute
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Returns a gift card’s remaining balance.
|
|
185
|
+
# @param [String] version Required parameter: version of the api.
|
|
186
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
187
|
+
# pull data.
|
|
188
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
189
|
+
# authorization token.
|
|
190
|
+
# @param [String] barcode_id Optional parameter: The barcode ID of the gift
|
|
191
|
+
# card for which you want the balance.
|
|
192
|
+
# @return [GetGiftCardBalanceResponse] Response from the API call.
|
|
193
|
+
def get_gift_card_balance(version,
|
|
194
|
+
site_id,
|
|
195
|
+
authorization: nil,
|
|
196
|
+
barcode_id: nil)
|
|
197
|
+
@api_call
|
|
198
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
199
|
+
'/public/v{version}/sale/giftcardbalance',
|
|
200
|
+
Server::DEFAULT)
|
|
201
|
+
.template_param(new_parameter(version, key: 'version')
|
|
202
|
+
.should_encode(true))
|
|
203
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
204
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
205
|
+
.query_param(new_parameter(barcode_id, key: 'barcodeId'))
|
|
206
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
207
|
+
.auth(Single.new('API-Key')))
|
|
208
|
+
.response(new_response_handler
|
|
209
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
210
|
+
.deserialize_into(GetGiftCardBalanceResponse.method(:from_hash)))
|
|
211
|
+
.execute
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns information about gift cards that can be purchased.
|
|
215
|
+
# @param [String] version Required parameter: version of the api.
|
|
216
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
217
|
+
# pull data.
|
|
218
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
219
|
+
# authorization token.
|
|
220
|
+
# @param [Array[Integer]] request_ids Optional parameter: Filters the
|
|
221
|
+
# results to the requested gift card IDs.<br /> Default: **all** gift
|
|
222
|
+
# cards.
|
|
223
|
+
# @param [TrueClass | FalseClass] request_include_custom_layouts Optional
|
|
224
|
+
# parameter: When `true`, includes custom gift card layouts.<br /> When
|
|
225
|
+
# `false`, includes only system layouts. Default: **false**
|
|
226
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
227
|
+
# include, defaults to 100
|
|
228
|
+
# @param [Integer] request_location_id Optional parameter: When included,
|
|
229
|
+
# returns gift cards that are sold at the provided location ID.
|
|
230
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
231
|
+
# to 0.
|
|
232
|
+
# @param [TrueClass | FalseClass] request_sold_online Optional parameter:
|
|
233
|
+
# When `true`, only returns gift cards that are sold online.<br /> Default:
|
|
234
|
+
# **false**
|
|
235
|
+
# @return [GetGiftCardResponse] Response from the API call.
|
|
236
|
+
def get_gift_cards(version,
|
|
237
|
+
site_id,
|
|
238
|
+
authorization: nil,
|
|
239
|
+
request_ids: nil,
|
|
240
|
+
request_include_custom_layouts: nil,
|
|
241
|
+
request_limit: nil,
|
|
242
|
+
request_location_id: nil,
|
|
243
|
+
request_offset: nil,
|
|
244
|
+
request_sold_online: nil)
|
|
245
|
+
@api_call
|
|
246
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
247
|
+
'/public/v{version}/sale/giftcards',
|
|
248
|
+
Server::DEFAULT)
|
|
249
|
+
.template_param(new_parameter(version, key: 'version')
|
|
250
|
+
.should_encode(true))
|
|
251
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
252
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
253
|
+
.query_param(new_parameter(request_ids, key: 'request.ids'))
|
|
254
|
+
.query_param(new_parameter(request_include_custom_layouts, key: 'request.includeCustomLayouts'))
|
|
255
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
256
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
257
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
258
|
+
.query_param(new_parameter(request_sold_online, key: 'request.soldOnline'))
|
|
259
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
260
|
+
.auth(Single.new('API-Key')))
|
|
261
|
+
.response(new_response_handler
|
|
262
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
263
|
+
.deserialize_into(GetGiftCardResponse.method(:from_hash)))
|
|
264
|
+
.execute
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# A package is typically used to combine multiple services and/or products
|
|
268
|
+
# into a single offering. Staff members can check out multiple appointments
|
|
269
|
+
# while selling the package, and can discount the items included. For
|
|
270
|
+
# example, a spa might bundle a massage, a pedicure, a manicure, a facial,
|
|
271
|
+
# and a few selected beauty products into a package.
|
|
272
|
+
# @param [String] version Required parameter: version of the api.
|
|
273
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
274
|
+
# pull data.
|
|
275
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
276
|
+
# authorization token.
|
|
277
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
278
|
+
# include, defaults to 100
|
|
279
|
+
# @param [Integer] request_location_id Optional parameter: The location ID
|
|
280
|
+
# to use to determine the tax for the products that this request returns.<br
|
|
281
|
+
# /> Default: **online store**
|
|
282
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
283
|
+
# to 0.
|
|
284
|
+
# @param [Array[Integer]] request_package_ids Optional parameter: A list of
|
|
285
|
+
# the packages IDs to filter by.
|
|
286
|
+
# @param [TrueClass | FalseClass] request_sell_online Optional parameter:
|
|
287
|
+
# When `true`, only returns products that can be sold online.<br /> When
|
|
288
|
+
# `false`, all products are returned.<br /> Default: **false**
|
|
289
|
+
# @return [GetPackagesResponse] Response from the API call.
|
|
290
|
+
def get_packages(version,
|
|
291
|
+
site_id,
|
|
292
|
+
authorization: nil,
|
|
293
|
+
request_limit: nil,
|
|
294
|
+
request_location_id: nil,
|
|
295
|
+
request_offset: nil,
|
|
296
|
+
request_package_ids: nil,
|
|
297
|
+
request_sell_online: nil)
|
|
298
|
+
@api_call
|
|
299
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
300
|
+
'/public/v{version}/sale/packages',
|
|
301
|
+
Server::DEFAULT)
|
|
302
|
+
.template_param(new_parameter(version, key: 'version')
|
|
303
|
+
.should_encode(true))
|
|
304
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
305
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
306
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
307
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
308
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
309
|
+
.query_param(new_parameter(request_package_ids, key: 'request.packageIds'))
|
|
310
|
+
.query_param(new_parameter(request_sell_online, key: 'request.sellOnline'))
|
|
311
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
312
|
+
.auth(Single.new('API-Key')))
|
|
313
|
+
.response(new_response_handler
|
|
314
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
315
|
+
.deserialize_into(GetPackagesResponse.method(:from_hash)))
|
|
316
|
+
.execute
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Get retail products available for purchase at a site.
|
|
320
|
+
# @param [String] version Required parameter: version of the api.
|
|
321
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
322
|
+
# pull data.
|
|
323
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
324
|
+
# authorization token.
|
|
325
|
+
# @param [Array[Integer]] request_category_ids Optional parameter: A list of
|
|
326
|
+
# revenue category IDs to filter by. Use this ID when calling the GET
|
|
327
|
+
# Categories endpoint.
|
|
328
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
329
|
+
# include, defaults to 100
|
|
330
|
+
# @param [Integer] request_location_id Optional parameter: The location ID
|
|
331
|
+
# to use to determine the tax for the products that this request returns.<br
|
|
332
|
+
# /> Default: **online store**
|
|
333
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
334
|
+
# to 0.
|
|
335
|
+
# @param [Array[String]] request_product_ids Optional parameter: The barcode
|
|
336
|
+
# number of the product to be filter by.
|
|
337
|
+
# @param [String] request_search_text Optional parameter: A search filter,
|
|
338
|
+
# used for searching by term.
|
|
339
|
+
# @param [Array[Integer]] request_secondary_category_ids Optional parameter:
|
|
340
|
+
# A list of secondary categories to filter by. Use this ID when calling the
|
|
341
|
+
# GET Categories endpoint.
|
|
342
|
+
# @param [TrueClass | FalseClass] request_sell_online Optional parameter:
|
|
343
|
+
# When `true`, only products that can be sold online are returned.<br />
|
|
344
|
+
# When `false`, all products are returned.<br /> Default: **false**
|
|
345
|
+
# @param [Array[Integer]] request_sub_category_ids Optional parameter: A
|
|
346
|
+
# list of subcategory IDs to filter by. Use this ID when calling the GET
|
|
347
|
+
# Categories endpoint.
|
|
348
|
+
# @return [GetProductsResponse] Response from the API call.
|
|
349
|
+
def get_products(version,
|
|
350
|
+
site_id,
|
|
351
|
+
authorization: nil,
|
|
352
|
+
request_category_ids: nil,
|
|
353
|
+
request_limit: nil,
|
|
354
|
+
request_location_id: nil,
|
|
355
|
+
request_offset: nil,
|
|
356
|
+
request_product_ids: nil,
|
|
357
|
+
request_search_text: nil,
|
|
358
|
+
request_secondary_category_ids: nil,
|
|
359
|
+
request_sell_online: nil,
|
|
360
|
+
request_sub_category_ids: nil)
|
|
361
|
+
@api_call
|
|
362
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
363
|
+
'/public/v{version}/sale/products',
|
|
364
|
+
Server::DEFAULT)
|
|
365
|
+
.template_param(new_parameter(version, key: 'version')
|
|
366
|
+
.should_encode(true))
|
|
367
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
368
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
369
|
+
.query_param(new_parameter(request_category_ids, key: 'request.categoryIds'))
|
|
370
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
371
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
372
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
373
|
+
.query_param(new_parameter(request_product_ids, key: 'request.productIds'))
|
|
374
|
+
.query_param(new_parameter(request_search_text, key: 'request.searchText'))
|
|
375
|
+
.query_param(new_parameter(request_secondary_category_ids, key: 'request.secondaryCategoryIds'))
|
|
376
|
+
.query_param(new_parameter(request_sell_online, key: 'request.sellOnline'))
|
|
377
|
+
.query_param(new_parameter(request_sub_category_ids, key: 'request.subCategoryIds'))
|
|
378
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
379
|
+
.auth(Single.new('API-Key')))
|
|
380
|
+
.response(new_response_handler
|
|
381
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
382
|
+
.deserialize_into(GetProductsResponse.method(:from_hash)))
|
|
383
|
+
.execute
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Update retail products available for purchase at a site.
|
|
387
|
+
# @param [String] version Required parameter: version of the api.
|
|
388
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
389
|
+
# pull data.
|
|
390
|
+
# @param [Array[UpdateProductRequest]] update_products_requests Required
|
|
391
|
+
# parameter: TODO: type description here
|
|
392
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
393
|
+
# authorization token.
|
|
394
|
+
# @return [GetProductsResponse] Response from the API call.
|
|
395
|
+
def update_products(version,
|
|
396
|
+
site_id,
|
|
397
|
+
update_products_requests,
|
|
398
|
+
authorization: nil)
|
|
399
|
+
@api_call
|
|
400
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
401
|
+
'/public/v{version}/sale/products',
|
|
402
|
+
Server::DEFAULT)
|
|
403
|
+
.template_param(new_parameter(version, key: 'version')
|
|
404
|
+
.should_encode(true))
|
|
405
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
406
|
+
.body_param(new_parameter(update_products_requests))
|
|
407
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
408
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
409
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
410
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
411
|
+
.auth(Single.new('API-Key')))
|
|
412
|
+
.response(new_response_handler
|
|
413
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
414
|
+
.deserialize_into(GetProductsResponse.method(:from_hash)))
|
|
415
|
+
.execute
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Get retail products inventory data available at a site.
|
|
419
|
+
# @param [String] version Required parameter: version of the api.
|
|
420
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
421
|
+
# pull data.
|
|
422
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
423
|
+
# authorization token.
|
|
424
|
+
# @param [Array[String]] request_barcode_ids Optional parameter: When
|
|
425
|
+
# included, the response only contains details about the specified Barcode
|
|
426
|
+
# Ids.
|
|
427
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
428
|
+
# include, defaults to 100
|
|
429
|
+
# @param [Array[Integer]] request_location_ids Optional parameter: When
|
|
430
|
+
# included, the response only contains details about the specified location
|
|
431
|
+
# Ids.
|
|
432
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
433
|
+
# to 0.
|
|
434
|
+
# @param [Array[String]] request_product_ids Optional parameter: When
|
|
435
|
+
# included, the response only contains details about the specified product
|
|
436
|
+
# Ids.
|
|
437
|
+
# @return [GetProductsInventoryResponse] Response from the API call.
|
|
438
|
+
def get_products_inventory(version,
|
|
439
|
+
site_id,
|
|
440
|
+
authorization: nil,
|
|
441
|
+
request_barcode_ids: nil,
|
|
442
|
+
request_limit: nil,
|
|
443
|
+
request_location_ids: nil,
|
|
444
|
+
request_offset: nil,
|
|
445
|
+
request_product_ids: nil)
|
|
446
|
+
@api_call
|
|
447
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
448
|
+
'/public/v{version}/sale/productsinventory',
|
|
449
|
+
Server::DEFAULT)
|
|
450
|
+
.template_param(new_parameter(version, key: 'version')
|
|
451
|
+
.should_encode(true))
|
|
452
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
453
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
454
|
+
.query_param(new_parameter(request_barcode_ids, key: 'request.barcodeIds'))
|
|
455
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
456
|
+
.query_param(new_parameter(request_location_ids, key: 'request.locationIds'))
|
|
457
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
458
|
+
.query_param(new_parameter(request_product_ids, key: 'request.productIds'))
|
|
459
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
460
|
+
.auth(Single.new('API-Key')))
|
|
461
|
+
.response(new_response_handler
|
|
462
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
463
|
+
.deserialize_into(GetProductsInventoryResponse.method(:from_hash)))
|
|
464
|
+
.execute
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
# Fetches the status of an initiate purchase contract given accessToken.
|
|
468
|
+
# This endpoint complements the `Initiate Purchase Contract Using
|
|
469
|
+
# Alternative Payments` endpoint. `Initiate Purchase Contract Using
|
|
470
|
+
# Alternative Payments` endpoint will capture the intent to purchase a
|
|
471
|
+
# contract, and return a redirect URL for the end user to make the payment.
|
|
472
|
+
# Once the payment concludes, the end user will be redirected back to the
|
|
473
|
+
# PaymentAuthenticationCallbackUrl, which was provided while invoking the
|
|
474
|
+
# `Initiate Purchase Contract Using Alternative Payments` endpoint. You can
|
|
475
|
+
# then invoke this endpoint to obtain the `PurchaseContractResponse`.
|
|
476
|
+
#
|
|
477
|
+
# **For a comprehensive guide, follow this tutorial:** [Purchase a
|
|
478
|
+
# Contract](https://developers.mindbodyonline.com/ui/documentation/public-ap
|
|
479
|
+
# i#/http/tutorials/purchase-a-contract)
|
|
480
|
+
#
|
|
481
|
+
# The currently supported alternative payments are:
|
|
482
|
+
# - iDEAL
|
|
483
|
+
# - Apple Pay
|
|
484
|
+
# @param [String] version Required parameter: version of the api.
|
|
485
|
+
# @param [String] access_token Required parameter: TODO: type description
|
|
486
|
+
# here
|
|
487
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
488
|
+
# pull data.
|
|
489
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
490
|
+
# authorization token.
|
|
491
|
+
# @return [PurchaseContractResponse] Response from the API call.
|
|
492
|
+
def get_purchase_contract_status(version,
|
|
493
|
+
access_token,
|
|
494
|
+
site_id,
|
|
495
|
+
authorization: nil)
|
|
496
|
+
@api_call
|
|
497
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
498
|
+
'/public/v{version}/sale/purchasecontractstatus',
|
|
499
|
+
Server::DEFAULT)
|
|
500
|
+
.template_param(new_parameter(version, key: 'version')
|
|
501
|
+
.should_encode(true))
|
|
502
|
+
.query_param(new_parameter(access_token, key: 'accessToken'))
|
|
503
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
504
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
505
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
506
|
+
.auth(Single.new('API-Key')))
|
|
507
|
+
.response(new_response_handler
|
|
508
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
509
|
+
.deserialize_into(PurchaseContractResponse.method(:from_hash)))
|
|
510
|
+
.execute
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# Get sales completed at a site.
|
|
514
|
+
# @param [String] version Required parameter: version of the api.
|
|
515
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
516
|
+
# pull data.
|
|
517
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
518
|
+
# authorization token.
|
|
519
|
+
# @param [DateTime] request_end_sale_date_time Optional parameter: Filters
|
|
520
|
+
# results to sales that happened before this date and time.
|
|
521
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
522
|
+
# include, defaults to 100
|
|
523
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
524
|
+
# to 0.
|
|
525
|
+
# @param [Integer] request_payment_method_id Optional parameter: Filters
|
|
526
|
+
# results to sales paid for by the given payment method ID which indicates
|
|
527
|
+
# payment method(s) (i.e. cash, VISA, AMEX, Check, etc.).
|
|
528
|
+
# @param [Integer] request_sale_id Optional parameter: The sale ID
|
|
529
|
+
# associated with the particular item. It Filters results to the requested
|
|
530
|
+
# sale ID.
|
|
531
|
+
# @param [DateTime] request_start_sale_date_time Optional parameter: Filters
|
|
532
|
+
# results to sales that happened after this date and time.
|
|
533
|
+
# @return [GetSalesResponse] Response from the API call.
|
|
534
|
+
def get_sales(version,
|
|
535
|
+
site_id,
|
|
536
|
+
authorization: nil,
|
|
537
|
+
request_end_sale_date_time: nil,
|
|
538
|
+
request_limit: nil,
|
|
539
|
+
request_offset: nil,
|
|
540
|
+
request_payment_method_id: nil,
|
|
541
|
+
request_sale_id: nil,
|
|
542
|
+
request_start_sale_date_time: nil)
|
|
543
|
+
@api_call
|
|
544
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
545
|
+
'/public/v{version}/sale/sales',
|
|
546
|
+
Server::DEFAULT)
|
|
547
|
+
.template_param(new_parameter(version, key: 'version')
|
|
548
|
+
.should_encode(true))
|
|
549
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
550
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
551
|
+
.query_param(new_parameter(request_end_sale_date_time, key: 'request.endSaleDateTime'))
|
|
552
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
553
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
554
|
+
.query_param(new_parameter(request_payment_method_id, key: 'request.paymentMethodId'))
|
|
555
|
+
.query_param(new_parameter(request_sale_id, key: 'request.saleId'))
|
|
556
|
+
.query_param(new_parameter(request_start_sale_date_time, key: 'request.startSaleDateTime'))
|
|
557
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
558
|
+
.auth(Single.new('API-Key')))
|
|
559
|
+
.response(new_response_handler
|
|
560
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
561
|
+
.deserialize_into(GetSalesResponse.method(:from_hash)))
|
|
562
|
+
.execute
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# Get pricing options available for purchase at a site
|
|
566
|
+
# @param [String] version Required parameter: version of the api.
|
|
567
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
568
|
+
# pull data.
|
|
569
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
570
|
+
# authorization token.
|
|
571
|
+
# @param [Integer] request_class_id Optional parameter: Filters to the
|
|
572
|
+
# pricing options for the specified class ID.
|
|
573
|
+
# @param [Integer] request_class_schedule_id Optional parameter: Filters to
|
|
574
|
+
# the pricing options for the specified class schedule ID.
|
|
575
|
+
# @param [TrueClass | FalseClass] request_hide_related_programs Optional
|
|
576
|
+
# parameter: When `true`, indicates that pricing options of related programs
|
|
577
|
+
# are omitted from the response.<br /> Default: **false**
|
|
578
|
+
# @param [TrueClass | FalseClass] request_include_discontinued Optional
|
|
579
|
+
# parameter: When `true`, indicates that the filtered pricing option list
|
|
580
|
+
# includes discontinued pricing options.<br /> Default: **false**
|
|
581
|
+
# @param [TrueClass | FalseClass] request_include_sale_in_contract_only
|
|
582
|
+
# Optional parameter: When `true`, indicates that the filtered pricing
|
|
583
|
+
# option list includes sale in contract only pricing options.<br />
|
|
584
|
+
# Default: **false**
|
|
585
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
586
|
+
# include, defaults to 100
|
|
587
|
+
# @param [Integer] request_location_id Optional parameter: When specified,
|
|
588
|
+
# for each returned pricing option, `TaxRate` and `TaxIncluded` are
|
|
589
|
+
# calculated according to the specified location. Note that this does not
|
|
590
|
+
# filter results to only services provided at the given location, and for
|
|
591
|
+
# locations where Value-Added Tax (VAT) rules apply, the `TaxRate` is set to
|
|
592
|
+
# zero.
|
|
593
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
594
|
+
# to 0.
|
|
595
|
+
# @param [Array[Integer]] request_program_ids Optional parameter: Filters to
|
|
596
|
+
# pricing options with the specified program IDs.
|
|
597
|
+
# @param [TrueClass | FalseClass] request_sell_online Optional parameter:
|
|
598
|
+
# When `true`, filters the pricing options to display only those available
|
|
599
|
+
# for online purchase. This parameter is only applicable in Business Mode
|
|
600
|
+
# (when a staff authentication header is included) and ignored in Consumer
|
|
601
|
+
# Mode (when no authentication header is passed). <br />Default: `false`
|
|
602
|
+
# (for staff users) <br />Business Mode: This parameter controls the
|
|
603
|
+
# filtering behavior. Staff users can set this to `true` to show only
|
|
604
|
+
# pricing options that can be sold online, or `false` to show all available
|
|
605
|
+
# pricing options. <br />Consumer Mode: This value is automatically set to
|
|
606
|
+
# `true` and cannot be overridden, ensuring consumers only see pricing
|
|
607
|
+
# options available for online purchase.
|
|
608
|
+
# @param [Array[String]] request_service_ids Optional parameter: Filters to
|
|
609
|
+
# the pricing options with the specified IDs. In this context, service and
|
|
610
|
+
# pricing option are used interchangeably. These are the
|
|
611
|
+
# `PurchasedItems[].Id` returned from GET Sales.
|
|
612
|
+
# @param [Array[Integer]] request_session_type_ids Optional parameter:
|
|
613
|
+
# Filters to the pricing options with the specified session types IDs.
|
|
614
|
+
# @param [Integer] request_staff_id Optional parameter: Sets `Price` and
|
|
615
|
+
# `OnlinePrice` to the particular pricing of a specific staff member, if
|
|
616
|
+
# allowed by the business.
|
|
617
|
+
# @return [GetServicesResponse] Response from the API call.
|
|
618
|
+
def get_services(version,
|
|
619
|
+
site_id,
|
|
620
|
+
authorization: nil,
|
|
621
|
+
request_class_id: nil,
|
|
622
|
+
request_class_schedule_id: nil,
|
|
623
|
+
request_hide_related_programs: nil,
|
|
624
|
+
request_include_discontinued: nil,
|
|
625
|
+
request_include_sale_in_contract_only: nil,
|
|
626
|
+
request_limit: nil,
|
|
627
|
+
request_location_id: nil,
|
|
628
|
+
request_offset: nil,
|
|
629
|
+
request_program_ids: nil,
|
|
630
|
+
request_sell_online: nil,
|
|
631
|
+
request_service_ids: nil,
|
|
632
|
+
request_session_type_ids: nil,
|
|
633
|
+
request_staff_id: nil)
|
|
634
|
+
@api_call
|
|
635
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
636
|
+
'/public/v{version}/sale/services',
|
|
637
|
+
Server::DEFAULT)
|
|
638
|
+
.template_param(new_parameter(version, key: 'version')
|
|
639
|
+
.should_encode(true))
|
|
640
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
641
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
642
|
+
.query_param(new_parameter(request_class_id, key: 'request.classId'))
|
|
643
|
+
.query_param(new_parameter(request_class_schedule_id, key: 'request.classScheduleId'))
|
|
644
|
+
.query_param(new_parameter(request_hide_related_programs, key: 'request.hideRelatedPrograms'))
|
|
645
|
+
.query_param(new_parameter(request_include_discontinued, key: 'request.includeDiscontinued'))
|
|
646
|
+
.query_param(new_parameter(request_include_sale_in_contract_only, key: 'request.includeSaleInContractOnly'))
|
|
647
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
648
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
649
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
650
|
+
.query_param(new_parameter(request_program_ids, key: 'request.programIds'))
|
|
651
|
+
.query_param(new_parameter(request_sell_online, key: 'request.sellOnline'))
|
|
652
|
+
.query_param(new_parameter(request_service_ids, key: 'request.serviceIds'))
|
|
653
|
+
.query_param(new_parameter(request_session_type_ids, key: 'request.sessionTypeIds'))
|
|
654
|
+
.query_param(new_parameter(request_staff_id, key: 'request.staffId'))
|
|
655
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
656
|
+
.auth(Single.new('API-Key')))
|
|
657
|
+
.response(new_response_handler
|
|
658
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
659
|
+
.deserialize_into(GetServicesResponse.method(:from_hash)))
|
|
660
|
+
.execute
|
|
661
|
+
end
|
|
662
|
+
|
|
663
|
+
# Update unit price and online price of provided services.
|
|
664
|
+
# @param [String] version Required parameter: version of the api.
|
|
665
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
666
|
+
# pull data.
|
|
667
|
+
# @param [Array[UpdateServiceRequest]] update_services_request Required
|
|
668
|
+
# parameter: TODO: type description here
|
|
669
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
670
|
+
# authorization token.
|
|
671
|
+
# @return [UpdateServiceResponse] Response from the API call.
|
|
672
|
+
def update_services(version,
|
|
673
|
+
site_id,
|
|
674
|
+
update_services_request,
|
|
675
|
+
authorization: nil)
|
|
676
|
+
@api_call
|
|
677
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
678
|
+
'/public/v{version}/sale/services',
|
|
679
|
+
Server::DEFAULT)
|
|
680
|
+
.template_param(new_parameter(version, key: 'version')
|
|
681
|
+
.should_encode(true))
|
|
682
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
683
|
+
.body_param(new_parameter(update_services_request))
|
|
684
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
685
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
686
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
687
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
688
|
+
.auth(Single.new('API-Key')))
|
|
689
|
+
.response(new_response_handler
|
|
690
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
691
|
+
.deserialize_into(UpdateServiceResponse.method(:from_hash)))
|
|
692
|
+
.execute
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
# This endpoint returns a list of transaction details of processed sales.
|
|
696
|
+
# @param [String] version Required parameter: version of the api.
|
|
697
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
698
|
+
# pull data.
|
|
699
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
700
|
+
# authorization token.
|
|
701
|
+
# @param [Integer] request_client_id Optional parameter: Filters results to
|
|
702
|
+
# the requested client ID.
|
|
703
|
+
# @param [Integer] request_limit Optional parameter: Number of results to
|
|
704
|
+
# include, defaults to 100
|
|
705
|
+
# @param [Integer] request_location_id Optional parameter: Filters the
|
|
706
|
+
# transaction results with the ID number associated with the location of the
|
|
707
|
+
# sale.
|
|
708
|
+
# @param [Integer] request_offset Optional parameter: Page offset, defaults
|
|
709
|
+
# to 0.
|
|
710
|
+
# @param [Integer] request_sale_id Optional parameter: Filters the
|
|
711
|
+
# transaction results with the ID number associated with the sale.
|
|
712
|
+
# @param [String] request_status Optional parameter: Filters the transaction
|
|
713
|
+
# results by the estimated transaction status.
|
|
714
|
+
# @param [DateTime] request_transaction_end_date_time Optional parameter:
|
|
715
|
+
# Filters the transaction results that happpened before this date and time.
|
|
716
|
+
# Default: **today’s date**
|
|
717
|
+
# @param [Integer] request_transaction_id Optional parameter: Filters the
|
|
718
|
+
# transaction results with the ID number generated when the sale is
|
|
719
|
+
# processed.
|
|
720
|
+
# @param [DateTime] request_transaction_start_date_time Optional parameter:
|
|
721
|
+
# Filters the transaction results that happpened after this date and time.
|
|
722
|
+
# Default: **today’s date**
|
|
723
|
+
# @return [GetTransactionsResponse] Response from the API call.
|
|
724
|
+
def get_transactions(version,
|
|
725
|
+
site_id,
|
|
726
|
+
authorization: nil,
|
|
727
|
+
request_client_id: nil,
|
|
728
|
+
request_limit: nil,
|
|
729
|
+
request_location_id: nil,
|
|
730
|
+
request_offset: nil,
|
|
731
|
+
request_sale_id: nil,
|
|
732
|
+
request_status: nil,
|
|
733
|
+
request_transaction_end_date_time: nil,
|
|
734
|
+
request_transaction_id: nil,
|
|
735
|
+
request_transaction_start_date_time: nil)
|
|
736
|
+
@api_call
|
|
737
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
738
|
+
'/public/v{version}/sale/transactions',
|
|
739
|
+
Server::DEFAULT)
|
|
740
|
+
.template_param(new_parameter(version, key: 'version')
|
|
741
|
+
.should_encode(true))
|
|
742
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
743
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
744
|
+
.query_param(new_parameter(request_client_id, key: 'request.clientId'))
|
|
745
|
+
.query_param(new_parameter(request_limit, key: 'request.limit'))
|
|
746
|
+
.query_param(new_parameter(request_location_id, key: 'request.locationId'))
|
|
747
|
+
.query_param(new_parameter(request_offset, key: 'request.offset'))
|
|
748
|
+
.query_param(new_parameter(request_sale_id, key: 'request.saleId'))
|
|
749
|
+
.query_param(new_parameter(request_status, key: 'request.status'))
|
|
750
|
+
.query_param(new_parameter(request_transaction_end_date_time, key: 'request.transactionEndDateTime'))
|
|
751
|
+
.query_param(new_parameter(request_transaction_id, key: 'request.transactionId'))
|
|
752
|
+
.query_param(new_parameter(request_transaction_start_date_time, key: 'request.transactionStartDateTime'))
|
|
753
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
754
|
+
.auth(Single.new('API-Key')))
|
|
755
|
+
.response(new_response_handler
|
|
756
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
757
|
+
.deserialize_into(GetTransactionsResponse.method(:from_hash)))
|
|
758
|
+
.execute
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
# This endpoint provides a wide range of functionality. For example, you can
|
|
762
|
+
# use it when a client purchases new pricing options, retail products,
|
|
763
|
+
# packages, and tips. You can also combine purchasing a new pricing option
|
|
764
|
+
# and many other functions, such as booking a client into a class, booking a
|
|
765
|
+
# new appointment for a client, enrolling a client into an enrollment or
|
|
766
|
+
# course, or reconciling an unpaid, already booked appointment or class. Use
|
|
767
|
+
# this call when a client purchases:
|
|
768
|
+
# * a pricing option, after calling `GET Services` and choosing a specific
|
|
769
|
+
# pricing option’s ID
|
|
770
|
+
# * a retail product, after calling `GET Products` and choosing a specific
|
|
771
|
+
# retail product’s ID
|
|
772
|
+
# * a package, after calling `GET Packages` and choosing a specific
|
|
773
|
+
# package’s ID
|
|
774
|
+
# * a tip to give to a staff member, after calling `GET Staff` and choosing
|
|
775
|
+
# a specific staff member ID, and the amount that the client wants to tip
|
|
776
|
+
# The documentation provides explanations of the request body and response,
|
|
777
|
+
# as well as the cart item metadata, payment item metadata, and purchased
|
|
778
|
+
# cart items.
|
|
779
|
+
# This endpoint had been updated to support Strong Customer Authentication
|
|
780
|
+
# (SCA).
|
|
781
|
+
# **Note :**
|
|
782
|
+
# Protect yourself from processor fees and credit card fraud.Remember to
|
|
783
|
+
# always protect your web forms that leverage POST CheckoutShoppingCart,
|
|
784
|
+
# POST PurchaseContract or POST PurchaseGiftCard with a CAPTCHA!
|
|
785
|
+
# @param [String] version Required parameter: version of the api.
|
|
786
|
+
# @param [CheckoutShoppingCartRequest] request Required parameter: TODO:
|
|
787
|
+
# type description here
|
|
788
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
789
|
+
# pull data.
|
|
790
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
791
|
+
# authorization token.
|
|
792
|
+
# @return [CheckoutShoppingCartResponse] Response from the API call.
|
|
793
|
+
def checkout_shopping_cart(version,
|
|
794
|
+
request,
|
|
795
|
+
site_id,
|
|
796
|
+
authorization: nil)
|
|
797
|
+
@api_call
|
|
798
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
799
|
+
'/public/v{version}/sale/checkoutshoppingcart',
|
|
800
|
+
Server::DEFAULT)
|
|
801
|
+
.template_param(new_parameter(version, key: 'version')
|
|
802
|
+
.should_encode(true))
|
|
803
|
+
.body_param(new_parameter(request))
|
|
804
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
805
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
806
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
807
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
808
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
809
|
+
.auth(Single.new('API-Key')))
|
|
810
|
+
.response(new_response_handler
|
|
811
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
812
|
+
.deserialize_into(CheckoutShoppingCartResponse.method(:from_hash)))
|
|
813
|
+
.execute
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
# This endpoint complements the InitiateCheckoutShoppintCart endpoint.
|
|
817
|
+
# Please visit its documentation to understand further.
|
|
818
|
+
# The currently supported alternative payments are:
|
|
819
|
+
# - iDEAL
|
|
820
|
+
# - Apple Pay
|
|
821
|
+
# **How to use :**
|
|
822
|
+
# InitiateCheckoutShoppingCart and CompleteCheckoutShoppingCart endpoints
|
|
823
|
+
# work together. InitiateCheckoutShoppingCart endpoint will capture the
|
|
824
|
+
# intent to perform a checkout, and return a redirect URL for the end user
|
|
825
|
+
# to make the payment. Once the payment concludes, the end user will be
|
|
826
|
+
# redirected back to the PaymentAuthenticationCallbackUrl, which was
|
|
827
|
+
# provided while invoking the InitiateCheckoutShoppingCart endpoint. You can
|
|
828
|
+
# then invoke the CompleteCheckoutShoppingCart endpoint to complete the
|
|
829
|
+
# remaining checkout activities and obtain the CheckoutShoppingCartResponse.
|
|
830
|
+
# **For a comprehensive guide, follow this tutorial:** [Checkout Shopping
|
|
831
|
+
# Cart Using Alternative
|
|
832
|
+
# Payments](https://developers.mindbodyonline.com/ui/documentation/public-ap
|
|
833
|
+
# i#/http/tutorials/checkout-shopping-cart-using-alternative-payments)
|
|
834
|
+
# **Notes:**
|
|
835
|
+
# - This endpoint is only available for Studios on MBPS (Mindbody Payments)
|
|
836
|
+
# with Stripe payment processor.
|
|
837
|
+
# - Protect yourself from processor fees. Remember to always protect your
|
|
838
|
+
# web forms that leverage POST InitiateCheckoutShoppingCart or POST
|
|
839
|
+
# CompleteCheckoutShoppingCart with a CAPTCHA!
|
|
840
|
+
# @param [String] version Required parameter: version of the api.
|
|
841
|
+
# @param [CompleteCheckoutShoppingCartUsingAlternativePaymentsRequest]
|
|
842
|
+
# request Required parameter: TODO: type description here
|
|
843
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
844
|
+
# pull data.
|
|
845
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
846
|
+
# authorization token.
|
|
847
|
+
# @return [CheckoutShoppingCartResponse] Response from the API call.
|
|
848
|
+
def complete_checkout_shopping_cart_using_alternative_payments(version,
|
|
849
|
+
request,
|
|
850
|
+
site_id,
|
|
851
|
+
authorization: nil)
|
|
852
|
+
@api_call
|
|
853
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
854
|
+
'/public/v{version}/sale/completecheckoutshoppingcart',
|
|
855
|
+
Server::DEFAULT)
|
|
856
|
+
.template_param(new_parameter(version, key: 'version')
|
|
857
|
+
.should_encode(true))
|
|
858
|
+
.body_param(new_parameter(request))
|
|
859
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
860
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
861
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
862
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
863
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
864
|
+
.auth(Single.new('API-Key')))
|
|
865
|
+
.response(new_response_handler
|
|
866
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
867
|
+
.deserialize_into(CheckoutShoppingCartResponse.method(:from_hash)))
|
|
868
|
+
.execute
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
# This endpoint provides a wide range of functionality. For example, you can
|
|
872
|
+
# use it when a client purchases new pricing options, retail products,
|
|
873
|
+
# packages, and tips. You can also combine purchasing a new pricing option
|
|
874
|
+
# and many other functions, such as booking a client into a class, booking a
|
|
875
|
+
# new appointment for a client, enrolling a client into an enrollment or
|
|
876
|
+
# course, or reconciling an unpaid, already booked appointment or class. Use
|
|
877
|
+
# this call when a client purchases:
|
|
878
|
+
# * a pricing option, after calling `GET Services` and choosing a specific
|
|
879
|
+
# pricing option’s ID
|
|
880
|
+
# * a retail product, after calling `GET Products` and choosing a specific
|
|
881
|
+
# retail product’s ID
|
|
882
|
+
# * a package, after calling `GET Packages` and choosing a specific
|
|
883
|
+
# package’s ID
|
|
884
|
+
# * a tip to give to a staff member, after calling `GET Staff` and choosing
|
|
885
|
+
# a specific staff member ID, and the amount that the client wants to tip
|
|
886
|
+
# The documentation provides explanations of the request body and response,
|
|
887
|
+
# as well as the cart item metadata, payment item metadata, and purchased
|
|
888
|
+
# cart items.
|
|
889
|
+
# The currently supported alternative payments are:
|
|
890
|
+
# - iDEAL
|
|
891
|
+
# - Apple Pay
|
|
892
|
+
#
|
|
893
|
+
# **How to use :**
|
|
894
|
+
# InitiateCheckoutShoppingCart and CompleteCheckoutShoppingCart endpoints
|
|
895
|
+
# work together. InitiateCheckoutShoppingCart endpoint will capture the
|
|
896
|
+
# intent to perform a checkout, and return a redirect URL for the end user
|
|
897
|
+
# to make the payment. Once the payment concludes, the end user will be
|
|
898
|
+
# redirected back to the PaymentAuthenticationCallbackUrl, which was
|
|
899
|
+
# provided while invoking the InitiateCheckoutShoppingCart endpoint. You can
|
|
900
|
+
# then invoke the CompleteCheckoutShoppingCart endpoint to complete the
|
|
901
|
+
# remaining checkout activities and obtain the CheckoutShoppingCartResponse.
|
|
902
|
+
# **For a comprehensive guide, follow this tutorial:** [Checkout Shopping
|
|
903
|
+
# Cart Using Alternative
|
|
904
|
+
# Payments](https://developers.mindbodyonline.com/ui/documentation/public-ap
|
|
905
|
+
# i#/http/tutorials/checkout-shopping-cart-using-alternative-payments)
|
|
906
|
+
# **Notes:**
|
|
907
|
+
# - This endpoint is only available for Studios on MBPS (Mindbody Payments)
|
|
908
|
+
# with Stripe payment processor.
|
|
909
|
+
# - This endpoint only supports the online store location (LocationId = 98).
|
|
910
|
+
# If LocationId is not provided, it will default to 98.
|
|
911
|
+
# - Product purchases are currently not supported on the online store
|
|
912
|
+
# location.
|
|
913
|
+
# - This endpoint only supports those payment methods as obtained from the
|
|
914
|
+
# GetAlternativePaymentMethods endpoint.
|
|
915
|
+
# - Protect yourself from processor fees. Remember to always protect your
|
|
916
|
+
# web forms that leverage POST InitiateCheckoutShoppingCart or POST
|
|
917
|
+
# CompleteCheckoutShoppingCart with a CAPTCHA!
|
|
918
|
+
# @param [String] version Required parameter: version of the api.
|
|
919
|
+
# @param [InitiateCheckoutShoppingCartUsingAlternativePaymentsRequest]
|
|
920
|
+
# request Required parameter: TODO: type description here
|
|
921
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
922
|
+
# pull data.
|
|
923
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
924
|
+
# authorization token.
|
|
925
|
+
# @return [Object] Response from the API call.
|
|
926
|
+
def initiate_checkout_shopping_cart_using_alternative_payments(version,
|
|
927
|
+
request,
|
|
928
|
+
site_id,
|
|
929
|
+
authorization: nil)
|
|
930
|
+
@api_call
|
|
931
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
932
|
+
'/public/v{version}/sale/initiatecheckoutshoppingcart',
|
|
933
|
+
Server::DEFAULT)
|
|
934
|
+
.template_param(new_parameter(version, key: 'version')
|
|
935
|
+
.should_encode(true))
|
|
936
|
+
.body_param(new_parameter(request))
|
|
937
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
938
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
939
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
940
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
941
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
942
|
+
.auth(Single.new('API-Key')))
|
|
943
|
+
.response(new_response_handler
|
|
944
|
+
.deserializer(APIHelper.method(:json_deserialize)))
|
|
945
|
+
.execute
|
|
946
|
+
end
|
|
947
|
+
|
|
948
|
+
# Allows a client to sign up for a contract or autopay using the information
|
|
949
|
+
# returned from the `GET Contracts` endpoint. The client can pay with
|
|
950
|
+
# allowed alternative and local payment methods returned from `Get
|
|
951
|
+
# Alternative Payment Method`. The client must exist at the site specified
|
|
952
|
+
# before this call is made.
|
|
953
|
+
#
|
|
954
|
+
# The currently supported alternative payments are:
|
|
955
|
+
# - iDEAL
|
|
956
|
+
# - Apple Pay
|
|
957
|
+
#
|
|
958
|
+
# **For a comprehensive guide, follow this tutorial:** [Purchase a
|
|
959
|
+
# Contract](https://developers.mindbodyonline.com/ui/documentation/public-ap
|
|
960
|
+
# i#/http/tutorials/purchase-a-contract)
|
|
961
|
+
#
|
|
962
|
+
# **Notes:**
|
|
963
|
+
# - This endpoint is only available for Studios on MBPS (Mindbody Payments)
|
|
964
|
+
# with Stripe payment processor.
|
|
965
|
+
# - This endpoint only supports the online store location (LocationId = 98).
|
|
966
|
+
# If LocationId is not provided, it will default to 98.
|
|
967
|
+
# - This endpoint only supports those payment methods as obtained from the
|
|
968
|
+
# GetAlternativePaymentMethods endpoint.
|
|
969
|
+
# - Protect yourself from processor fees and credit card fraud. Remember to
|
|
970
|
+
# always protect your web forms that leverage POST CheckoutShoppingCart,
|
|
971
|
+
# POST PurchaseContract or POST PurchaseGiftCard with a CAPTCHA!
|
|
972
|
+
# @param [String] version Required parameter: version of the api.
|
|
973
|
+
# @param [InitiatePurchaseContractRequest] request Required parameter: TODO:
|
|
974
|
+
# type description here
|
|
975
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
976
|
+
# pull data.
|
|
977
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
978
|
+
# authorization token.
|
|
979
|
+
# @return [Object] Response from the API call.
|
|
980
|
+
def initiate_purchase_contract_using_alternative_payments(version,
|
|
981
|
+
request,
|
|
982
|
+
site_id,
|
|
983
|
+
authorization: nil)
|
|
984
|
+
@api_call
|
|
985
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
986
|
+
'/public/v{version}/sale/initiatepurchasecontract',
|
|
987
|
+
Server::DEFAULT)
|
|
988
|
+
.template_param(new_parameter(version, key: 'version')
|
|
989
|
+
.should_encode(true))
|
|
990
|
+
.body_param(new_parameter(request))
|
|
991
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
992
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
993
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
994
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
995
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
996
|
+
.auth(Single.new('API-Key')))
|
|
997
|
+
.response(new_response_handler
|
|
998
|
+
.deserializer(APIHelper.method(:json_deserialize)))
|
|
999
|
+
.execute
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# Allows a client to purchase account credit from a business.
|
|
1003
|
+
# @param [String] version Required parameter: version of the api.
|
|
1004
|
+
# @param [PurchaseAccountCreditRequest] request Required parameter: TODO:
|
|
1005
|
+
# type description here
|
|
1006
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1007
|
+
# pull data.
|
|
1008
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1009
|
+
# authorization token.
|
|
1010
|
+
# @return [PurchaseAccountCreditResponse] Response from the API call.
|
|
1011
|
+
def purchase_account_credit(version,
|
|
1012
|
+
request,
|
|
1013
|
+
site_id,
|
|
1014
|
+
authorization: nil)
|
|
1015
|
+
@api_call
|
|
1016
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
1017
|
+
'/public/v{version}/sale/purchaseaccountcredit',
|
|
1018
|
+
Server::DEFAULT)
|
|
1019
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1020
|
+
.should_encode(true))
|
|
1021
|
+
.body_param(new_parameter(request))
|
|
1022
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1023
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1024
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1025
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1026
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1027
|
+
.auth(Single.new('API-Key')))
|
|
1028
|
+
.response(new_response_handler
|
|
1029
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1030
|
+
.deserialize_into(PurchaseAccountCreditResponse.method(:from_hash)))
|
|
1031
|
+
.execute
|
|
1032
|
+
end
|
|
1033
|
+
|
|
1034
|
+
# Allows a client to sign up for a contract or autopay using the information
|
|
1035
|
+
# returned from the `GET Contracts` endpoint. The client can pay with a new
|
|
1036
|
+
# credit card or with a stored credit card. The client must exist at the
|
|
1037
|
+
# site specified before this call is made.
|
|
1038
|
+
# This endpoint allows a developer to specify whether a client pays now or
|
|
1039
|
+
# pays on the `StartDate`. If you are building a client-facing experience,
|
|
1040
|
+
# you should talk with the business owner to understand the owner’s policies
|
|
1041
|
+
# before you give clients a choice of the two payment types.
|
|
1042
|
+
# This endpoint also allows a developer to specify a `ProrateDate`. If the
|
|
1043
|
+
# date is passed, the Totals returned will always include the pro-rate
|
|
1044
|
+
# amount for instant payment, like:
|
|
1045
|
+
# - `FirstPaymentOccurs` = `Instant` => returns instant payment total for
|
|
1046
|
+
# the contract + pro-rate amount.
|
|
1047
|
+
# - `FirstPaymentOccurs` = `StartDate` => returns pro-rate amount +
|
|
1048
|
+
# contract amount requiring instant payment. The rest of the contract will
|
|
1049
|
+
# be due on `StartDate`.
|
|
1050
|
+
# - Pro-rate amount payment on `StartDate` is not supported by this
|
|
1051
|
+
# endpoint.
|
|
1052
|
+
# This endpoint has been updated to support Strong Customer Authentication
|
|
1053
|
+
# (SCA).
|
|
1054
|
+
# **Note:**
|
|
1055
|
+
# Protect yourself from processor fees and credit card fraud. Remember to
|
|
1056
|
+
# always protect your web forms that leverage POST CheckoutShoppingCart,
|
|
1057
|
+
# POST PurchaseContract or POST PurchaseGiftCard with a CAPTCHA!
|
|
1058
|
+
# @param [String] version Required parameter: version of the api.
|
|
1059
|
+
# @param [PurchaseContractRequest] request Required parameter: TODO: type
|
|
1060
|
+
# description here
|
|
1061
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1062
|
+
# pull data.
|
|
1063
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1064
|
+
# authorization token.
|
|
1065
|
+
# @return [PurchaseContractResponse] Response from the API call.
|
|
1066
|
+
def purchase_contract(version,
|
|
1067
|
+
request,
|
|
1068
|
+
site_id,
|
|
1069
|
+
authorization: nil)
|
|
1070
|
+
@api_call
|
|
1071
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
1072
|
+
'/public/v{version}/sale/purchasecontract',
|
|
1073
|
+
Server::DEFAULT)
|
|
1074
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1075
|
+
.should_encode(true))
|
|
1076
|
+
.body_param(new_parameter(request))
|
|
1077
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1078
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1079
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1080
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1081
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1082
|
+
.auth(Single.new('API-Key')))
|
|
1083
|
+
.response(new_response_handler
|
|
1084
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1085
|
+
.deserialize_into(PurchaseContractResponse.method(:from_hash)))
|
|
1086
|
+
.execute
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1089
|
+
# Allows a client to purchase a gift card from a business in a variety of
|
|
1090
|
+
# designs. The card can be emailed to the recipient on a specific day, and a
|
|
1091
|
+
# card title and a personal message can be added.
|
|
1092
|
+
# **Note**
|
|
1093
|
+
# Protect yourself from processor fees and credit card fraud.Remember to
|
|
1094
|
+
# always protect your web forms that leverage POST CheckoutShoppingCart,
|
|
1095
|
+
# POST PurchaseContract or POST PurchaseGiftCard with a CAPTCHA!
|
|
1096
|
+
# @param [String] version Required parameter: version of the api.
|
|
1097
|
+
# @param [PurchaseGiftCardRequest] request Required parameter: TODO: type
|
|
1098
|
+
# description here
|
|
1099
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1100
|
+
# pull data.
|
|
1101
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1102
|
+
# authorization token.
|
|
1103
|
+
# @return [PurchaseGiftCardResponse] Response from the API call.
|
|
1104
|
+
def purchase_gift_card(version,
|
|
1105
|
+
request,
|
|
1106
|
+
site_id,
|
|
1107
|
+
authorization: nil)
|
|
1108
|
+
@api_call
|
|
1109
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
1110
|
+
'/public/v{version}/sale/purchasegiftcard',
|
|
1111
|
+
Server::DEFAULT)
|
|
1112
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1113
|
+
.should_encode(true))
|
|
1114
|
+
.body_param(new_parameter(request))
|
|
1115
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1116
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1117
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1118
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1119
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1120
|
+
.auth(Single.new('API-Key')))
|
|
1121
|
+
.response(new_response_handler
|
|
1122
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1123
|
+
.deserialize_into(PurchaseGiftCardResponse.method(:from_hash)))
|
|
1124
|
+
.execute
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
# Return a comped sale for a specified sale ID in business mode. The sale is
|
|
1128
|
+
# returnable only if it is a sale of a service, product or gift card and it
|
|
1129
|
+
# has not been used. Currently, only the comp payment method is supported.
|
|
1130
|
+
# @param [String] version Required parameter: version of the api.
|
|
1131
|
+
# @param [ReturnSaleRequest] return_sale_request Required parameter: TODO:
|
|
1132
|
+
# type description here
|
|
1133
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1134
|
+
# pull data.
|
|
1135
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1136
|
+
# authorization token.
|
|
1137
|
+
# @return [ReturnSaleResponse] Response from the API call.
|
|
1138
|
+
def return_sale(version,
|
|
1139
|
+
return_sale_request,
|
|
1140
|
+
site_id,
|
|
1141
|
+
authorization: nil)
|
|
1142
|
+
@api_call
|
|
1143
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
1144
|
+
'/public/v{version}/sale/returnsale',
|
|
1145
|
+
Server::DEFAULT)
|
|
1146
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1147
|
+
.should_encode(true))
|
|
1148
|
+
.body_param(new_parameter(return_sale_request))
|
|
1149
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1150
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1151
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1152
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1153
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1154
|
+
.auth(Single.new('API-Key')))
|
|
1155
|
+
.response(new_response_handler
|
|
1156
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1157
|
+
.deserialize_into(ReturnSaleResponse.method(:from_hash)))
|
|
1158
|
+
.execute
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
# This endpoint updates the retail price and an online price for a product.
|
|
1162
|
+
# Passing at least one of them is mandatory.
|
|
1163
|
+
# @param [String] version Required parameter: version of the api.
|
|
1164
|
+
# @param [UpdateProductPriceRequest] request Required parameter: TODO: type
|
|
1165
|
+
# description here
|
|
1166
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1167
|
+
# pull data.
|
|
1168
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1169
|
+
# authorization token.
|
|
1170
|
+
# @return [UpdateProductPriceResponse] Response from the API call.
|
|
1171
|
+
def update_product_price(version,
|
|
1172
|
+
request,
|
|
1173
|
+
site_id,
|
|
1174
|
+
authorization: nil)
|
|
1175
|
+
@api_call
|
|
1176
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
1177
|
+
'/public/v{version}/sale/updateproductprice',
|
|
1178
|
+
Server::DEFAULT)
|
|
1179
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1180
|
+
.should_encode(true))
|
|
1181
|
+
.body_param(new_parameter(request))
|
|
1182
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1183
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1184
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1185
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1186
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1187
|
+
.auth(Single.new('API-Key')))
|
|
1188
|
+
.response(new_response_handler
|
|
1189
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1190
|
+
.deserialize_into(UpdateProductPriceResponse.method(:from_hash)))
|
|
1191
|
+
.execute
|
|
1192
|
+
end
|
|
1193
|
+
|
|
1194
|
+
# This endpoint updates the SaleDate and returns the details of the sale.
|
|
1195
|
+
# @param [String] version Required parameter: version of the api.
|
|
1196
|
+
# @param [UpdateSaleDateRequest] request Required parameter: TODO: type
|
|
1197
|
+
# description here
|
|
1198
|
+
# @param [String] site_id Required parameter: ID of the site from which to
|
|
1199
|
+
# pull data.
|
|
1200
|
+
# @param [String] authorization Optional parameter: A staff user
|
|
1201
|
+
# authorization token.
|
|
1202
|
+
# @return [UpdateSaleDateResponse] Response from the API call.
|
|
1203
|
+
def update_sale_date(version,
|
|
1204
|
+
request,
|
|
1205
|
+
site_id,
|
|
1206
|
+
authorization: nil)
|
|
1207
|
+
@api_call
|
|
1208
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
|
1209
|
+
'/public/v{version}/sale/updatesaledate',
|
|
1210
|
+
Server::DEFAULT)
|
|
1211
|
+
.template_param(new_parameter(version, key: 'version')
|
|
1212
|
+
.should_encode(true))
|
|
1213
|
+
.body_param(new_parameter(request))
|
|
1214
|
+
.header_param(new_parameter(site_id, key: 'siteId'))
|
|
1215
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
1216
|
+
.header_param(new_parameter(authorization, key: 'authorization'))
|
|
1217
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
1218
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
1219
|
+
.auth(Single.new('API-Key')))
|
|
1220
|
+
.response(new_response_handler
|
|
1221
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
1222
|
+
.deserialize_into(UpdateSaleDateResponse.method(:from_hash)))
|
|
1223
|
+
.execute
|
|
1224
|
+
end
|
|
1225
|
+
end
|
|
1226
|
+
end
|