mindbody-api-v6 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +357 -0
- data/Rakefile +8 -0
- data/docs/AddAppointmentRequest.md +23 -0
- data/docs/AddAppointmentResponse.md +8 -0
- data/docs/AddArrivalRequest.md +9 -0
- data/docs/AddArrivalResponse.md +9 -0
- data/docs/AddClientRequest.md +61 -0
- data/docs/AddClientResponse.md +8 -0
- data/docs/AddClientToClassRequest.md +17 -0
- data/docs/AddClientToClassResponse.md +8 -0
- data/docs/AddClientToClassVisit.md +28 -0
- data/docs/AddClientToEnrollmentRequest.md +15 -0
- data/docs/AddContactLogRequest.md +16 -0
- data/docs/AddContactLogType.md +9 -0
- data/docs/Amenity.md +9 -0
- data/docs/Appointment.md +24 -0
- data/docs/AppointmentApi.md +460 -0
- data/docs/AppointmentOption.md +11 -0
- data/docs/AssignedClientIndex.md +9 -0
- data/docs/AutopaySchedule.md +10 -0
- data/docs/Availability.md +15 -0
- data/docs/BookingWindow.md +11 -0
- data/docs/CheckoutAppointmentBookingRequest.md +14 -0
- data/docs/CheckoutItem.md +9 -0
- data/docs/CheckoutItemWrapper.md +17 -0
- data/docs/CheckoutPaymentInfo.md +9 -0
- data/docs/CheckoutShoppingCartRequest.md +18 -0
- data/docs/ClassApi.md +589 -0
- data/docs/ClassDescription.md +22 -0
- data/docs/ClassPayrollEvent.md +10 -0
- data/docs/ClassSchedule.md +29 -0
- data/docs/Client.md +61 -0
- data/docs/ClientApi.md +1473 -0
- data/docs/ClientContract.md +16 -0
- data/docs/ClientCreditCard.md +17 -0
- data/docs/ClientDocument.md +10 -0
- data/docs/ClientIndex.md +13 -0
- data/docs/ClientIndexValue.md +10 -0
- data/docs/ClientMembership.md +20 -0
- data/docs/ClientPurchaseRecord.md +16 -0
- data/docs/ClientRelationship.md +10 -0
- data/docs/ClientService.md +18 -0
- data/docs/Color.md +9 -0
- data/docs/ContactLog.md +18 -0
- data/docs/ContactLogComment.md +11 -0
- data/docs/ContactLogSubType.md +8 -0
- data/docs/ContactLogType.md +9 -0
- data/docs/Contract.md +41 -0
- data/docs/ContractItem.md +14 -0
- data/docs/Course.md +17 -0
- data/docs/CreditCardInfo.md +16 -0
- data/docs/CrossRegionalClientAssociation.md +10 -0
- data/docs/CustomClientField.md +10 -0
- data/docs/CustomClientFieldValue.md +11 -0
- data/docs/CustomPaymentMethod.md +9 -0
- data/docs/EnrollmentApi.md +137 -0
- data/docs/FormulaNote.md +12 -0
- data/docs/GetActivationCodeResponse.md +9 -0
- data/docs/GetActiveClientMembershipsRequest.md +11 -0
- data/docs/GetActiveClientMembershipsResponse.md +9 -0
- data/docs/GetActiveSessionTimesRequest.md +13 -0
- data/docs/GetActiveSessionTimesResponse.md +9 -0
- data/docs/GetAppointmentOptionsResponse.md +8 -0
- data/docs/GetBookableItemsRequest.md +16 -0
- data/docs/GetBookableItemsResponse.md +9 -0
- data/docs/GetClassDescriptionsRequest.md +15 -0
- data/docs/GetClassDescriptionsResponse.md +9 -0
- data/docs/GetClassPayrollRequest.md +13 -0
- data/docs/GetClassPayrollResponse.md +9 -0
- data/docs/GetClassSchedulesRequest.md +16 -0
- data/docs/GetClassSchedulesResponse.md +9 -0
- data/docs/GetClassVisitsRequest.md +9 -0
- data/docs/GetClassVisitsResponse.md +8 -0
- data/docs/GetClassesRequest.md +22 -0
- data/docs/GetClassesResponse.md +9 -0
- data/docs/GetClientAccountBalancesRequest.md +12 -0
- data/docs/GetClientAccountBalancesResponse.md +9 -0
- data/docs/GetClientContractsRequest.md +12 -0
- data/docs/GetClientContractsResponse.md +9 -0
- data/docs/GetClientFormulaNotesRequest.md +11 -0
- data/docs/GetClientFormulaNotesResponse.md +9 -0
- data/docs/GetClientIndexesRequest.md +8 -0
- data/docs/GetClientIndexesResponse.md +8 -0
- data/docs/GetClientPurchasesRequest.md +13 -0
- data/docs/GetClientPurchasesResponse.md +9 -0
- data/docs/GetClientReferralTypesRequest.md +8 -0
- data/docs/GetClientReferralTypesResponse.md +8 -0
- data/docs/GetClientServicesRequest.md +20 -0
- data/docs/GetClientServicesResponse.md +9 -0
- data/docs/GetClientVisitsRequest.md +15 -0
- data/docs/GetClientVisitsResponse.md +9 -0
- data/docs/GetClientsRequest.md +13 -0
- data/docs/GetClientsResponse.md +9 -0
- data/docs/GetContactLogsRequest.md +16 -0
- data/docs/GetContactLogsResponse.md +9 -0
- data/docs/GetContractsRequest.md +13 -0
- data/docs/GetContractsResponse.md +9 -0
- data/docs/GetCrossRegionalClientAssociationsRequest.md +11 -0
- data/docs/GetCrossRegionalClientAssociationsResponse.md +9 -0
- data/docs/GetCustomClientFieldsRequest.md +9 -0
- data/docs/GetCustomClientFieldsResponse.md +9 -0
- data/docs/GetCustomPaymentMethodsRequest.md +9 -0
- data/docs/GetCustomPaymentMethodsResponse.md +9 -0
- data/docs/GetEnrollmentsRequest.md +16 -0
- data/docs/GetEnrollmentsResponse.md +9 -0
- data/docs/GetGiftCardResponse.md +9 -0
- data/docs/GetGiftCardsRequest.md +12 -0
- data/docs/GetLocationsRequest.md +9 -0
- data/docs/GetLocationsResponse.md +9 -0
- data/docs/GetPackagesRequest.md +11 -0
- data/docs/GetPackagesResponse.md +9 -0
- data/docs/GetProductsRequest.md +15 -0
- data/docs/GetProductsResponse.md +9 -0
- data/docs/GetProgramsRequest.md +11 -0
- data/docs/GetProgramsResponse.md +9 -0
- data/docs/GetRequiredClientFieldsResponse.md +8 -0
- data/docs/GetResourcesRequest.md +13 -0
- data/docs/GetResourcesResponse.md +9 -0
- data/docs/GetSalesRequest.md +7 -0
- data/docs/GetSalesResponse.md +9 -0
- data/docs/GetScheduleItemsRequest.md +14 -0
- data/docs/GetScheduleItemsResponse.md +9 -0
- data/docs/GetServicesRequest.md +18 -0
- data/docs/GetServicesResponse.md +9 -0
- data/docs/GetSessionTypesRequest.md +11 -0
- data/docs/GetSessionTypesResponse.md +9 -0
- data/docs/GetSitesRequest.md +10 -0
- data/docs/GetSitesResponse.md +9 -0
- data/docs/GetStaffAppointmentsRequest.md +15 -0
- data/docs/GetStaffAppointmentsResponse.md +9 -0
- data/docs/GetStaffPermissionsRequest.md +8 -0
- data/docs/GetStaffPermissionsResponse.md +8 -0
- data/docs/GetStaffRequest.md +14 -0
- data/docs/GetStaffResponse.md +9 -0
- data/docs/GetTimeClockRequest.md +13 -0
- data/docs/GetTimeClockResponse.md +9 -0
- data/docs/GetWaitlistEntriesRequest.md +14 -0
- data/docs/GetWaitlistEntriesResponse.md +9 -0
- data/docs/GiftCard.md +19 -0
- data/docs/GiftCardLayout.md +9 -0
- data/docs/IssueRequest.md +9 -0
- data/docs/IssueResponse.md +10 -0
- data/docs/Level.md +10 -0
- data/docs/Liability.md +10 -0
- data/docs/Location.md +32 -0
- data/docs/MembershipTypeRestriction.md +9 -0
- data/docs/ModelClass.md +33 -0
- data/docs/Package.md +13 -0
- data/docs/PaginationResponse.md +11 -0
- data/docs/PayrollApi.md +140 -0
- data/docs/Product.md +18 -0
- data/docs/Program.md +11 -0
- data/docs/ProspectStage.md +10 -0
- data/docs/PurchaseContractRequest.md +18 -0
- data/docs/PurchaseContractResponse.md +11 -0
- data/docs/PurchaseGiftCardRequest.md +19 -0
- data/docs/PurchaseGiftCardResponse.md +17 -0
- data/docs/PurchasedItem.md +9 -0
- data/docs/Relationship.md +10 -0
- data/docs/RemoveClientFromClassRequest.md +12 -0
- data/docs/RemoveClientFromClassResponse.md +8 -0
- data/docs/RemoveFromWaitlistRequest.md +8 -0
- data/docs/RemoveFromWaitlistResponse.md +7 -0
- data/docs/Resource.md +9 -0
- data/docs/Sale.md +15 -0
- data/docs/SaleApi.md +683 -0
- data/docs/SalePayment.md +12 -0
- data/docs/SalesRep.md +12 -0
- data/docs/SendPasswordResetEmailRequest.md +10 -0
- data/docs/Service.md +16 -0
- data/docs/SessionType.md +17 -0
- data/docs/Site.md +27 -0
- data/docs/SiteApi.md +362 -0
- data/docs/Size.md +9 -0
- data/docs/Staff.md +31 -0
- data/docs/StaffApi.md +131 -0
- data/docs/StaffPermissionGroup.md +11 -0
- data/docs/StoredCardInfo.md +8 -0
- data/docs/SubstituteClassTeacherRequest.md +13 -0
- data/docs/SubstituteClassTeacherResponse.md +8 -0
- data/docs/SubstituteTeacherClass.md +27 -0
- data/docs/TimeCardEvent.md +10 -0
- data/docs/TimeClockReport.md +13 -0
- data/docs/Unavailability.md +11 -0
- data/docs/UpcomingAutopayEvent.md +11 -0
- data/docs/UpdateAppointmentRequest.md +19 -0
- data/docs/UpdateAppointmentResponse.md +8 -0
- data/docs/UpdateClientRequest.md +11 -0
- data/docs/UpdateClientResponse.md +8 -0
- data/docs/UpdateClientServiceRequest.md +11 -0
- data/docs/UpdateClientServiceResponse.md +8 -0
- data/docs/UpdateClientVisitRequest.md +13 -0
- data/docs/UpdateClientVisitResponse.md +8 -0
- data/docs/UpdateContactLogComment.md +9 -0
- data/docs/UpdateContactLogRequest.md +16 -0
- data/docs/UpdateContactLogType.md +9 -0
- data/docs/UploadClientDocumentRequest.md +9 -0
- data/docs/UploadClientDocumentResponse.md +9 -0
- data/docs/UploadClientPhotoRequest.md +9 -0
- data/docs/UploadClientPhotoResponse.md +9 -0
- data/docs/User.md +11 -0
- data/docs/UserTokenApi.md +115 -0
- data/docs/Visit.md +25 -0
- data/docs/WaitlistEntry.md +16 -0
- data/git_push.sh +55 -0
- data/lib/swagger_client.rb +241 -0
- data/lib/swagger_client/api/appointment_api.rb +570 -0
- data/lib/swagger_client/api/class_api.rb +727 -0
- data/lib/swagger_client/api/client_api.rb +1795 -0
- data/lib/swagger_client/api/enrollment_api.rb +180 -0
- data/lib/swagger_client/api/payroll_api.rb +181 -0
- data/lib/swagger_client/api/sale_api.rb +829 -0
- data/lib/swagger_client/api/site_api.rb +433 -0
- data/lib/swagger_client/api/staff_api.rb +171 -0
- data/lib/swagger_client/api/user_token_api.rb +150 -0
- data/lib/swagger_client/api_client.rb +389 -0
- data/lib/swagger_client/api_error.rb +38 -0
- data/lib/swagger_client/configuration.rb +209 -0
- data/lib/swagger_client/models/add_appointment_request.rb +395 -0
- data/lib/swagger_client/models/add_appointment_response.rb +184 -0
- data/lib/swagger_client/models/add_arrival_request.rb +204 -0
- data/lib/swagger_client/models/add_arrival_response.rb +194 -0
- data/lib/swagger_client/models/add_client_request.rb +766 -0
- data/lib/swagger_client/models/add_client_response.rb +184 -0
- data/lib/swagger_client/models/add_client_to_class_request.rb +284 -0
- data/lib/swagger_client/models/add_client_to_class_response.rb +184 -0
- data/lib/swagger_client/models/add_client_to_class_visit.rb +442 -0
- data/lib/swagger_client/models/add_client_to_enrollment_request.rb +266 -0
- data/lib/swagger_client/models/add_contact_log_request.rb +278 -0
- data/lib/swagger_client/models/add_contact_log_type.rb +197 -0
- data/lib/swagger_client/models/amenity.rb +195 -0
- data/lib/swagger_client/models/appointment.rb +393 -0
- data/lib/swagger_client/models/appointment_option.rb +215 -0
- data/lib/swagger_client/models/assigned_client_index.rb +195 -0
- data/lib/swagger_client/models/autopay_schedule.rb +204 -0
- data/lib/swagger_client/models/availability.rb +257 -0
- data/lib/swagger_client/models/booking_window.rb +215 -0
- data/lib/swagger_client/models/checkout_appointment_booking_request.rb +246 -0
- data/lib/swagger_client/models/checkout_item.rb +196 -0
- data/lib/swagger_client/models/checkout_item_wrapper.rb +286 -0
- data/lib/swagger_client/models/checkout_payment_info.rb +196 -0
- data/lib/swagger_client/models/checkout_shopping_cart_request.rb +318 -0
- data/lib/swagger_client/models/class_description.rb +325 -0
- data/lib/swagger_client/models/class_payroll_event.rb +204 -0
- data/lib/swagger_client/models/class_schedule.rb +399 -0
- data/lib/swagger_client/models/client.rb +769 -0
- data/lib/swagger_client/models/client_contract.rb +301 -0
- data/lib/swagger_client/models/client_credit_card.rb +275 -0
- data/lib/swagger_client/models/client_document.rb +238 -0
- data/lib/swagger_client/models/client_index.rb +271 -0
- data/lib/swagger_client/models/client_index_value.rb +205 -0
- data/lib/swagger_client/models/client_membership.rb +340 -0
- data/lib/swagger_client/models/client_purchase_record.rb +265 -0
- data/lib/swagger_client/models/client_relationship.rb +205 -0
- data/lib/swagger_client/models/client_service.rb +319 -0
- data/lib/swagger_client/models/color.rb +195 -0
- data/lib/swagger_client/models/contact_log.rb +289 -0
- data/lib/swagger_client/models/contact_log_comment.rb +215 -0
- data/lib/swagger_client/models/contact_log_sub_type.rb +185 -0
- data/lib/swagger_client/models/contact_log_type.rb +197 -0
- data/lib/swagger_client/models/contract.rb +522 -0
- data/lib/swagger_client/models/contract_item.rb +244 -0
- data/lib/swagger_client/models/course.rb +275 -0
- data/lib/swagger_client/models/credit_card_info.rb +256 -0
- data/lib/swagger_client/models/cross_regional_client_association.rb +205 -0
- data/lib/swagger_client/models/custom_client_field.rb +205 -0
- data/lib/swagger_client/models/custom_client_field_value.rb +215 -0
- data/lib/swagger_client/models/custom_payment_method.rb +194 -0
- data/lib/swagger_client/models/formula_note.rb +225 -0
- data/lib/swagger_client/models/get_activation_code_response.rb +194 -0
- data/lib/swagger_client/models/get_active_client_memberships_request.rb +219 -0
- data/lib/swagger_client/models/get_active_client_memberships_response.rb +196 -0
- data/lib/swagger_client/models/get_active_session_times_request.rb +270 -0
- data/lib/swagger_client/models/get_active_session_times_response.rb +196 -0
- data/lib/swagger_client/models/get_appointment_options_response.rb +186 -0
- data/lib/swagger_client/models/get_bookable_items_request.rb +275 -0
- data/lib/swagger_client/models/get_bookable_items_response.rb +196 -0
- data/lib/swagger_client/models/get_class_descriptions_request.rb +256 -0
- data/lib/swagger_client/models/get_class_descriptions_response.rb +196 -0
- data/lib/swagger_client/models/get_class_payroll_request.rb +234 -0
- data/lib/swagger_client/models/get_class_payroll_response.rb +196 -0
- data/lib/swagger_client/models/get_class_schedules_request.rb +274 -0
- data/lib/swagger_client/models/get_class_schedules_response.rb +196 -0
- data/lib/swagger_client/models/get_class_visits_request.rb +194 -0
- data/lib/swagger_client/models/get_class_visits_response.rb +184 -0
- data/lib/swagger_client/models/get_classes_request.rb +338 -0
- data/lib/swagger_client/models/get_classes_response.rb +196 -0
- data/lib/swagger_client/models/get_client_account_balances_request.rb +231 -0
- data/lib/swagger_client/models/get_client_account_balances_response.rb +196 -0
- data/lib/swagger_client/models/get_client_contracts_request.rb +229 -0
- data/lib/swagger_client/models/get_client_contracts_response.rb +196 -0
- data/lib/swagger_client/models/get_client_formula_notes_request.rb +214 -0
- data/lib/swagger_client/models/get_client_formula_notes_response.rb +196 -0
- data/lib/swagger_client/models/get_client_indexes_request.rb +184 -0
- data/lib/swagger_client/models/get_client_indexes_response.rb +186 -0
- data/lib/swagger_client/models/get_client_purchases_request.rb +239 -0
- data/lib/swagger_client/models/get_client_purchases_response.rb +196 -0
- data/lib/swagger_client/models/get_client_referral_types_request.rb +184 -0
- data/lib/swagger_client/models/get_client_referral_types_response.rb +186 -0
- data/lib/swagger_client/models/get_client_services_request.rb +313 -0
- data/lib/swagger_client/models/get_client_services_response.rb +196 -0
- data/lib/swagger_client/models/get_client_visits_request.rb +259 -0
- data/lib/swagger_client/models/get_client_visits_response.rb +196 -0
- data/lib/swagger_client/models/get_clients_request.rb +236 -0
- data/lib/swagger_client/models/get_clients_response.rb +196 -0
- data/lib/swagger_client/models/get_contact_logs_request.rb +275 -0
- data/lib/swagger_client/models/get_contact_logs_response.rb +196 -0
- data/lib/swagger_client/models/get_contracts_request.rb +241 -0
- data/lib/swagger_client/models/get_contracts_response.rb +196 -0
- data/lib/swagger_client/models/get_cross_regional_client_associations_request.rb +214 -0
- data/lib/swagger_client/models/get_cross_regional_client_associations_response.rb +196 -0
- data/lib/swagger_client/models/get_custom_client_fields_request.rb +194 -0
- data/lib/swagger_client/models/get_custom_client_fields_response.rb +196 -0
- data/lib/swagger_client/models/get_custom_payment_methods_request.rb +194 -0
- data/lib/swagger_client/models/get_custom_payment_methods_response.rb +196 -0
- data/lib/swagger_client/models/get_enrollments_request.rb +274 -0
- data/lib/swagger_client/models/get_enrollments_response.rb +196 -0
- data/lib/swagger_client/models/get_gift_card_response.rb +196 -0
- data/lib/swagger_client/models/get_gift_cards_request.rb +226 -0
- data/lib/swagger_client/models/get_locations_request.rb +194 -0
- data/lib/swagger_client/models/get_locations_response.rb +196 -0
- data/lib/swagger_client/models/get_packages_request.rb +216 -0
- data/lib/swagger_client/models/get_packages_response.rb +196 -0
- data/lib/swagger_client/models/get_products_request.rb +260 -0
- data/lib/swagger_client/models/get_products_response.rb +196 -0
- data/lib/swagger_client/models/get_programs_request.rb +248 -0
- data/lib/swagger_client/models/get_programs_response.rb +196 -0
- data/lib/swagger_client/models/get_required_client_fields_response.rb +186 -0
- data/lib/swagger_client/models/get_resources_request.rb +236 -0
- data/lib/swagger_client/models/get_resources_response.rb +196 -0
- data/lib/swagger_client/models/get_sales_request.rb +174 -0
- data/lib/swagger_client/models/get_sales_response.rb +196 -0
- data/lib/swagger_client/models/get_schedule_items_request.rb +248 -0
- data/lib/swagger_client/models/get_schedule_items_response.rb +196 -0
- data/lib/swagger_client/models/get_services_request.rb +290 -0
- data/lib/swagger_client/models/get_services_response.rb +196 -0
- data/lib/swagger_client/models/get_session_types_request.rb +216 -0
- data/lib/swagger_client/models/get_session_types_response.rb +196 -0
- data/lib/swagger_client/models/get_sites_request.rb +206 -0
- data/lib/swagger_client/models/get_sites_response.rb +196 -0
- data/lib/swagger_client/models/get_staff_appointments_request.rb +262 -0
- data/lib/swagger_client/models/get_staff_appointments_response.rb +196 -0
- data/lib/swagger_client/models/get_staff_permissions_request.rb +189 -0
- data/lib/swagger_client/models/get_staff_permissions_response.rb +184 -0
- data/lib/swagger_client/models/get_staff_request.rb +248 -0
- data/lib/swagger_client/models/get_staff_response.rb +195 -0
- data/lib/swagger_client/models/get_time_clock_request.rb +234 -0
- data/lib/swagger_client/models/get_time_clock_response.rb +196 -0
- data/lib/swagger_client/models/get_waitlist_entries_request.rb +252 -0
- data/lib/swagger_client/models/get_waitlist_entries_response.rb +196 -0
- data/lib/swagger_client/models/gift_card.rb +300 -0
- data/lib/swagger_client/models/gift_card_layout.rb +195 -0
- data/lib/swagger_client/models/issue_request.rb +195 -0
- data/lib/swagger_client/models/issue_response.rb +204 -0
- data/lib/swagger_client/models/level.rb +205 -0
- data/lib/swagger_client/models/liability.rb +204 -0
- data/lib/swagger_client/models/location.rb +428 -0
- data/lib/swagger_client/models/membership_type_restriction.rb +194 -0
- data/lib/swagger_client/models/model_class.rb +473 -0
- data/lib/swagger_client/models/package.rb +238 -0
- data/lib/swagger_client/models/pagination_response.rb +214 -0
- data/lib/swagger_client/models/product.rb +284 -0
- data/lib/swagger_client/models/program.rb +248 -0
- data/lib/swagger_client/models/prospect_stage.rb +204 -0
- data/lib/swagger_client/models/purchase_contract_request.rb +309 -0
- data/lib/swagger_client/models/purchase_contract_response.rb +214 -0
- data/lib/swagger_client/models/purchase_gift_card_request.rb +309 -0
- data/lib/swagger_client/models/purchase_gift_card_response.rb +274 -0
- data/lib/swagger_client/models/purchased_item.rb +194 -0
- data/lib/swagger_client/models/relationship.rb +205 -0
- data/lib/swagger_client/models/remove_client_from_class_request.rb +234 -0
- data/lib/swagger_client/models/remove_client_from_class_response.rb +184 -0
- data/lib/swagger_client/models/remove_from_waitlist_request.rb +191 -0
- data/lib/swagger_client/models/remove_from_waitlist_response.rb +174 -0
- data/lib/swagger_client/models/resource.rb +195 -0
- data/lib/swagger_client/models/sale.rb +258 -0
- data/lib/swagger_client/models/sale_payment.rb +224 -0
- data/lib/swagger_client/models/sales_rep.rb +226 -0
- data/lib/swagger_client/models/send_password_reset_email_request.rb +220 -0
- data/lib/swagger_client/models/service.rb +264 -0
- data/lib/swagger_client/models/session_type.rb +308 -0
- data/lib/swagger_client/models/site.rb +374 -0
- data/lib/swagger_client/models/size.rb +194 -0
- data/lib/swagger_client/models/staff.rb +420 -0
- data/lib/swagger_client/models/staff_permission_group.rb +240 -0
- data/lib/swagger_client/models/stored_card_info.rb +183 -0
- data/lib/swagger_client/models/substitute_class_teacher_request.rb +244 -0
- data/lib/swagger_client/models/substitute_class_teacher_response.rb +184 -0
- data/lib/swagger_client/models/substitute_teacher_class.rb +375 -0
- data/lib/swagger_client/models/time_card_event.rb +204 -0
- data/lib/swagger_client/models/time_clock_report.rb +236 -0
- data/lib/swagger_client/models/unavailability.rb +214 -0
- data/lib/swagger_client/models/upcoming_autopay_event.rb +248 -0
- data/lib/swagger_client/models/update_appointment_request.rb +301 -0
- data/lib/swagger_client/models/update_appointment_response.rb +184 -0
- data/lib/swagger_client/models/update_client_request.rb +219 -0
- data/lib/swagger_client/models/update_client_response.rb +184 -0
- data/lib/swagger_client/models/update_client_service_request.rb +219 -0
- data/lib/swagger_client/models/update_client_service_response.rb +184 -0
- data/lib/swagger_client/models/update_client_visit_request.rb +239 -0
- data/lib/swagger_client/models/update_client_visit_response.rb +184 -0
- data/lib/swagger_client/models/update_contact_log_comment.rb +194 -0
- data/lib/swagger_client/models/update_contact_log_request.rb +268 -0
- data/lib/swagger_client/models/update_contact_log_type.rb +196 -0
- data/lib/swagger_client/models/upload_client_document_request.rb +204 -0
- data/lib/swagger_client/models/upload_client_document_response.rb +194 -0
- data/lib/swagger_client/models/upload_client_photo_request.rb +223 -0
- data/lib/swagger_client/models/upload_client_photo_response.rb +194 -0
- data/lib/swagger_client/models/user.rb +214 -0
- data/lib/swagger_client/models/visit.rb +413 -0
- data/lib/swagger_client/models/waitlist_entry.rb +264 -0
- data/lib/swagger_client/version.rb +15 -0
- data/mindbody-api-6.0.0.gem +0 -0
- data/mindbody-swagger.gem +0 -0
- data/spec/api/appointment_api_spec.rb +165 -0
- data/spec/api/class_api_spec.rb +202 -0
- data/spec/api/client_api_spec.rb +435 -0
- data/spec/api/enrollment_api_spec.rb +72 -0
- data/spec/api/payroll_api_spec.rb +74 -0
- data/spec/api/sale_api_spec.rb +222 -0
- data/spec/api/site_api_spec.rb +132 -0
- data/spec/api/staff_api_spec.rb +69 -0
- data/spec/api/user_token_api_spec.rb +62 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_appointment_request_spec.rb +135 -0
- data/spec/models/add_appointment_response_spec.rb +41 -0
- data/spec/models/add_arrival_request_spec.rb +47 -0
- data/spec/models/add_arrival_response_spec.rb +47 -0
- data/spec/models/add_client_request_spec.rb +363 -0
- data/spec/models/add_client_response_spec.rb +41 -0
- data/spec/models/add_client_to_class_request_spec.rb +95 -0
- data/spec/models/add_client_to_class_response_spec.rb +41 -0
- data/spec/models/add_client_to_class_visit_spec.rb +173 -0
- data/spec/models/add_client_to_enrollment_request_spec.rb +83 -0
- data/spec/models/add_contact_log_request_spec.rb +89 -0
- data/spec/models/add_contact_log_type_spec.rb +47 -0
- data/spec/models/amenity_spec.rb +47 -0
- data/spec/models/appointment_option_spec.rb +59 -0
- data/spec/models/appointment_spec.rb +145 -0
- data/spec/models/assigned_client_index_spec.rb +47 -0
- data/spec/models/autopay_schedule_spec.rb +53 -0
- data/spec/models/availability_spec.rb +83 -0
- data/spec/models/booking_window_spec.rb +59 -0
- data/spec/models/checkout_appointment_booking_request_spec.rb +77 -0
- data/spec/models/checkout_item_spec.rb +47 -0
- data/spec/models/checkout_item_wrapper_spec.rb +95 -0
- data/spec/models/checkout_payment_info_spec.rb +47 -0
- data/spec/models/checkout_shopping_cart_request_spec.rb +101 -0
- data/spec/models/class_description_spec.rb +125 -0
- data/spec/models/class_payroll_event_spec.rb +53 -0
- data/spec/models/class_schedule_spec.rb +167 -0
- data/spec/models/client_contract_spec.rb +93 -0
- data/spec/models/client_credit_card_spec.rb +95 -0
- data/spec/models/client_document_spec.rb +53 -0
- data/spec/models/client_index_spec.rb +75 -0
- data/spec/models/client_index_value_spec.rb +53 -0
- data/spec/models/client_membership_spec.rb +117 -0
- data/spec/models/client_purchase_record_spec.rb +89 -0
- data/spec/models/client_relationship_spec.rb +53 -0
- data/spec/models/client_service_spec.rb +105 -0
- data/spec/models/client_spec.rb +367 -0
- data/spec/models/color_spec.rb +47 -0
- data/spec/models/contact_log_comment_spec.rb +59 -0
- data/spec/models/contact_log_spec.rb +101 -0
- data/spec/models/contact_log_sub_type_spec.rb +41 -0
- data/spec/models/contact_log_type_spec.rb +47 -0
- data/spec/models/contract_item_spec.rb +77 -0
- data/spec/models/contract_spec.rb +239 -0
- data/spec/models/course_spec.rb +95 -0
- data/spec/models/credit_card_info_spec.rb +89 -0
- data/spec/models/cross_regional_client_association_spec.rb +53 -0
- data/spec/models/custom_client_field_spec.rb +53 -0
- data/spec/models/custom_client_field_value_spec.rb +59 -0
- data/spec/models/custom_payment_method_spec.rb +47 -0
- data/spec/models/formula_note_spec.rb +65 -0
- data/spec/models/get_activation_code_response_spec.rb +47 -0
- data/spec/models/get_active_client_memberships_request_spec.rb +59 -0
- data/spec/models/get_active_client_memberships_response_spec.rb +47 -0
- data/spec/models/get_active_session_times_request_spec.rb +75 -0
- data/spec/models/get_active_session_times_response_spec.rb +47 -0
- data/spec/models/get_appointment_options_response_spec.rb +41 -0
- data/spec/models/get_bookable_items_request_spec.rb +89 -0
- data/spec/models/get_bookable_items_response_spec.rb +47 -0
- data/spec/models/get_class_descriptions_request_spec.rb +83 -0
- data/spec/models/get_class_descriptions_response_spec.rb +47 -0
- data/spec/models/get_class_payroll_request_spec.rb +71 -0
- data/spec/models/get_class_payroll_response_spec.rb +47 -0
- data/spec/models/get_class_schedules_request_spec.rb +89 -0
- data/spec/models/get_class_schedules_response_spec.rb +47 -0
- data/spec/models/get_class_visits_request_spec.rb +47 -0
- data/spec/models/get_class_visits_response_spec.rb +41 -0
- data/spec/models/get_classes_request_spec.rb +125 -0
- data/spec/models/get_classes_response_spec.rb +47 -0
- data/spec/models/get_client_account_balances_request_spec.rb +65 -0
- data/spec/models/get_client_account_balances_response_spec.rb +47 -0
- data/spec/models/get_client_contracts_request_spec.rb +65 -0
- data/spec/models/get_client_contracts_response_spec.rb +47 -0
- data/spec/models/get_client_formula_notes_request_spec.rb +59 -0
- data/spec/models/get_client_formula_notes_response_spec.rb +47 -0
- data/spec/models/get_client_indexes_request_spec.rb +41 -0
- data/spec/models/get_client_indexes_response_spec.rb +41 -0
- data/spec/models/get_client_purchases_request_spec.rb +71 -0
- data/spec/models/get_client_purchases_response_spec.rb +47 -0
- data/spec/models/get_client_referral_types_request_spec.rb +41 -0
- data/spec/models/get_client_referral_types_response_spec.rb +41 -0
- data/spec/models/get_client_services_request_spec.rb +113 -0
- data/spec/models/get_client_services_response_spec.rb +47 -0
- data/spec/models/get_client_visits_request_spec.rb +83 -0
- data/spec/models/get_client_visits_response_spec.rb +47 -0
- data/spec/models/get_clients_request_spec.rb +71 -0
- data/spec/models/get_clients_response_spec.rb +47 -0
- data/spec/models/get_contact_logs_request_spec.rb +89 -0
- data/spec/models/get_contact_logs_response_spec.rb +47 -0
- data/spec/models/get_contracts_request_spec.rb +71 -0
- data/spec/models/get_contracts_response_spec.rb +47 -0
- data/spec/models/get_cross_regional_client_associations_request_spec.rb +59 -0
- data/spec/models/get_cross_regional_client_associations_response_spec.rb +47 -0
- data/spec/models/get_custom_client_fields_request_spec.rb +47 -0
- data/spec/models/get_custom_client_fields_response_spec.rb +47 -0
- data/spec/models/get_custom_payment_methods_request_spec.rb +47 -0
- data/spec/models/get_custom_payment_methods_response_spec.rb +47 -0
- data/spec/models/get_enrollments_request_spec.rb +89 -0
- data/spec/models/get_enrollments_response_spec.rb +47 -0
- data/spec/models/get_gift_card_response_spec.rb +47 -0
- data/spec/models/get_gift_cards_request_spec.rb +65 -0
- data/spec/models/get_locations_request_spec.rb +47 -0
- data/spec/models/get_locations_response_spec.rb +47 -0
- data/spec/models/get_packages_request_spec.rb +59 -0
- data/spec/models/get_packages_response_spec.rb +47 -0
- data/spec/models/get_products_request_spec.rb +83 -0
- data/spec/models/get_products_response_spec.rb +47 -0
- data/spec/models/get_programs_request_spec.rb +63 -0
- data/spec/models/get_programs_response_spec.rb +47 -0
- data/spec/models/get_required_client_fields_response_spec.rb +41 -0
- data/spec/models/get_resources_request_spec.rb +71 -0
- data/spec/models/get_resources_response_spec.rb +47 -0
- data/spec/models/get_sales_request_spec.rb +35 -0
- data/spec/models/get_sales_response_spec.rb +47 -0
- data/spec/models/get_schedule_items_request_spec.rb +77 -0
- data/spec/models/get_schedule_items_response_spec.rb +47 -0
- data/spec/models/get_services_request_spec.rb +101 -0
- data/spec/models/get_services_response_spec.rb +47 -0
- data/spec/models/get_session_types_request_spec.rb +59 -0
- data/spec/models/get_session_types_response_spec.rb +47 -0
- data/spec/models/get_sites_request_spec.rb +53 -0
- data/spec/models/get_sites_response_spec.rb +47 -0
- data/spec/models/get_staff_appointments_request_spec.rb +83 -0
- data/spec/models/get_staff_appointments_response_spec.rb +47 -0
- data/spec/models/get_staff_permissions_request_spec.rb +41 -0
- data/spec/models/get_staff_permissions_response_spec.rb +41 -0
- data/spec/models/get_staff_request_spec.rb +77 -0
- data/spec/models/get_staff_response_spec.rb +47 -0
- data/spec/models/get_time_clock_request_spec.rb +71 -0
- data/spec/models/get_time_clock_response_spec.rb +47 -0
- data/spec/models/get_waitlist_entries_request_spec.rb +77 -0
- data/spec/models/get_waitlist_entries_response_spec.rb +47 -0
- data/spec/models/gift_card_layout_spec.rb +47 -0
- data/spec/models/gift_card_spec.rb +107 -0
- data/spec/models/issue_request_spec.rb +47 -0
- data/spec/models/issue_response_spec.rb +53 -0
- data/spec/models/level_spec.rb +53 -0
- data/spec/models/liability_spec.rb +53 -0
- data/spec/models/location_spec.rb +185 -0
- data/spec/models/membership_type_restriction_spec.rb +47 -0
- data/spec/models/model_class_spec.rb +195 -0
- data/spec/models/package_spec.rb +71 -0
- data/spec/models/pagination_response_spec.rb +59 -0
- data/spec/models/product_spec.rb +101 -0
- data/spec/models/program_spec.rb +63 -0
- data/spec/models/prospect_stage_spec.rb +53 -0
- data/spec/models/purchase_contract_request_spec.rb +101 -0
- data/spec/models/purchase_contract_response_spec.rb +59 -0
- data/spec/models/purchase_gift_card_request_spec.rb +107 -0
- data/spec/models/purchase_gift_card_response_spec.rb +95 -0
- data/spec/models/purchased_item_spec.rb +47 -0
- data/spec/models/relationship_spec.rb +53 -0
- data/spec/models/remove_client_from_class_request_spec.rb +65 -0
- data/spec/models/remove_client_from_class_response_spec.rb +41 -0
- data/spec/models/remove_from_waitlist_request_spec.rb +41 -0
- data/spec/models/remove_from_waitlist_response_spec.rb +35 -0
- data/spec/models/resource_spec.rb +47 -0
- data/spec/models/sale_payment_spec.rb +65 -0
- data/spec/models/sale_spec.rb +83 -0
- data/spec/models/sales_rep_spec.rb +65 -0
- data/spec/models/send_password_reset_email_request_spec.rb +53 -0
- data/spec/models/service_spec.rb +89 -0
- data/spec/models/session_type_spec.rb +99 -0
- data/spec/models/site_spec.rb +155 -0
- data/spec/models/size_spec.rb +47 -0
- data/spec/models/staff_permission_group_spec.rb +67 -0
- data/spec/models/staff_spec.rb +179 -0
- data/spec/models/stored_card_info_spec.rb +41 -0
- data/spec/models/substitute_class_teacher_request_spec.rb +71 -0
- data/spec/models/substitute_class_teacher_response_spec.rb +41 -0
- data/spec/models/substitute_teacher_class_spec.rb +155 -0
- data/spec/models/time_card_event_spec.rb +53 -0
- data/spec/models/time_clock_report_spec.rb +71 -0
- data/spec/models/unavailability_spec.rb +59 -0
- data/spec/models/upcoming_autopay_event_spec.rb +63 -0
- data/spec/models/update_appointment_request_spec.rb +107 -0
- data/spec/models/update_appointment_response_spec.rb +41 -0
- data/spec/models/update_client_request_spec.rb +59 -0
- data/spec/models/update_client_response_spec.rb +41 -0
- data/spec/models/update_client_service_request_spec.rb +59 -0
- data/spec/models/update_client_service_response_spec.rb +41 -0
- data/spec/models/update_client_visit_request_spec.rb +71 -0
- data/spec/models/update_client_visit_response_spec.rb +41 -0
- data/spec/models/update_contact_log_comment_spec.rb +47 -0
- data/spec/models/update_contact_log_request_spec.rb +89 -0
- data/spec/models/update_contact_log_type_spec.rb +47 -0
- data/spec/models/upload_client_document_request_spec.rb +47 -0
- data/spec/models/upload_client_document_response_spec.rb +47 -0
- data/spec/models/upload_client_photo_request_spec.rb +47 -0
- data/spec/models/upload_client_photo_response_spec.rb +47 -0
- data/spec/models/user_spec.rb +59 -0
- data/spec/models/visit_spec.rb +155 -0
- data/spec/models/waitlist_entry_spec.rb +89 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger_client-1.0.0.gem +0 -0
- data/swagger_client.gemspec +45 -0
- metadata +1050 -0
@@ -0,0 +1,180 @@
|
|
1
|
+
=begin
|
2
|
+
#MINDBODY Public API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v6
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.6
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class EnrollmentApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Book a client into an enrollment.
|
23
|
+
# @param request
|
24
|
+
# @param site_id ID of the site from which to pull data.
|
25
|
+
# @param version
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
28
|
+
# @return [ClassSchedule]
|
29
|
+
def enrollment_add_client_to_enrollment(request, site_id, version, opts = {})
|
30
|
+
data, _status_code, _headers = enrollment_add_client_to_enrollment_with_http_info(request, site_id, version, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Book a client into an enrollment.
|
35
|
+
# @param request
|
36
|
+
# @param site_id ID of the site from which to pull data.
|
37
|
+
# @param version
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :authorization A staff user authorization token.
|
40
|
+
# @return [Array<(ClassSchedule, Fixnum, Hash)>] ClassSchedule data, response status code and response headers
|
41
|
+
def enrollment_add_client_to_enrollment_with_http_info(request, site_id, version, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: EnrollmentApi.enrollment_add_client_to_enrollment ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'request' is set
|
46
|
+
if @api_client.config.client_side_validation && request.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EnrollmentApi.enrollment_add_client_to_enrollment"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'site_id' is set
|
50
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling EnrollmentApi.enrollment_add_client_to_enrollment"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'version' is set
|
54
|
+
if @api_client.config.client_side_validation && version.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling EnrollmentApi.enrollment_add_client_to_enrollment"
|
56
|
+
end
|
57
|
+
# resource path
|
58
|
+
local_var_path = '/public/v{version}/enrollment/addclienttoenrollment'.sub('{' + 'version' + '}', version.to_s)
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = {}
|
62
|
+
|
63
|
+
# header parameters
|
64
|
+
header_params = {}
|
65
|
+
# HTTP header 'Accept' (if needed)
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
67
|
+
# HTTP header 'Content-Type'
|
68
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
69
|
+
header_params[:'siteId'] = site_id
|
70
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
71
|
+
|
72
|
+
# form parameters
|
73
|
+
form_params = {}
|
74
|
+
|
75
|
+
# http body (model)
|
76
|
+
post_body = @api_client.object_to_http_body(request)
|
77
|
+
auth_names = []
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => 'ClassSchedule')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: EnrollmentApi#enrollment_add_client_to_enrollment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
# Get enrollments scheduled at a site.
|
91
|
+
# Returns a list of enrollments. An enrollment is a service, such as a workshop or an event, that a staff member offers to multiple students, who commit to coming to all or most of the scheduled sessions. Enrollments typically run for a limited time only.
|
92
|
+
# @param site_id ID of the site from which to pull data.
|
93
|
+
# @param version
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
96
|
+
# @option opts [Array<Integer>] :request_class_schedule_ids A list of the requested class schedule IDs. If omitted, all class schedule IDs return.
|
97
|
+
# @option opts [DateTime] :request_end_date The end of the date range. The response returns any active enrollments that occur on or before this day.<br /> Default: **StartDate**
|
98
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
99
|
+
# @option opts [Array<Integer>] :request_location_ids List of the IDs for the requested locations. If omitted, all location IDs return.
|
100
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
101
|
+
# @option opts [Array<Integer>] :request_program_ids List of the IDs for the requested programs. If omitted, all program IDs return.
|
102
|
+
# @option opts [Array<Integer>] :request_session_type_ids List of the IDs for the requested session types. If omitted, all session types IDs return.
|
103
|
+
# @option opts [Array<Integer>] :request_staff_ids List of the IDs for the requested staff IDs. If omitted, all staff IDs return.
|
104
|
+
# @option opts [DateTime] :request_start_date The start of the date range. The response returns any active enrollments that occur on or after this day.<br /> Default: **today’s date**
|
105
|
+
# @return [GetEnrollmentsResponse]
|
106
|
+
def enrollment_get_enrollments(site_id, version, opts = {})
|
107
|
+
data, _status_code, _headers = enrollment_get_enrollments_with_http_info(site_id, version, opts)
|
108
|
+
data
|
109
|
+
end
|
110
|
+
|
111
|
+
# Get enrollments scheduled at a site.
|
112
|
+
# Returns a list of enrollments. An enrollment is a service, such as a workshop or an event, that a staff member offers to multiple students, who commit to coming to all or most of the scheduled sessions. Enrollments typically run for a limited time only.
|
113
|
+
# @param site_id ID of the site from which to pull data.
|
114
|
+
# @param version
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @option opts [String] :authorization A staff user authorization token.
|
117
|
+
# @option opts [Array<Integer>] :request_class_schedule_ids A list of the requested class schedule IDs. If omitted, all class schedule IDs return.
|
118
|
+
# @option opts [DateTime] :request_end_date The end of the date range. The response returns any active enrollments that occur on or before this day.<br /> Default: **StartDate**
|
119
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
120
|
+
# @option opts [Array<Integer>] :request_location_ids List of the IDs for the requested locations. If omitted, all location IDs return.
|
121
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
122
|
+
# @option opts [Array<Integer>] :request_program_ids List of the IDs for the requested programs. If omitted, all program IDs return.
|
123
|
+
# @option opts [Array<Integer>] :request_session_type_ids List of the IDs for the requested session types. If omitted, all session types IDs return.
|
124
|
+
# @option opts [Array<Integer>] :request_staff_ids List of the IDs for the requested staff IDs. If omitted, all staff IDs return.
|
125
|
+
# @option opts [DateTime] :request_start_date The start of the date range. The response returns any active enrollments that occur on or after this day.<br /> Default: **today’s date**
|
126
|
+
# @return [Array<(GetEnrollmentsResponse, Fixnum, Hash)>] GetEnrollmentsResponse data, response status code and response headers
|
127
|
+
def enrollment_get_enrollments_with_http_info(site_id, version, opts = {})
|
128
|
+
if @api_client.config.debugging
|
129
|
+
@api_client.config.logger.debug 'Calling API: EnrollmentApi.enrollment_get_enrollments ...'
|
130
|
+
end
|
131
|
+
# verify the required parameter 'site_id' is set
|
132
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling EnrollmentApi.enrollment_get_enrollments"
|
134
|
+
end
|
135
|
+
# verify the required parameter 'version' is set
|
136
|
+
if @api_client.config.client_side_validation && version.nil?
|
137
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling EnrollmentApi.enrollment_get_enrollments"
|
138
|
+
end
|
139
|
+
# resource path
|
140
|
+
local_var_path = '/public/v{version}/enrollment/enrollments'.sub('{' + 'version' + '}', version.to_s)
|
141
|
+
|
142
|
+
# query parameters
|
143
|
+
query_params = {}
|
144
|
+
query_params[:'request.classScheduleIds'] = @api_client.build_collection_param(opts[:'request_class_schedule_ids'], :multi) if !opts[:'request_class_schedule_ids'].nil?
|
145
|
+
query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil?
|
146
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
147
|
+
query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil?
|
148
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
149
|
+
query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
|
150
|
+
query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(opts[:'request_session_type_ids'], :multi) if !opts[:'request_session_type_ids'].nil?
|
151
|
+
query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil?
|
152
|
+
query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil?
|
153
|
+
|
154
|
+
# header parameters
|
155
|
+
header_params = {}
|
156
|
+
# HTTP header 'Accept' (if needed)
|
157
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
158
|
+
header_params[:'siteId'] = site_id
|
159
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
160
|
+
|
161
|
+
# form parameters
|
162
|
+
form_params = {}
|
163
|
+
|
164
|
+
# http body (model)
|
165
|
+
post_body = nil
|
166
|
+
auth_names = []
|
167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
168
|
+
:header_params => header_params,
|
169
|
+
:query_params => query_params,
|
170
|
+
:form_params => form_params,
|
171
|
+
:body => post_body,
|
172
|
+
:auth_names => auth_names,
|
173
|
+
:return_type => 'GetEnrollmentsResponse')
|
174
|
+
if @api_client.config.debugging
|
175
|
+
@api_client.config.logger.debug "API called: EnrollmentApi#enrollment_get_enrollments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
176
|
+
end
|
177
|
+
return data, status_code, headers
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
@@ -0,0 +1,181 @@
|
|
1
|
+
=begin
|
2
|
+
#MINDBODY Public API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v6
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.6
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class PayrollApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get class payroll for staff members.
|
23
|
+
# A staff authorization token is not required for this endpoint, but if one is passed, its permissions are honored. Depending on the access permissions configured for the staff member whose token is passed, the endpoint returns either only the payroll information for that staff member or it returns the payroll information for all staff members. Note that if a staff member is not paid for a class, earnings of zero are returned by this endpoint. Note that this endpoint calculates both bonus and no-reg rates for assistants.These rates are not supported by the Payroll report in the web interface. Note that this endpoint returns both the teacher’s adjusted rate and the assistant’s pay rate when the assistant is paid by the teacher.The Payroll report in the web interface only returns the teacher’s adjusted rate.
|
24
|
+
# @param site_id ID of the site from which to pull data.
|
25
|
+
# @param version
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
28
|
+
# @option opts [DateTime] :request_end_date_time The end of the date range for the payroll information to be returned. The maximum allowed date range is 14 days.<br /> Default: **Today’s date** * If you do not supply an `EndDateTime`, the data returns for the period from the `StartDateTime` that you supply to today’s date. * If you do not supply an `EndDateTime` or a `StartDateTime`, data returns for the seven days prior to today’s date.
|
29
|
+
# @option opts [BOOLEAN] :request_include_inactive_staff When `true`, payroll information returns for both active and inactive staff members.<br /> Default: **false**
|
30
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
31
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
32
|
+
# @option opts [Integer] :request_staff_id A list of staff IDs that you want to retrieve payroll information for. If you do not supply a `StaffId`, all active staff members return, ordered by staff ID.
|
33
|
+
# @option opts [DateTime] :request_start_date_time The beginning of the date range for the payroll information to be returned. The maximum allowed date range is 14 days. * If you do not supply a `StartDateTime`, data returns for the seven days prior to the `EndDateTime` that you supply. * If you do not supply either a `StartDateTime` or an `EndDateTime`, the data returns for seven days prior to today’s date.
|
34
|
+
# @return [GetClassPayrollResponse]
|
35
|
+
def payroll_get_class_payroll(site_id, version, opts = {})
|
36
|
+
data, _status_code, _headers = payroll_get_class_payroll_with_http_info(site_id, version, opts)
|
37
|
+
data
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get class payroll for staff members.
|
41
|
+
# A staff authorization token is not required for this endpoint, but if one is passed, its permissions are honored. Depending on the access permissions configured for the staff member whose token is passed, the endpoint returns either only the payroll information for that staff member or it returns the payroll information for all staff members. Note that if a staff member is not paid for a class, earnings of zero are returned by this endpoint. Note that this endpoint calculates both bonus and no-reg rates for assistants.These rates are not supported by the Payroll report in the web interface. Note that this endpoint returns both the teacher’s adjusted rate and the assistant’s pay rate when the assistant is paid by the teacher.The Payroll report in the web interface only returns the teacher’s adjusted rate.
|
42
|
+
# @param site_id ID of the site from which to pull data.
|
43
|
+
# @param version
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @option opts [String] :authorization A staff user authorization token.
|
46
|
+
# @option opts [DateTime] :request_end_date_time The end of the date range for the payroll information to be returned. The maximum allowed date range is 14 days.<br /> Default: **Today’s date** * If you do not supply an `EndDateTime`, the data returns for the period from the `StartDateTime` that you supply to today’s date. * If you do not supply an `EndDateTime` or a `StartDateTime`, data returns for the seven days prior to today’s date.
|
47
|
+
# @option opts [BOOLEAN] :request_include_inactive_staff When `true`, payroll information returns for both active and inactive staff members.<br /> Default: **false**
|
48
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
49
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
50
|
+
# @option opts [Integer] :request_staff_id A list of staff IDs that you want to retrieve payroll information for. If you do not supply a `StaffId`, all active staff members return, ordered by staff ID.
|
51
|
+
# @option opts [DateTime] :request_start_date_time The beginning of the date range for the payroll information to be returned. The maximum allowed date range is 14 days. * If you do not supply a `StartDateTime`, data returns for the seven days prior to the `EndDateTime` that you supply. * If you do not supply either a `StartDateTime` or an `EndDateTime`, the data returns for seven days prior to today’s date.
|
52
|
+
# @return [Array<(GetClassPayrollResponse, Fixnum, Hash)>] GetClassPayrollResponse data, response status code and response headers
|
53
|
+
def payroll_get_class_payroll_with_http_info(site_id, version, opts = {})
|
54
|
+
if @api_client.config.debugging
|
55
|
+
@api_client.config.logger.debug 'Calling API: PayrollApi.payroll_get_class_payroll ...'
|
56
|
+
end
|
57
|
+
# verify the required parameter 'site_id' is set
|
58
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
59
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling PayrollApi.payroll_get_class_payroll"
|
60
|
+
end
|
61
|
+
# verify the required parameter 'version' is set
|
62
|
+
if @api_client.config.client_side_validation && version.nil?
|
63
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling PayrollApi.payroll_get_class_payroll"
|
64
|
+
end
|
65
|
+
# resource path
|
66
|
+
local_var_path = '/public/v{version}/payroll/classes'.sub('{' + 'version' + '}', version.to_s)
|
67
|
+
|
68
|
+
# query parameters
|
69
|
+
query_params = {}
|
70
|
+
query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil?
|
71
|
+
query_params[:'request.includeInactiveStaff'] = opts[:'request_include_inactive_staff'] if !opts[:'request_include_inactive_staff'].nil?
|
72
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
73
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
74
|
+
query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil?
|
75
|
+
query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_time'].nil?
|
76
|
+
|
77
|
+
# header parameters
|
78
|
+
header_params = {}
|
79
|
+
# HTTP header 'Accept' (if needed)
|
80
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
81
|
+
header_params[:'siteId'] = site_id
|
82
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
83
|
+
|
84
|
+
# form parameters
|
85
|
+
form_params = {}
|
86
|
+
|
87
|
+
# http body (model)
|
88
|
+
post_body = nil
|
89
|
+
auth_names = []
|
90
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
91
|
+
:header_params => header_params,
|
92
|
+
:query_params => query_params,
|
93
|
+
:form_params => form_params,
|
94
|
+
:body => post_body,
|
95
|
+
:auth_names => auth_names,
|
96
|
+
:return_type => 'GetClassPayrollResponse')
|
97
|
+
if @api_client.config.debugging
|
98
|
+
@api_client.config.logger.debug "API called: PayrollApi#payroll_get_class_payroll\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
99
|
+
end
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
# Get time card payroll for staff members.
|
103
|
+
# @param site_id ID of the site from which to pull data.
|
104
|
+
# @param version
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
107
|
+
# @option opts [DateTime] :request_end_date_time The end of the date range for the time card information to be returned. If you do not supply an `EndDateTime`, data returns for the seven days prior to today’s date. Classes that begin before the `EndDateTime` are included in the response, regardless of the time that the class ends. The maximum allowed date range is 14 days.<br /> Default: **Today’s date**
|
108
|
+
# @option opts [BOOLEAN] :request_include_inactive_staff When `true`, payroll information returns for both active and inactive staff members.<br /> Default: **false**
|
109
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
110
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
111
|
+
# @option opts [Integer] :request_staff_id The staff ID for whom you want to retrieve time card information. If you do not supply a `StaffId`, all active staff members return, ordered by staff ID.
|
112
|
+
# @option opts [DateTime] :request_start_date_time The beginning of the date range for the time card information to be returned. If you do not supply a `StartDateTime`, data returns for the seven days prior to the `EndDateTime` that you supply. The maximum allowed date range is 14 days.
|
113
|
+
# @return [GetTimeClockResponse]
|
114
|
+
def payroll_get_time_clock(site_id, version, opts = {})
|
115
|
+
data, _status_code, _headers = payroll_get_time_clock_with_http_info(site_id, version, opts)
|
116
|
+
data
|
117
|
+
end
|
118
|
+
|
119
|
+
# Get time card payroll for staff members.
|
120
|
+
# @param site_id ID of the site from which to pull data.
|
121
|
+
# @param version
|
122
|
+
# @param [Hash] opts the optional parameters
|
123
|
+
# @option opts [String] :authorization A staff user authorization token.
|
124
|
+
# @option opts [DateTime] :request_end_date_time The end of the date range for the time card information to be returned. If you do not supply an `EndDateTime`, data returns for the seven days prior to today’s date. Classes that begin before the `EndDateTime` are included in the response, regardless of the time that the class ends. The maximum allowed date range is 14 days.<br /> Default: **Today’s date**
|
125
|
+
# @option opts [BOOLEAN] :request_include_inactive_staff When `true`, payroll information returns for both active and inactive staff members.<br /> Default: **false**
|
126
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
127
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
128
|
+
# @option opts [Integer] :request_staff_id The staff ID for whom you want to retrieve time card information. If you do not supply a `StaffId`, all active staff members return, ordered by staff ID.
|
129
|
+
# @option opts [DateTime] :request_start_date_time The beginning of the date range for the time card information to be returned. If you do not supply a `StartDateTime`, data returns for the seven days prior to the `EndDateTime` that you supply. The maximum allowed date range is 14 days.
|
130
|
+
# @return [Array<(GetTimeClockResponse, Fixnum, Hash)>] GetTimeClockResponse data, response status code and response headers
|
131
|
+
def payroll_get_time_clock_with_http_info(site_id, version, opts = {})
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug 'Calling API: PayrollApi.payroll_get_time_clock ...'
|
134
|
+
end
|
135
|
+
# verify the required parameter 'site_id' is set
|
136
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
137
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling PayrollApi.payroll_get_time_clock"
|
138
|
+
end
|
139
|
+
# verify the required parameter 'version' is set
|
140
|
+
if @api_client.config.client_side_validation && version.nil?
|
141
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling PayrollApi.payroll_get_time_clock"
|
142
|
+
end
|
143
|
+
# resource path
|
144
|
+
local_var_path = '/public/v{version}/payroll/timeclock'.sub('{' + 'version' + '}', version.to_s)
|
145
|
+
|
146
|
+
# query parameters
|
147
|
+
query_params = {}
|
148
|
+
query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil?
|
149
|
+
query_params[:'request.includeInactiveStaff'] = opts[:'request_include_inactive_staff'] if !opts[:'request_include_inactive_staff'].nil?
|
150
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
151
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
152
|
+
query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil?
|
153
|
+
query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_time'].nil?
|
154
|
+
|
155
|
+
# header parameters
|
156
|
+
header_params = {}
|
157
|
+
# HTTP header 'Accept' (if needed)
|
158
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
159
|
+
header_params[:'siteId'] = site_id
|
160
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
161
|
+
|
162
|
+
# form parameters
|
163
|
+
form_params = {}
|
164
|
+
|
165
|
+
# http body (model)
|
166
|
+
post_body = nil
|
167
|
+
auth_names = []
|
168
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
169
|
+
:header_params => header_params,
|
170
|
+
:query_params => query_params,
|
171
|
+
:form_params => form_params,
|
172
|
+
:body => post_body,
|
173
|
+
:auth_names => auth_names,
|
174
|
+
:return_type => 'GetTimeClockResponse')
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: PayrollApi#payroll_get_time_clock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
return data, status_code, headers
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,829 @@
|
|
1
|
+
=begin
|
2
|
+
#MINDBODY Public API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: v6
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.6
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
|
15
|
+
module SwaggerClient
|
16
|
+
class SaleApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Purchase pricing options, packages, retail products, or tips for a client.
|
23
|
+
# This endpoint provides a wide range of functionality. For example, you can use it when a client purchases new pricing options, retail products, packages, and tips. You can also combine purchasing a new pricing option and many other functions, such as booking a client into a class, booking a new appointment for a client, enrolling a client into an enrollment or course, or reconciling an unpaid, already booked appointment or class. Use this call when a client purchases: * a pricing option, after calling `GET Services` and choosing a specific pricing option’s ID * a retail product, after calling `GET Products` and choosing a specific retail product’s ID * a package, after calling `GET Packages` and choosing a specific package’s ID * a tip to give to a staff member, after calling `GET Staff` and choosing a specific staff member ID, and the amount that the client wants to tip The documentation provides explanations of the request body and response, as well as the cart item metadata, payment item metadata, and purchased cart items.
|
24
|
+
# @param request
|
25
|
+
# @param site_id ID of the site from which to pull data.
|
26
|
+
# @param version
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
29
|
+
# @return [Object]
|
30
|
+
def sale_checkout_shopping_cart(request, site_id, version, opts = {})
|
31
|
+
data, _status_code, _headers = sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts)
|
32
|
+
data
|
33
|
+
end
|
34
|
+
|
35
|
+
# Purchase pricing options, packages, retail products, or tips for a client.
|
36
|
+
# This endpoint provides a wide range of functionality. For example, you can use it when a client purchases new pricing options, retail products, packages, and tips. You can also combine purchasing a new pricing option and many other functions, such as booking a client into a class, booking a new appointment for a client, enrolling a client into an enrollment or course, or reconciling an unpaid, already booked appointment or class. Use this call when a client purchases: * a pricing option, after calling `GET Services` and choosing a specific pricing option’s ID * a retail product, after calling `GET Products` and choosing a specific retail product’s ID * a package, after calling `GET Packages` and choosing a specific package’s ID * a tip to give to a staff member, after calling `GET Staff` and choosing a specific staff member ID, and the amount that the client wants to tip The documentation provides explanations of the request body and response, as well as the cart item metadata, payment item metadata, and purchased cart items.
|
37
|
+
# @param request
|
38
|
+
# @param site_id ID of the site from which to pull data.
|
39
|
+
# @param version
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [String] :authorization A staff user authorization token.
|
42
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
43
|
+
def sale_checkout_shopping_cart_with_http_info(request, site_id, version, opts = {})
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_checkout_shopping_cart ...'
|
46
|
+
end
|
47
|
+
# verify the required parameter 'request' is set
|
48
|
+
if @api_client.config.client_side_validation && request.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_checkout_shopping_cart"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'site_id' is set
|
52
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_checkout_shopping_cart"
|
54
|
+
end
|
55
|
+
# verify the required parameter 'version' is set
|
56
|
+
if @api_client.config.client_side_validation && version.nil?
|
57
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_checkout_shopping_cart"
|
58
|
+
end
|
59
|
+
# resource path
|
60
|
+
local_var_path = '/public/v{version}/sale/checkoutshoppingcart'.sub('{' + 'version' + '}', version.to_s)
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = {}
|
64
|
+
|
65
|
+
# header parameters
|
66
|
+
header_params = {}
|
67
|
+
# HTTP header 'Accept' (if needed)
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
69
|
+
# HTTP header 'Content-Type'
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
71
|
+
header_params[:'siteId'] = site_id
|
72
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
73
|
+
|
74
|
+
# form parameters
|
75
|
+
form_params = {}
|
76
|
+
|
77
|
+
# http body (model)
|
78
|
+
post_body = @api_client.object_to_http_body(request)
|
79
|
+
auth_names = []
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
81
|
+
:header_params => header_params,
|
82
|
+
:query_params => query_params,
|
83
|
+
:form_params => form_params,
|
84
|
+
:body => post_body,
|
85
|
+
:auth_names => auth_names,
|
86
|
+
:return_type => 'Object')
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_checkout_shopping_cart\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
# Get credit cards types that a site accepts.
|
93
|
+
# Gets a list of card types that the site accepts. You can also use `GET Sites` to return the Site object, which contains individual accepted card types for requested sites. This endpoint has no query parameters.The response returns a list of strings. Possible values are: * Visa * MasterCard * Discover * AMEX
|
94
|
+
# @param site_id ID of the site from which to pull data.
|
95
|
+
# @param version
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
98
|
+
# @return [Array<String>]
|
99
|
+
def sale_get_accepted_card_types(site_id, version, opts = {})
|
100
|
+
data, _status_code, _headers = sale_get_accepted_card_types_with_http_info(site_id, version, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Get credit cards types that a site accepts.
|
105
|
+
# Gets a list of card types that the site accepts. You can also use `GET Sites` to return the Site object, which contains individual accepted card types for requested sites. This endpoint has no query parameters.The response returns a list of strings. Possible values are: * Visa * MasterCard * Discover * AMEX
|
106
|
+
# @param site_id ID of the site from which to pull data.
|
107
|
+
# @param version
|
108
|
+
# @param [Hash] opts the optional parameters
|
109
|
+
# @option opts [String] :authorization A staff user authorization token.
|
110
|
+
# @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
|
111
|
+
def sale_get_accepted_card_types_with_http_info(site_id, version, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_accepted_card_types ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'site_id' is set
|
116
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_accepted_card_types"
|
118
|
+
end
|
119
|
+
# verify the required parameter 'version' is set
|
120
|
+
if @api_client.config.client_side_validation && version.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_accepted_card_types"
|
122
|
+
end
|
123
|
+
# resource path
|
124
|
+
local_var_path = '/public/v{version}/sale/acceptedcardtypes'.sub('{' + 'version' + '}', version.to_s)
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
133
|
+
header_params[:'siteId'] = site_id
|
134
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
135
|
+
|
136
|
+
# form parameters
|
137
|
+
form_params = {}
|
138
|
+
|
139
|
+
# http body (model)
|
140
|
+
post_body = nil
|
141
|
+
auth_names = []
|
142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => 'Array<String>')
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_accepted_card_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
151
|
+
end
|
152
|
+
return data, status_code, headers
|
153
|
+
end
|
154
|
+
# Get contracts available for purchase at a site.
|
155
|
+
# @param request_location_id The ID of the location that has the requested contracts and AutoPay options.
|
156
|
+
# @param site_id ID of the site from which to pull data.
|
157
|
+
# @param version
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
160
|
+
# @option opts [Integer] :request_consumer_id The ID of the client.
|
161
|
+
# @option opts [Array<Integer>] :request_contract_ids When included, the response only contains details about the specified contract IDs.
|
162
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
163
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
164
|
+
# @option opts [BOOLEAN] :request_sold_online When `true`, the response only contains details about contracts and AutoPay options that can be sold online.<br /> When `false`, only contracts that are not intended to be sold online are returned.<br /> Default: **all contracts**
|
165
|
+
# @return [GetContractsResponse]
|
166
|
+
def sale_get_contracts(request_location_id, site_id, version, opts = {})
|
167
|
+
data, _status_code, _headers = sale_get_contracts_with_http_info(request_location_id, site_id, version, opts)
|
168
|
+
data
|
169
|
+
end
|
170
|
+
|
171
|
+
# Get contracts available for purchase at a site.
|
172
|
+
# @param request_location_id The ID of the location that has the requested contracts and AutoPay options.
|
173
|
+
# @param site_id ID of the site from which to pull data.
|
174
|
+
# @param version
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [String] :authorization A staff user authorization token.
|
177
|
+
# @option opts [Integer] :request_consumer_id The ID of the client.
|
178
|
+
# @option opts [Array<Integer>] :request_contract_ids When included, the response only contains details about the specified contract IDs.
|
179
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
180
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
181
|
+
# @option opts [BOOLEAN] :request_sold_online When `true`, the response only contains details about contracts and AutoPay options that can be sold online.<br /> When `false`, only contracts that are not intended to be sold online are returned.<br /> Default: **all contracts**
|
182
|
+
# @return [Array<(GetContractsResponse, Fixnum, Hash)>] GetContractsResponse data, response status code and response headers
|
183
|
+
def sale_get_contracts_with_http_info(request_location_id, site_id, version, opts = {})
|
184
|
+
if @api_client.config.debugging
|
185
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_contracts ...'
|
186
|
+
end
|
187
|
+
# verify the required parameter 'request_location_id' is set
|
188
|
+
if @api_client.config.client_side_validation && request_location_id.nil?
|
189
|
+
fail ArgumentError, "Missing the required parameter 'request_location_id' when calling SaleApi.sale_get_contracts"
|
190
|
+
end
|
191
|
+
# verify the required parameter 'site_id' is set
|
192
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_contracts"
|
194
|
+
end
|
195
|
+
# verify the required parameter 'version' is set
|
196
|
+
if @api_client.config.client_side_validation && version.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_contracts"
|
198
|
+
end
|
199
|
+
# resource path
|
200
|
+
local_var_path = '/public/v{version}/sale/contracts'.sub('{' + 'version' + '}', version.to_s)
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = {}
|
204
|
+
query_params[:'request.locationId'] = request_location_id
|
205
|
+
query_params[:'request.consumerId'] = opts[:'request_consumer_id'] if !opts[:'request_consumer_id'].nil?
|
206
|
+
query_params[:'request.contractIds'] = @api_client.build_collection_param(opts[:'request_contract_ids'], :multi) if !opts[:'request_contract_ids'].nil?
|
207
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
208
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
209
|
+
query_params[:'request.soldOnline'] = opts[:'request_sold_online'] if !opts[:'request_sold_online'].nil?
|
210
|
+
|
211
|
+
# header parameters
|
212
|
+
header_params = {}
|
213
|
+
# HTTP header 'Accept' (if needed)
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
215
|
+
header_params[:'siteId'] = site_id
|
216
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
217
|
+
|
218
|
+
# form parameters
|
219
|
+
form_params = {}
|
220
|
+
|
221
|
+
# http body (model)
|
222
|
+
post_body = nil
|
223
|
+
auth_names = []
|
224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
225
|
+
:header_params => header_params,
|
226
|
+
:query_params => query_params,
|
227
|
+
:form_params => form_params,
|
228
|
+
:body => post_body,
|
229
|
+
:auth_names => auth_names,
|
230
|
+
:return_type => 'GetContractsResponse')
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_contracts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
233
|
+
end
|
234
|
+
return data, status_code, headers
|
235
|
+
end
|
236
|
+
# Get payment methods that can be used to pay for sales at a site.
|
237
|
+
# @param site_id ID of the site from which to pull data.
|
238
|
+
# @param version
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
241
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
242
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
243
|
+
# @return [GetCustomPaymentMethodsResponse]
|
244
|
+
def sale_get_custom_payment_methods(site_id, version, opts = {})
|
245
|
+
data, _status_code, _headers = sale_get_custom_payment_methods_with_http_info(site_id, version, opts)
|
246
|
+
data
|
247
|
+
end
|
248
|
+
|
249
|
+
# Get payment methods that can be used to pay for sales at a site.
|
250
|
+
# @param site_id ID of the site from which to pull data.
|
251
|
+
# @param version
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @option opts [String] :authorization A staff user authorization token.
|
254
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
255
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
256
|
+
# @return [Array<(GetCustomPaymentMethodsResponse, Fixnum, Hash)>] GetCustomPaymentMethodsResponse data, response status code and response headers
|
257
|
+
def sale_get_custom_payment_methods_with_http_info(site_id, version, opts = {})
|
258
|
+
if @api_client.config.debugging
|
259
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_custom_payment_methods ...'
|
260
|
+
end
|
261
|
+
# verify the required parameter 'site_id' is set
|
262
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
263
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_custom_payment_methods"
|
264
|
+
end
|
265
|
+
# verify the required parameter 'version' is set
|
266
|
+
if @api_client.config.client_side_validation && version.nil?
|
267
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_custom_payment_methods"
|
268
|
+
end
|
269
|
+
# resource path
|
270
|
+
local_var_path = '/public/v{version}/sale/custompaymentmethods'.sub('{' + 'version' + '}', version.to_s)
|
271
|
+
|
272
|
+
# query parameters
|
273
|
+
query_params = {}
|
274
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
275
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
281
|
+
header_params[:'siteId'] = site_id
|
282
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = nil
|
289
|
+
auth_names = []
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
291
|
+
:header_params => header_params,
|
292
|
+
:query_params => query_params,
|
293
|
+
:form_params => form_params,
|
294
|
+
:body => post_body,
|
295
|
+
:auth_names => auth_names,
|
296
|
+
:return_type => 'GetCustomPaymentMethodsResponse')
|
297
|
+
if @api_client.config.debugging
|
298
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_custom_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
299
|
+
end
|
300
|
+
return data, status_code, headers
|
301
|
+
end
|
302
|
+
# Get gift cards available for purchase at a site.
|
303
|
+
# @param site_id ID of the site from which to pull data.
|
304
|
+
# @param version
|
305
|
+
# @param [Hash] opts the optional parameters
|
306
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
307
|
+
# @option opts [Array<Integer>] :request_ids Filters the results to the requested gift card IDs.<br /> Default: **all** gift cards.
|
308
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
309
|
+
# @option opts [Integer] :request_location_id When included, returns gift cards that are sold at the provided location ID.
|
310
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
311
|
+
# @option opts [BOOLEAN] :request_sold_online When `true`, only returns gift cards that are sold online.<br /> Default: **false**
|
312
|
+
# @return [GetGiftCardResponse]
|
313
|
+
def sale_get_gift_cards(site_id, version, opts = {})
|
314
|
+
data, _status_code, _headers = sale_get_gift_cards_with_http_info(site_id, version, opts)
|
315
|
+
data
|
316
|
+
end
|
317
|
+
|
318
|
+
# Get gift cards available for purchase at a site.
|
319
|
+
# @param site_id ID of the site from which to pull data.
|
320
|
+
# @param version
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @option opts [String] :authorization A staff user authorization token.
|
323
|
+
# @option opts [Array<Integer>] :request_ids Filters the results to the requested gift card IDs.<br /> Default: **all** gift cards.
|
324
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
325
|
+
# @option opts [Integer] :request_location_id When included, returns gift cards that are sold at the provided location ID.
|
326
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
327
|
+
# @option opts [BOOLEAN] :request_sold_online When `true`, only returns gift cards that are sold online.<br /> Default: **false**
|
328
|
+
# @return [Array<(GetGiftCardResponse, Fixnum, Hash)>] GetGiftCardResponse data, response status code and response headers
|
329
|
+
def sale_get_gift_cards_with_http_info(site_id, version, opts = {})
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_gift_cards ...'
|
332
|
+
end
|
333
|
+
# verify the required parameter 'site_id' is set
|
334
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
335
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_gift_cards"
|
336
|
+
end
|
337
|
+
# verify the required parameter 'version' is set
|
338
|
+
if @api_client.config.client_side_validation && version.nil?
|
339
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_gift_cards"
|
340
|
+
end
|
341
|
+
# resource path
|
342
|
+
local_var_path = '/public/v{version}/sale/giftcards'.sub('{' + 'version' + '}', version.to_s)
|
343
|
+
|
344
|
+
# query parameters
|
345
|
+
query_params = {}
|
346
|
+
query_params[:'request.ids'] = @api_client.build_collection_param(opts[:'request_ids'], :multi) if !opts[:'request_ids'].nil?
|
347
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
348
|
+
query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
|
349
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
350
|
+
query_params[:'request.soldOnline'] = opts[:'request_sold_online'] if !opts[:'request_sold_online'].nil?
|
351
|
+
|
352
|
+
# header parameters
|
353
|
+
header_params = {}
|
354
|
+
# HTTP header 'Accept' (if needed)
|
355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
356
|
+
header_params[:'siteId'] = site_id
|
357
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
358
|
+
|
359
|
+
# form parameters
|
360
|
+
form_params = {}
|
361
|
+
|
362
|
+
# http body (model)
|
363
|
+
post_body = nil
|
364
|
+
auth_names = []
|
365
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
366
|
+
:header_params => header_params,
|
367
|
+
:query_params => query_params,
|
368
|
+
:form_params => form_params,
|
369
|
+
:body => post_body,
|
370
|
+
:auth_names => auth_names,
|
371
|
+
:return_type => 'GetGiftCardResponse')
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_gift_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
return data, status_code, headers
|
376
|
+
end
|
377
|
+
# Get packages available for purchase at a site.
|
378
|
+
# A package is typically used to combine multiple services and/or products into a single offering. Staff members can check out multiple appointments while selling the package, and can discount the items included. For example, a spa might bundle a massage, a pedicure, a manicure, a facial, and a few selected beauty products into a package.
|
379
|
+
# @param site_id ID of the site from which to pull data.
|
380
|
+
# @param version
|
381
|
+
# @param [Hash] opts the optional parameters
|
382
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
383
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
384
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
385
|
+
# @option opts [Array<Integer>] :request_package_ids A list of the packages IDs to filter by.
|
386
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, only returns products that can be sold online.<br /> When `false`, all products are returned.<br /> Default: **false**
|
387
|
+
# @return [GetPackagesResponse]
|
388
|
+
def sale_get_packages(site_id, version, opts = {})
|
389
|
+
data, _status_code, _headers = sale_get_packages_with_http_info(site_id, version, opts)
|
390
|
+
data
|
391
|
+
end
|
392
|
+
|
393
|
+
# Get packages available for purchase at a site.
|
394
|
+
# A package is typically used to combine multiple services and/or products into a single offering. Staff members can check out multiple appointments while selling the package, and can discount the items included. For example, a spa might bundle a massage, a pedicure, a manicure, a facial, and a few selected beauty products into a package.
|
395
|
+
# @param site_id ID of the site from which to pull data.
|
396
|
+
# @param version
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @option opts [String] :authorization A staff user authorization token.
|
399
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
400
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
401
|
+
# @option opts [Array<Integer>] :request_package_ids A list of the packages IDs to filter by.
|
402
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, only returns products that can be sold online.<br /> When `false`, all products are returned.<br /> Default: **false**
|
403
|
+
# @return [Array<(GetPackagesResponse, Fixnum, Hash)>] GetPackagesResponse data, response status code and response headers
|
404
|
+
def sale_get_packages_with_http_info(site_id, version, opts = {})
|
405
|
+
if @api_client.config.debugging
|
406
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_packages ...'
|
407
|
+
end
|
408
|
+
# verify the required parameter 'site_id' is set
|
409
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
410
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_packages"
|
411
|
+
end
|
412
|
+
# verify the required parameter 'version' is set
|
413
|
+
if @api_client.config.client_side_validation && version.nil?
|
414
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_packages"
|
415
|
+
end
|
416
|
+
# resource path
|
417
|
+
local_var_path = '/public/v{version}/sale/packages'.sub('{' + 'version' + '}', version.to_s)
|
418
|
+
|
419
|
+
# query parameters
|
420
|
+
query_params = {}
|
421
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
422
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
423
|
+
query_params[:'request.packageIds'] = @api_client.build_collection_param(opts[:'request_package_ids'], :multi) if !opts[:'request_package_ids'].nil?
|
424
|
+
query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil?
|
425
|
+
|
426
|
+
# header parameters
|
427
|
+
header_params = {}
|
428
|
+
# HTTP header 'Accept' (if needed)
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
430
|
+
header_params[:'siteId'] = site_id
|
431
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
432
|
+
|
433
|
+
# form parameters
|
434
|
+
form_params = {}
|
435
|
+
|
436
|
+
# http body (model)
|
437
|
+
post_body = nil
|
438
|
+
auth_names = []
|
439
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
440
|
+
:header_params => header_params,
|
441
|
+
:query_params => query_params,
|
442
|
+
:form_params => form_params,
|
443
|
+
:body => post_body,
|
444
|
+
:auth_names => auth_names,
|
445
|
+
:return_type => 'GetPackagesResponse')
|
446
|
+
if @api_client.config.debugging
|
447
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
448
|
+
end
|
449
|
+
return data, status_code, headers
|
450
|
+
end
|
451
|
+
# Get retail products available for purchase at a site.
|
452
|
+
# @param site_id ID of the site from which to pull data.
|
453
|
+
# @param version
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
456
|
+
# @option opts [Array<Integer>] :request_category_ids A list of category IDs to filter by.
|
457
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
458
|
+
# @option opts [Integer] :request_location_id The location ID to use to determine the tax for the products that this request returns.<br /> Default: **online store**
|
459
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
460
|
+
# @option opts [Array<String>] :request_product_ids An ID filter for products.
|
461
|
+
# @option opts [String] :request_search_text A search filter, used for searching by term.
|
462
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, only products that can be sold online are returned.<br /> When `false`, all products are returned.<br /> Default: **false**
|
463
|
+
# @option opts [Array<Integer>] :request_sub_category_ids A list of subcategory IDs to filter by.
|
464
|
+
# @return [GetProductsResponse]
|
465
|
+
def sale_get_products(site_id, version, opts = {})
|
466
|
+
data, _status_code, _headers = sale_get_products_with_http_info(site_id, version, opts)
|
467
|
+
data
|
468
|
+
end
|
469
|
+
|
470
|
+
# Get retail products available for purchase at a site.
|
471
|
+
# @param site_id ID of the site from which to pull data.
|
472
|
+
# @param version
|
473
|
+
# @param [Hash] opts the optional parameters
|
474
|
+
# @option opts [String] :authorization A staff user authorization token.
|
475
|
+
# @option opts [Array<Integer>] :request_category_ids A list of category IDs to filter by.
|
476
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
477
|
+
# @option opts [Integer] :request_location_id The location ID to use to determine the tax for the products that this request returns.<br /> Default: **online store**
|
478
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
479
|
+
# @option opts [Array<String>] :request_product_ids An ID filter for products.
|
480
|
+
# @option opts [String] :request_search_text A search filter, used for searching by term.
|
481
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, only products that can be sold online are returned.<br /> When `false`, all products are returned.<br /> Default: **false**
|
482
|
+
# @option opts [Array<Integer>] :request_sub_category_ids A list of subcategory IDs to filter by.
|
483
|
+
# @return [Array<(GetProductsResponse, Fixnum, Hash)>] GetProductsResponse data, response status code and response headers
|
484
|
+
def sale_get_products_with_http_info(site_id, version, opts = {})
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_products ...'
|
487
|
+
end
|
488
|
+
# verify the required parameter 'site_id' is set
|
489
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
490
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_products"
|
491
|
+
end
|
492
|
+
# verify the required parameter 'version' is set
|
493
|
+
if @api_client.config.client_side_validation && version.nil?
|
494
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_products"
|
495
|
+
end
|
496
|
+
# resource path
|
497
|
+
local_var_path = '/public/v{version}/sale/products'.sub('{' + 'version' + '}', version.to_s)
|
498
|
+
|
499
|
+
# query parameters
|
500
|
+
query_params = {}
|
501
|
+
query_params[:'request.categoryIds'] = @api_client.build_collection_param(opts[:'request_category_ids'], :multi) if !opts[:'request_category_ids'].nil?
|
502
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
503
|
+
query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
|
504
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
505
|
+
query_params[:'request.productIds'] = @api_client.build_collection_param(opts[:'request_product_ids'], :multi) if !opts[:'request_product_ids'].nil?
|
506
|
+
query_params[:'request.searchText'] = opts[:'request_search_text'] if !opts[:'request_search_text'].nil?
|
507
|
+
query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil?
|
508
|
+
query_params[:'request.subCategoryIds'] = @api_client.build_collection_param(opts[:'request_sub_category_ids'], :multi) if !opts[:'request_sub_category_ids'].nil?
|
509
|
+
|
510
|
+
# header parameters
|
511
|
+
header_params = {}
|
512
|
+
# HTTP header 'Accept' (if needed)
|
513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
514
|
+
header_params[:'siteId'] = site_id
|
515
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
516
|
+
|
517
|
+
# form parameters
|
518
|
+
form_params = {}
|
519
|
+
|
520
|
+
# http body (model)
|
521
|
+
post_body = nil
|
522
|
+
auth_names = []
|
523
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
524
|
+
:header_params => header_params,
|
525
|
+
:query_params => query_params,
|
526
|
+
:form_params => form_params,
|
527
|
+
:body => post_body,
|
528
|
+
:auth_names => auth_names,
|
529
|
+
:return_type => 'GetProductsResponse')
|
530
|
+
if @api_client.config.debugging
|
531
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
532
|
+
end
|
533
|
+
return data, status_code, headers
|
534
|
+
end
|
535
|
+
# Get sales completed at a site.
|
536
|
+
# @param site_id ID of the site from which to pull data.
|
537
|
+
# @param version
|
538
|
+
# @param [Hash] opts the optional parameters
|
539
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
540
|
+
# @return [GetSalesResponse]
|
541
|
+
def sale_get_sales(site_id, version, opts = {})
|
542
|
+
data, _status_code, _headers = sale_get_sales_with_http_info(site_id, version, opts)
|
543
|
+
data
|
544
|
+
end
|
545
|
+
|
546
|
+
# Get sales completed at a site.
|
547
|
+
# @param site_id ID of the site from which to pull data.
|
548
|
+
# @param version
|
549
|
+
# @param [Hash] opts the optional parameters
|
550
|
+
# @option opts [String] :authorization A staff user authorization token.
|
551
|
+
# @return [Array<(GetSalesResponse, Fixnum, Hash)>] GetSalesResponse data, response status code and response headers
|
552
|
+
def sale_get_sales_with_http_info(site_id, version, opts = {})
|
553
|
+
if @api_client.config.debugging
|
554
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_sales ...'
|
555
|
+
end
|
556
|
+
# verify the required parameter 'site_id' is set
|
557
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
558
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_sales"
|
559
|
+
end
|
560
|
+
# verify the required parameter 'version' is set
|
561
|
+
if @api_client.config.client_side_validation && version.nil?
|
562
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_sales"
|
563
|
+
end
|
564
|
+
# resource path
|
565
|
+
local_var_path = '/public/v{version}/sale/sales'.sub('{' + 'version' + '}', version.to_s)
|
566
|
+
|
567
|
+
# query parameters
|
568
|
+
query_params = {}
|
569
|
+
|
570
|
+
# header parameters
|
571
|
+
header_params = {}
|
572
|
+
# HTTP header 'Accept' (if needed)
|
573
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
574
|
+
header_params[:'siteId'] = site_id
|
575
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
576
|
+
|
577
|
+
# form parameters
|
578
|
+
form_params = {}
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = nil
|
582
|
+
auth_names = []
|
583
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
584
|
+
:header_params => header_params,
|
585
|
+
:query_params => query_params,
|
586
|
+
:form_params => form_params,
|
587
|
+
:body => post_body,
|
588
|
+
:auth_names => auth_names,
|
589
|
+
:return_type => 'GetSalesResponse')
|
590
|
+
if @api_client.config.debugging
|
591
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_sales\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
592
|
+
end
|
593
|
+
return data, status_code, headers
|
594
|
+
end
|
595
|
+
# Get pricing options available for purchase at a site
|
596
|
+
# @param site_id ID of the site from which to pull data.
|
597
|
+
# @param version
|
598
|
+
# @param [Hash] opts the optional parameters
|
599
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
600
|
+
# @option opts [Integer] :request_class_id Filters to the pricing options for the specified class ID.
|
601
|
+
# @option opts [Integer] :request_class_schedule_id Filters to the pricing options for the specified class schedule ID.
|
602
|
+
# @option opts [BOOLEAN] :request_hide_related_programs When `true`, indicates that pricing options of related programs are omitted from the response.<br /> Default: **false**
|
603
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
604
|
+
# @option opts [Integer] :request_location_id When specified, for each returned pricing option, `TaxRate` and `TaxIncluded` are calculated according to the specified location. Note that this does not filter results to only services provided at the given location, and for locations where Value-Added Tax (VAT) rules apply, the `TaxRate` is set to zero.
|
605
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
606
|
+
# @option opts [Array<Integer>] :request_program_ids Filters to pricing options with the specified program IDs.
|
607
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, filters to the pricing options that can be sold online.<br /> Default: **false**
|
608
|
+
# @option opts [Array<String>] :request_service_ids Filters to the pricing options with the specified IDs. In this context, service and pricing option are used interchangeably.
|
609
|
+
# @option opts [Array<Integer>] :request_session_type_ids Filters to the pricing options with the specified session types IDs.
|
610
|
+
# @option opts [Integer] :request_staff_id Sets `Price` and `OnlinePrice` to the particular pricing of a specific staff member, if allowed by the business.
|
611
|
+
# @return [GetServicesResponse]
|
612
|
+
def sale_get_services(site_id, version, opts = {})
|
613
|
+
data, _status_code, _headers = sale_get_services_with_http_info(site_id, version, opts)
|
614
|
+
data
|
615
|
+
end
|
616
|
+
|
617
|
+
# Get pricing options available for purchase at a site
|
618
|
+
# @param site_id ID of the site from which to pull data.
|
619
|
+
# @param version
|
620
|
+
# @param [Hash] opts the optional parameters
|
621
|
+
# @option opts [String] :authorization A staff user authorization token.
|
622
|
+
# @option opts [Integer] :request_class_id Filters to the pricing options for the specified class ID.
|
623
|
+
# @option opts [Integer] :request_class_schedule_id Filters to the pricing options for the specified class schedule ID.
|
624
|
+
# @option opts [BOOLEAN] :request_hide_related_programs When `true`, indicates that pricing options of related programs are omitted from the response.<br /> Default: **false**
|
625
|
+
# @option opts [Integer] :request_limit Number of results to include, defaults to 100
|
626
|
+
# @option opts [Integer] :request_location_id When specified, for each returned pricing option, `TaxRate` and `TaxIncluded` are calculated according to the specified location. Note that this does not filter results to only services provided at the given location, and for locations where Value-Added Tax (VAT) rules apply, the `TaxRate` is set to zero.
|
627
|
+
# @option opts [Integer] :request_offset Page offset, defaults to 0.
|
628
|
+
# @option opts [Array<Integer>] :request_program_ids Filters to pricing options with the specified program IDs.
|
629
|
+
# @option opts [BOOLEAN] :request_sell_online When `true`, filters to the pricing options that can be sold online.<br /> Default: **false**
|
630
|
+
# @option opts [Array<String>] :request_service_ids Filters to the pricing options with the specified IDs. In this context, service and pricing option are used interchangeably.
|
631
|
+
# @option opts [Array<Integer>] :request_session_type_ids Filters to the pricing options with the specified session types IDs.
|
632
|
+
# @option opts [Integer] :request_staff_id Sets `Price` and `OnlinePrice` to the particular pricing of a specific staff member, if allowed by the business.
|
633
|
+
# @return [Array<(GetServicesResponse, Fixnum, Hash)>] GetServicesResponse data, response status code and response headers
|
634
|
+
def sale_get_services_with_http_info(site_id, version, opts = {})
|
635
|
+
if @api_client.config.debugging
|
636
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_get_services ...'
|
637
|
+
end
|
638
|
+
# verify the required parameter 'site_id' is set
|
639
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
640
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_get_services"
|
641
|
+
end
|
642
|
+
# verify the required parameter 'version' is set
|
643
|
+
if @api_client.config.client_side_validation && version.nil?
|
644
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_get_services"
|
645
|
+
end
|
646
|
+
# resource path
|
647
|
+
local_var_path = '/public/v{version}/sale/services'.sub('{' + 'version' + '}', version.to_s)
|
648
|
+
|
649
|
+
# query parameters
|
650
|
+
query_params = {}
|
651
|
+
query_params[:'request.classId'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
|
652
|
+
query_params[:'request.classScheduleId'] = opts[:'request_class_schedule_id'] if !opts[:'request_class_schedule_id'].nil?
|
653
|
+
query_params[:'request.hideRelatedPrograms'] = opts[:'request_hide_related_programs'] if !opts[:'request_hide_related_programs'].nil?
|
654
|
+
query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
|
655
|
+
query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
|
656
|
+
query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
|
657
|
+
query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
|
658
|
+
query_params[:'request.sellOnline'] = opts[:'request_sell_online'] if !opts[:'request_sell_online'].nil?
|
659
|
+
query_params[:'request.serviceIds'] = @api_client.build_collection_param(opts[:'request_service_ids'], :multi) if !opts[:'request_service_ids'].nil?
|
660
|
+
query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(opts[:'request_session_type_ids'], :multi) if !opts[:'request_session_type_ids'].nil?
|
661
|
+
query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil?
|
662
|
+
|
663
|
+
# header parameters
|
664
|
+
header_params = {}
|
665
|
+
# HTTP header 'Accept' (if needed)
|
666
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
667
|
+
header_params[:'siteId'] = site_id
|
668
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
669
|
+
|
670
|
+
# form parameters
|
671
|
+
form_params = {}
|
672
|
+
|
673
|
+
# http body (model)
|
674
|
+
post_body = nil
|
675
|
+
auth_names = []
|
676
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
677
|
+
:header_params => header_params,
|
678
|
+
:query_params => query_params,
|
679
|
+
:form_params => form_params,
|
680
|
+
:body => post_body,
|
681
|
+
:auth_names => auth_names,
|
682
|
+
:return_type => 'GetServicesResponse')
|
683
|
+
if @api_client.config.debugging
|
684
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_get_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
685
|
+
end
|
686
|
+
return data, status_code, headers
|
687
|
+
end
|
688
|
+
# Purchase a contract for a client.
|
689
|
+
# Allows a client to sign up for a contract or autopay using the information returned from the `GET Contracts` endpoint. The client can pay with a new credit card or with a stored credit card. The client must exist at the site specified before this call is made. This endpoint allows a developer to specify whether a client pays now or pays on the `StartDate`.If you are building a client-facing experience, you should talk with the business owner to understand the owner’s policies before you give clients a choice of the two payment types.
|
690
|
+
# @param request
|
691
|
+
# @param site_id ID of the site from which to pull data.
|
692
|
+
# @param version
|
693
|
+
# @param [Hash] opts the optional parameters
|
694
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
695
|
+
# @return [PurchaseContractResponse]
|
696
|
+
def sale_purchase_contract(request, site_id, version, opts = {})
|
697
|
+
data, _status_code, _headers = sale_purchase_contract_with_http_info(request, site_id, version, opts)
|
698
|
+
data
|
699
|
+
end
|
700
|
+
|
701
|
+
# Purchase a contract for a client.
|
702
|
+
# Allows a client to sign up for a contract or autopay using the information returned from the `GET Contracts` endpoint. The client can pay with a new credit card or with a stored credit card. The client must exist at the site specified before this call is made. This endpoint allows a developer to specify whether a client pays now or pays on the `StartDate`.If you are building a client-facing experience, you should talk with the business owner to understand the owner’s policies before you give clients a choice of the two payment types.
|
703
|
+
# @param request
|
704
|
+
# @param site_id ID of the site from which to pull data.
|
705
|
+
# @param version
|
706
|
+
# @param [Hash] opts the optional parameters
|
707
|
+
# @option opts [String] :authorization A staff user authorization token.
|
708
|
+
# @return [Array<(PurchaseContractResponse, Fixnum, Hash)>] PurchaseContractResponse data, response status code and response headers
|
709
|
+
def sale_purchase_contract_with_http_info(request, site_id, version, opts = {})
|
710
|
+
if @api_client.config.debugging
|
711
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_purchase_contract ...'
|
712
|
+
end
|
713
|
+
# verify the required parameter 'request' is set
|
714
|
+
if @api_client.config.client_side_validation && request.nil?
|
715
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_purchase_contract"
|
716
|
+
end
|
717
|
+
# verify the required parameter 'site_id' is set
|
718
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
719
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_purchase_contract"
|
720
|
+
end
|
721
|
+
# verify the required parameter 'version' is set
|
722
|
+
if @api_client.config.client_side_validation && version.nil?
|
723
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_purchase_contract"
|
724
|
+
end
|
725
|
+
# resource path
|
726
|
+
local_var_path = '/public/v{version}/sale/purchasecontract'.sub('{' + 'version' + '}', version.to_s)
|
727
|
+
|
728
|
+
# query parameters
|
729
|
+
query_params = {}
|
730
|
+
|
731
|
+
# header parameters
|
732
|
+
header_params = {}
|
733
|
+
# HTTP header 'Accept' (if needed)
|
734
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
735
|
+
# HTTP header 'Content-Type'
|
736
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
737
|
+
header_params[:'siteId'] = site_id
|
738
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
739
|
+
|
740
|
+
# form parameters
|
741
|
+
form_params = {}
|
742
|
+
|
743
|
+
# http body (model)
|
744
|
+
post_body = @api_client.object_to_http_body(request)
|
745
|
+
auth_names = []
|
746
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
747
|
+
:header_params => header_params,
|
748
|
+
:query_params => query_params,
|
749
|
+
:form_params => form_params,
|
750
|
+
:body => post_body,
|
751
|
+
:auth_names => auth_names,
|
752
|
+
:return_type => 'PurchaseContractResponse')
|
753
|
+
if @api_client.config.debugging
|
754
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_purchase_contract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
755
|
+
end
|
756
|
+
return data, status_code, headers
|
757
|
+
end
|
758
|
+
# Purchase a gift card for a client.
|
759
|
+
# Allows a client to purchase a gift card from a business in a variety of designs. The card can be emailed to the recipient on a specific day, and a card title and a personal message can be added.
|
760
|
+
# @param request
|
761
|
+
# @param site_id ID of the site from which to pull data.
|
762
|
+
# @param version
|
763
|
+
# @param [Hash] opts the optional parameters
|
764
|
+
# @option opts [String] :authorization A staff user authorization token. (default to )
|
765
|
+
# @return [PurchaseGiftCardResponse]
|
766
|
+
def sale_purchase_gift_card(request, site_id, version, opts = {})
|
767
|
+
data, _status_code, _headers = sale_purchase_gift_card_with_http_info(request, site_id, version, opts)
|
768
|
+
data
|
769
|
+
end
|
770
|
+
|
771
|
+
# Purchase a gift card for a client.
|
772
|
+
# Allows a client to purchase a gift card from a business in a variety of designs. The card can be emailed to the recipient on a specific day, and a card title and a personal message can be added.
|
773
|
+
# @param request
|
774
|
+
# @param site_id ID of the site from which to pull data.
|
775
|
+
# @param version
|
776
|
+
# @param [Hash] opts the optional parameters
|
777
|
+
# @option opts [String] :authorization A staff user authorization token.
|
778
|
+
# @return [Array<(PurchaseGiftCardResponse, Fixnum, Hash)>] PurchaseGiftCardResponse data, response status code and response headers
|
779
|
+
def sale_purchase_gift_card_with_http_info(request, site_id, version, opts = {})
|
780
|
+
if @api_client.config.debugging
|
781
|
+
@api_client.config.logger.debug 'Calling API: SaleApi.sale_purchase_gift_card ...'
|
782
|
+
end
|
783
|
+
# verify the required parameter 'request' is set
|
784
|
+
if @api_client.config.client_side_validation && request.nil?
|
785
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling SaleApi.sale_purchase_gift_card"
|
786
|
+
end
|
787
|
+
# verify the required parameter 'site_id' is set
|
788
|
+
if @api_client.config.client_side_validation && site_id.nil?
|
789
|
+
fail ArgumentError, "Missing the required parameter 'site_id' when calling SaleApi.sale_purchase_gift_card"
|
790
|
+
end
|
791
|
+
# verify the required parameter 'version' is set
|
792
|
+
if @api_client.config.client_side_validation && version.nil?
|
793
|
+
fail ArgumentError, "Missing the required parameter 'version' when calling SaleApi.sale_purchase_gift_card"
|
794
|
+
end
|
795
|
+
# resource path
|
796
|
+
local_var_path = '/public/v{version}/sale/purchasegiftcard'.sub('{' + 'version' + '}', version.to_s)
|
797
|
+
|
798
|
+
# query parameters
|
799
|
+
query_params = {}
|
800
|
+
|
801
|
+
# header parameters
|
802
|
+
header_params = {}
|
803
|
+
# HTTP header 'Accept' (if needed)
|
804
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'])
|
805
|
+
# HTTP header 'Content-Type'
|
806
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
807
|
+
header_params[:'siteId'] = site_id
|
808
|
+
header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?
|
809
|
+
|
810
|
+
# form parameters
|
811
|
+
form_params = {}
|
812
|
+
|
813
|
+
# http body (model)
|
814
|
+
post_body = @api_client.object_to_http_body(request)
|
815
|
+
auth_names = []
|
816
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
817
|
+
:header_params => header_params,
|
818
|
+
:query_params => query_params,
|
819
|
+
:form_params => form_params,
|
820
|
+
:body => post_body,
|
821
|
+
:auth_names => auth_names,
|
822
|
+
:return_type => 'PurchaseGiftCardResponse')
|
823
|
+
if @api_client.config.debugging
|
824
|
+
@api_client.config.logger.debug "API called: SaleApi#sale_purchase_gift_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
825
|
+
end
|
826
|
+
return data, status_code, headers
|
827
|
+
end
|
828
|
+
end
|
829
|
+
end
|