mb-apimatic-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +139 -0
  4. data/bin/console +15 -0
  5. data/lib/mindbody_public_api/api_helper.rb +10 -0
  6. data/lib/mindbody_public_api/client.rb +138 -0
  7. data/lib/mindbody_public_api/configuration.rb +181 -0
  8. data/lib/mindbody_public_api/controllers/appointment_controller.rb +746 -0
  9. data/lib/mindbody_public_api/controllers/base_controller.rb +60 -0
  10. data/lib/mindbody_public_api/controllers/class_controller.rb +826 -0
  11. data/lib/mindbody_public_api/controllers/client_controller.rb +2106 -0
  12. data/lib/mindbody_public_api/controllers/cross_site_controller.rb +43 -0
  13. data/lib/mindbody_public_api/controllers/enrollment_controller.rb +188 -0
  14. data/lib/mindbody_public_api/controllers/payroll_controller.rb +290 -0
  15. data/lib/mindbody_public_api/controllers/pick_a_spot_controller.rb +213 -0
  16. data/lib/mindbody_public_api/controllers/pricing_option_controller.rb +41 -0
  17. data/lib/mindbody_public_api/controllers/sale_controller.rb +1226 -0
  18. data/lib/mindbody_public_api/controllers/site_controller.rb +815 -0
  19. data/lib/mindbody_public_api/controllers/staff_controller.rb +408 -0
  20. data/lib/mindbody_public_api/controllers/user_token_controller.rb +92 -0
  21. data/lib/mindbody_public_api/exceptions/api_exception.rb +21 -0
  22. data/lib/mindbody_public_api/http/auth/custom_header_authentication.rb +52 -0
  23. data/lib/mindbody_public_api/http/http_call_back.rb +10 -0
  24. data/lib/mindbody_public_api/http/http_method_enum.rb +10 -0
  25. data/lib/mindbody_public_api/http/http_request.rb +10 -0
  26. data/lib/mindbody_public_api/http/http_response.rb +10 -0
  27. data/lib/mindbody_public_api/http/proxy_settings.rb +22 -0
  28. data/lib/mindbody_public_api/models/action10_enum.rb +48 -0
  29. data/lib/mindbody_public_api/models/action1_enum.rb +48 -0
  30. data/lib/mindbody_public_api/models/action8_enum.rb +48 -0
  31. data/lib/mindbody_public_api/models/action_enum.rb +48 -0
  32. data/lib/mindbody_public_api/models/add_appointment_add_on_request.rb +108 -0
  33. data/lib/mindbody_public_api/models/add_appointment_add_on_response.rb +74 -0
  34. data/lib/mindbody_public_api/models/add_appointment_outcome.rb +83 -0
  35. data/lib/mindbody_public_api/models/add_appointment_request.rb +319 -0
  36. data/lib/mindbody_public_api/models/add_appointment_response.rb +62 -0
  37. data/lib/mindbody_public_api/models/add_arrival_request.rb +113 -0
  38. data/lib/mindbody_public_api/models/add_arrival_response.rb +72 -0
  39. data/lib/mindbody_public_api/models/add_availabilities_request.rb +187 -0
  40. data/lib/mindbody_public_api/models/add_availabilities_response.rb +89 -0
  41. data/lib/mindbody_public_api/models/add_class_enrollment_schedule_request.rb +351 -0
  42. data/lib/mindbody_public_api/models/add_client_direct_debit_info_request.rb +119 -0
  43. data/lib/mindbody_public_api/models/add_client_direct_debit_info_response.rb +108 -0
  44. data/lib/mindbody_public_api/models/add_client_request.rb +854 -0
  45. data/lib/mindbody_public_api/models/add_client_response.rb +62 -0
  46. data/lib/mindbody_public_api/models/add_client_to_class_request.rb +199 -0
  47. data/lib/mindbody_public_api/models/add_client_to_class_response.rb +62 -0
  48. data/lib/mindbody_public_api/models/add_client_to_class_visit.rb +353 -0
  49. data/lib/mindbody_public_api/models/add_client_to_enrollment_request.rb +165 -0
  50. data/lib/mindbody_public_api/models/add_contact_log_request.rb +175 -0
  51. data/lib/mindbody_public_api/models/add_contact_log_type.rb +71 -0
  52. data/lib/mindbody_public_api/models/add_formula_note_request.rb +80 -0
  53. data/lib/mindbody_public_api/models/add_multiple_appointments_request.rb +71 -0
  54. data/lib/mindbody_public_api/models/add_multiple_appointments_response.rb +71 -0
  55. data/lib/mindbody_public_api/models/add_on_small.rb +90 -0
  56. data/lib/mindbody_public_api/models/add_on_small1.rb +90 -0
  57. data/lib/mindbody_public_api/models/add_promo_code_request.rb +201 -0
  58. data/lib/mindbody_public_api/models/add_promo_code_response.rb +62 -0
  59. data/lib/mindbody_public_api/models/add_site_client_index_request.rb +163 -0
  60. data/lib/mindbody_public_api/models/add_site_client_index_response.rb +175 -0
  61. data/lib/mindbody_public_api/models/add_staff_availability_request.rb +170 -0
  62. data/lib/mindbody_public_api/models/add_staff_request.rb +357 -0
  63. data/lib/mindbody_public_api/models/add_staff_response.rb +62 -0
  64. data/lib/mindbody_public_api/models/allowed_permission_enum.rb +764 -0
  65. data/lib/mindbody_public_api/models/alternative_payment_method.rb +71 -0
  66. data/lib/mindbody_public_api/models/amenity.rb +71 -0
  67. data/lib/mindbody_public_api/models/amenity1.rb +71 -0
  68. data/lib/mindbody_public_api/models/api_error.rb +71 -0
  69. data/lib/mindbody_public_api/models/api_error1.rb +76 -0
  70. data/lib/mindbody_public_api/models/applicable_item.rb +86 -0
  71. data/lib/mindbody_public_api/models/appointment.rb +351 -0
  72. data/lib/mindbody_public_api/models/appointment1.rb +322 -0
  73. data/lib/mindbody_public_api/models/appointment_add_on.rb +103 -0
  74. data/lib/mindbody_public_api/models/appointment_gender_preference1_enum.rb +41 -0
  75. data/lib/mindbody_public_api/models/appointment_gender_preference_enum.rb +44 -0
  76. data/lib/mindbody_public_api/models/appointment_option.rb +91 -0
  77. data/lib/mindbody_public_api/models/appointment_staff.rb +92 -0
  78. data/lib/mindbody_public_api/models/appointment_status_enum.rb +64 -0
  79. data/lib/mindbody_public_api/models/assign_staff_session_type_request.rb +146 -0
  80. data/lib/mindbody_public_api/models/assign_staff_session_type_response.rb +138 -0
  81. data/lib/mindbody_public_api/models/assigned_client_index.rb +71 -0
  82. data/lib/mindbody_public_api/models/autopay_schedule.rb +93 -0
  83. data/lib/mindbody_public_api/models/autopay_status_enum.rb +40 -0
  84. data/lib/mindbody_public_api/models/availability.rb +233 -0
  85. data/lib/mindbody_public_api/models/availability1.rb +228 -0
  86. data/lib/mindbody_public_api/models/base_model.rb +110 -0
  87. data/lib/mindbody_public_api/models/booking_status_enum.rb +40 -0
  88. data/lib/mindbody_public_api/models/booking_window.rb +130 -0
  89. data/lib/mindbody_public_api/models/cancel_single_class_request.rb +98 -0
  90. data/lib/mindbody_public_api/models/cancel_single_class_response.rb +63 -0
  91. data/lib/mindbody_public_api/models/cart_item.rb +147 -0
  92. data/lib/mindbody_public_api/models/category.rb +192 -0
  93. data/lib/mindbody_public_api/models/checkout_alternative_payment_info.rb +72 -0
  94. data/lib/mindbody_public_api/models/checkout_appointment_booking_request.rb +155 -0
  95. data/lib/mindbody_public_api/models/checkout_item.rb +77 -0
  96. data/lib/mindbody_public_api/models/checkout_item_wrapper.rb +183 -0
  97. data/lib/mindbody_public_api/models/checkout_payment_info.rb +101 -0
  98. data/lib/mindbody_public_api/models/checkout_shopping_cart_request.rb +339 -0
  99. data/lib/mindbody_public_api/models/checkout_shopping_cart_response.rb +119 -0
  100. data/lib/mindbody_public_api/models/class_client_detail.rb +68 -0
  101. data/lib/mindbody_public_api/models/class_description.rb +215 -0
  102. data/lib/mindbody_public_api/models/class_schedule.rb +365 -0
  103. data/lib/mindbody_public_api/models/client.rb +832 -0
  104. data/lib/mindbody_public_api/models/client_arrival.rb +95 -0
  105. data/lib/mindbody_public_api/models/client_contract.rb +353 -0
  106. data/lib/mindbody_public_api/models/client_credit_card.rb +153 -0
  107. data/lib/mindbody_public_api/models/client_document.rb +96 -0
  108. data/lib/mindbody_public_api/models/client_duplicate.rb +109 -0
  109. data/lib/mindbody_public_api/models/client_index.rb +127 -0
  110. data/lib/mindbody_public_api/models/client_index_value.rb +82 -0
  111. data/lib/mindbody_public_api/models/client_membership.rb +272 -0
  112. data/lib/mindbody_public_api/models/client_memberships.rb +91 -0
  113. data/lib/mindbody_public_api/models/client_purchase_record.rb +142 -0
  114. data/lib/mindbody_public_api/models/client_relationship.rb +109 -0
  115. data/lib/mindbody_public_api/models/client_reward_transaction.rb +132 -0
  116. data/lib/mindbody_public_api/models/client_service.rb +228 -0
  117. data/lib/mindbody_public_api/models/client_suspension_info.rb +86 -0
  118. data/lib/mindbody_public_api/models/client_with_suspension_info.rb +844 -0
  119. data/lib/mindbody_public_api/models/color.rb +71 -0
  120. data/lib/mindbody_public_api/models/commission_detail.rb +83 -0
  121. data/lib/mindbody_public_api/models/commission_payroll_purchase_event.rb +143 -0
  122. data/lib/mindbody_public_api/models/complete_checkout_shopping_cart_using_alternative_payments_request.rb +86 -0
  123. data/lib/mindbody_public_api/models/contact_log.rb +198 -0
  124. data/lib/mindbody_public_api/models/contact_log_comment.rb +101 -0
  125. data/lib/mindbody_public_api/models/contact_log_sub_type.rb +71 -0
  126. data/lib/mindbody_public_api/models/contact_log_type.rb +91 -0
  127. data/lib/mindbody_public_api/models/content_format_enum.rb +40 -0
  128. data/lib/mindbody_public_api/models/contract.rb +636 -0
  129. data/lib/mindbody_public_api/models/contract_item.rb +121 -0
  130. data/lib/mindbody_public_api/models/copy_credit_card_request.rb +120 -0
  131. data/lib/mindbody_public_api/models/copy_credit_card_response.rb +72 -0
  132. data/lib/mindbody_public_api/models/copy_credit_card_response_client.rb +102 -0
  133. data/lib/mindbody_public_api/models/course.rb +167 -0
  134. data/lib/mindbody_public_api/models/create_reservation_response.rb +73 -0
  135. data/lib/mindbody_public_api/models/credit_card_info.rb +168 -0
  136. data/lib/mindbody_public_api/models/cross_regional_client_association.rb +92 -0
  137. data/lib/mindbody_public_api/models/custom_client_field.rb +81 -0
  138. data/lib/mindbody_public_api/models/custom_client_field_value.rb +90 -0
  139. data/lib/mindbody_public_api/models/custom_payment_method.rb +71 -0
  140. data/lib/mindbody_public_api/models/days_of_week_enum.rb +56 -0
  141. data/lib/mindbody_public_api/models/days_valid_enum.rb +56 -0
  142. data/lib/mindbody_public_api/models/deactivate_promo_code_request.rb +60 -0
  143. data/lib/mindbody_public_api/models/delete_availability_request.rb +75 -0
  144. data/lib/mindbody_public_api/models/delete_client_formula_note_request.rb +90 -0
  145. data/lib/mindbody_public_api/models/delete_contact_log_request.rb +82 -0
  146. data/lib/mindbody_public_api/models/denied_permission_enum.rb +764 -0
  147. data/lib/mindbody_public_api/models/direct_debit_info.rb +97 -0
  148. data/lib/mindbody_public_api/models/discount.rb +71 -0
  149. data/lib/mindbody_public_api/models/formula_note_response.rb +172 -0
  150. data/lib/mindbody_public_api/models/frequency_type_enum.rb +40 -0
  151. data/lib/mindbody_public_api/models/gender_option.rb +93 -0
  152. data/lib/mindbody_public_api/models/gender_preference_enum.rb +41 -0
  153. data/lib/mindbody_public_api/models/get_activation_code_response.rb +76 -0
  154. data/lib/mindbody_public_api/models/get_active_client_memberships_request.rb +163 -0
  155. data/lib/mindbody_public_api/models/get_active_client_memberships_response.rb +83 -0
  156. data/lib/mindbody_public_api/models/get_active_clients_memberships_request.rb +151 -0
  157. data/lib/mindbody_public_api/models/get_active_clients_memberships_response.rb +83 -0
  158. data/lib/mindbody_public_api/models/get_active_session_times_request.rb +136 -0
  159. data/lib/mindbody_public_api/models/get_active_session_times_response.rb +81 -0
  160. data/lib/mindbody_public_api/models/get_add_ons_request.rb +81 -0
  161. data/lib/mindbody_public_api/models/get_add_ons_response.rb +82 -0
  162. data/lib/mindbody_public_api/models/get_alternative_payment_methods_request.rb +72 -0
  163. data/lib/mindbody_public_api/models/get_alternative_payment_methods_response.rb +71 -0
  164. data/lib/mindbody_public_api/models/get_appointment_options_response.rb +71 -0
  165. data/lib/mindbody_public_api/models/get_available_dates_request.rb +121 -0
  166. data/lib/mindbody_public_api/models/get_available_dates_response.rb +77 -0
  167. data/lib/mindbody_public_api/models/get_bookable_items_request.rb +190 -0
  168. data/lib/mindbody_public_api/models/get_bookable_items_response.rb +83 -0
  169. data/lib/mindbody_public_api/models/get_categories_request.rb +118 -0
  170. data/lib/mindbody_public_api/models/get_categories_response.rb +83 -0
  171. data/lib/mindbody_public_api/models/get_class_descriptions_request.rb +168 -0
  172. data/lib/mindbody_public_api/models/get_class_descriptions_response.rb +83 -0
  173. data/lib/mindbody_public_api/models/get_class_schedules_request.rb +172 -0
  174. data/lib/mindbody_public_api/models/get_class_schedules_response.rb +83 -0
  175. data/lib/mindbody_public_api/models/get_class_visits_request.rb +100 -0
  176. data/lib/mindbody_public_api/models/get_class_visits_response.rb +63 -0
  177. data/lib/mindbody_public_api/models/get_classes_request.rb +281 -0
  178. data/lib/mindbody_public_api/models/get_classes_response.rb +82 -0
  179. data/lib/mindbody_public_api/models/get_client_account_balances_request.rb +110 -0
  180. data/lib/mindbody_public_api/models/get_client_account_balances_response.rb +82 -0
  181. data/lib/mindbody_public_api/models/get_client_complete_info_request.rb +239 -0
  182. data/lib/mindbody_public_api/models/get_client_complete_info_response.rb +140 -0
  183. data/lib/mindbody_public_api/models/get_client_contracts_request.rb +127 -0
  184. data/lib/mindbody_public_api/models/get_client_contracts_response.rb +82 -0
  185. data/lib/mindbody_public_api/models/get_client_duplicates_request.rb +101 -0
  186. data/lib/mindbody_public_api/models/get_client_duplicates_response.rb +83 -0
  187. data/lib/mindbody_public_api/models/get_client_formula_notes_request.rb +93 -0
  188. data/lib/mindbody_public_api/models/get_client_formula_notes_response.rb +85 -0
  189. data/lib/mindbody_public_api/models/get_client_indexes_request.rb +64 -0
  190. data/lib/mindbody_public_api/models/get_client_indexes_response.rb +71 -0
  191. data/lib/mindbody_public_api/models/get_client_purchases_request.rb +141 -0
  192. data/lib/mindbody_public_api/models/get_client_purchases_response.rb +82 -0
  193. data/lib/mindbody_public_api/models/get_client_referral_types_request.rb +66 -0
  194. data/lib/mindbody_public_api/models/get_client_referral_types_response.rb +62 -0
  195. data/lib/mindbody_public_api/models/get_client_rewards_request.rb +119 -0
  196. data/lib/mindbody_public_api/models/get_client_rewards_response.rb +94 -0
  197. data/lib/mindbody_public_api/models/get_client_schedule_request.rb +180 -0
  198. data/lib/mindbody_public_api/models/get_client_schedule_response.rb +82 -0
  199. data/lib/mindbody_public_api/models/get_client_services_request.rb +356 -0
  200. data/lib/mindbody_public_api/models/get_client_services_response.rb +83 -0
  201. data/lib/mindbody_public_api/models/get_client_visits_request.rb +180 -0
  202. data/lib/mindbody_public_api/models/get_client_visits_response.rb +82 -0
  203. data/lib/mindbody_public_api/models/get_clients_request.rb +157 -0
  204. data/lib/mindbody_public_api/models/get_clients_response.rb +82 -0
  205. data/lib/mindbody_public_api/models/get_commissions_request.rb +144 -0
  206. data/lib/mindbody_public_api/models/get_commissions_response.rb +84 -0
  207. data/lib/mindbody_public_api/models/get_contact_log_types_request.rb +84 -0
  208. data/lib/mindbody_public_api/models/get_contact_log_types_response.rb +83 -0
  209. data/lib/mindbody_public_api/models/get_contact_logs_request.rb +167 -0
  210. data/lib/mindbody_public_api/models/get_contact_logs_response.rb +83 -0
  211. data/lib/mindbody_public_api/models/get_contracts_request.rb +128 -0
  212. data/lib/mindbody_public_api/models/get_contracts_response.rb +82 -0
  213. data/lib/mindbody_public_api/models/get_courses_reponse.rb +82 -0
  214. data/lib/mindbody_public_api/models/get_courses_request.rb +161 -0
  215. data/lib/mindbody_public_api/models/get_cross_regional_client_associations_request.rb +152 -0
  216. data/lib/mindbody_public_api/models/get_cross_regional_client_associations_response.rb +88 -0
  217. data/lib/mindbody_public_api/models/get_custom_client_fields_request.rb +71 -0
  218. data/lib/mindbody_public_api/models/get_custom_client_fields_response.rb +83 -0
  219. data/lib/mindbody_public_api/models/get_custom_payment_methods_request.rb +71 -0
  220. data/lib/mindbody_public_api/models/get_custom_payment_methods_response.rb +83 -0
  221. data/lib/mindbody_public_api/models/get_enrollments_request.rb +172 -0
  222. data/lib/mindbody_public_api/models/get_enrollments_response.rb +83 -0
  223. data/lib/mindbody_public_api/models/get_genders_response.rb +71 -0
  224. data/lib/mindbody_public_api/models/get_gift_card_balance_response.rb +73 -0
  225. data/lib/mindbody_public_api/models/get_gift_card_response.rb +82 -0
  226. data/lib/mindbody_public_api/models/get_gift_cards_request.rb +119 -0
  227. data/lib/mindbody_public_api/models/get_liability_waiver_response.rb +63 -0
  228. data/lib/mindbody_public_api/models/get_locations_request.rb +71 -0
  229. data/lib/mindbody_public_api/models/get_locations_response.rb +82 -0
  230. data/lib/mindbody_public_api/models/get_memberships_request.rb +63 -0
  231. data/lib/mindbody_public_api/models/get_memberships_response.rb +71 -0
  232. data/lib/mindbody_public_api/models/get_mobile_providers_request.rb +65 -0
  233. data/lib/mindbody_public_api/models/get_mobile_providers_response.rb +71 -0
  234. data/lib/mindbody_public_api/models/get_packages_request.rb +106 -0
  235. data/lib/mindbody_public_api/models/get_packages_response.rb +82 -0
  236. data/lib/mindbody_public_api/models/get_payment_types_request.rb +64 -0
  237. data/lib/mindbody_public_api/models/get_payment_types_response.rb +71 -0
  238. data/lib/mindbody_public_api/models/get_pick_a_spot_class_response.rb +92 -0
  239. data/lib/mindbody_public_api/models/get_products_inventory_request.rb +105 -0
  240. data/lib/mindbody_public_api/models/get_products_inventory_response.rb +83 -0
  241. data/lib/mindbody_public_api/models/get_products_request.rb +153 -0
  242. data/lib/mindbody_public_api/models/get_products_response.rb +82 -0
  243. data/lib/mindbody_public_api/models/get_programs_request.rb +112 -0
  244. data/lib/mindbody_public_api/models/get_programs_response.rb +82 -0
  245. data/lib/mindbody_public_api/models/get_promo_codes_request.rb +152 -0
  246. data/lib/mindbody_public_api/models/get_promo_codes_response.rb +83 -0
  247. data/lib/mindbody_public_api/models/get_prospect_stages_request.rb +65 -0
  248. data/lib/mindbody_public_api/models/get_prospect_stages_response.rb +71 -0
  249. data/lib/mindbody_public_api/models/get_relationships_request.rb +83 -0
  250. data/lib/mindbody_public_api/models/get_relationships_response.rb +83 -0
  251. data/lib/mindbody_public_api/models/get_required_client_fields_response.rb +64 -0
  252. data/lib/mindbody_public_api/models/get_reservation_response.rb +93 -0
  253. data/lib/mindbody_public_api/models/get_resource_availabilities_request.rb +149 -0
  254. data/lib/mindbody_public_api/models/get_resources_request.rb +124 -0
  255. data/lib/mindbody_public_api/models/get_resources_response.rb +71 -0
  256. data/lib/mindbody_public_api/models/get_sales_reps_request.rb +95 -0
  257. data/lib/mindbody_public_api/models/get_sales_reps_response.rb +82 -0
  258. data/lib/mindbody_public_api/models/get_sales_request.rb +134 -0
  259. data/lib/mindbody_public_api/models/get_sales_response.rb +83 -0
  260. data/lib/mindbody_public_api/models/get_schedule_items_request.rb +145 -0
  261. data/lib/mindbody_public_api/models/get_schedule_items_response.rb +83 -0
  262. data/lib/mindbody_public_api/models/get_scheduled_service_earnings_request.rb +172 -0
  263. data/lib/mindbody_public_api/models/get_scheduled_service_earnings_response.rb +87 -0
  264. data/lib/mindbody_public_api/models/get_semesters_request.rb +132 -0
  265. data/lib/mindbody_public_api/models/get_semesters_response.rb +83 -0
  266. data/lib/mindbody_public_api/models/get_services_request.rb +221 -0
  267. data/lib/mindbody_public_api/models/get_services_response.rb +82 -0
  268. data/lib/mindbody_public_api/models/get_session_types_request.rb +95 -0
  269. data/lib/mindbody_public_api/models/get_session_types_response.rb +83 -0
  270. data/lib/mindbody_public_api/models/get_sites_request.rb +111 -0
  271. data/lib/mindbody_public_api/models/get_sites_response.rb +82 -0
  272. data/lib/mindbody_public_api/models/get_staff_appointments_request.rb +173 -0
  273. data/lib/mindbody_public_api/models/get_staff_appointments_response.rb +83 -0
  274. data/lib/mindbody_public_api/models/get_staff_image_url_request.rb +62 -0
  275. data/lib/mindbody_public_api/models/get_staff_image_url_response.rb +73 -0
  276. data/lib/mindbody_public_api/models/get_staff_permissions_request.rb +60 -0
  277. data/lib/mindbody_public_api/models/get_staff_permissions_response.rb +62 -0
  278. data/lib/mindbody_public_api/models/get_staff_request.rb +144 -0
  279. data/lib/mindbody_public_api/models/get_staff_response.rb +84 -0
  280. data/lib/mindbody_public_api/models/get_staff_session_types_request.rb +104 -0
  281. data/lib/mindbody_public_api/models/get_staff_session_types_response.rb +83 -0
  282. data/lib/mindbody_public_api/models/get_time_cards_request.rb +144 -0
  283. data/lib/mindbody_public_api/models/get_time_cards_response.rb +82 -0
  284. data/lib/mindbody_public_api/models/get_tips_request.rb +144 -0
  285. data/lib/mindbody_public_api/models/get_tips_response.rb +83 -0
  286. data/lib/mindbody_public_api/models/get_transactions_request.rb +173 -0
  287. data/lib/mindbody_public_api/models/get_transactions_response.rb +84 -0
  288. data/lib/mindbody_public_api/models/get_unavailabilities_request.rb +120 -0
  289. data/lib/mindbody_public_api/models/get_unavailabilities_response.rb +83 -0
  290. data/lib/mindbody_public_api/models/get_waitlist_entries_request.rb +144 -0
  291. data/lib/mindbody_public_api/models/get_waitlist_entries_response.rb +83 -0
  292. data/lib/mindbody_public_api/models/gift_card.rb +191 -0
  293. data/lib/mindbody_public_api/models/gift_card_layout.rb +82 -0
  294. data/lib/mindbody_public_api/models/http_content.rb +71 -0
  295. data/lib/mindbody_public_api/models/initiate_checkout_shopping_cart_using_alternative_payments_request.rb +265 -0
  296. data/lib/mindbody_public_api/models/initiate_purchase_contract_request.rb +184 -0
  297. data/lib/mindbody_public_api/models/issue_request.rb +71 -0
  298. data/lib/mindbody_public_api/models/issue_response.rb +101 -0
  299. data/lib/mindbody_public_api/models/lead_channel.rb +104 -0
  300. data/lib/mindbody_public_api/models/level.rb +81 -0
  301. data/lib/mindbody_public_api/models/liability.rb +102 -0
  302. data/lib/mindbody_public_api/models/location.rb +331 -0
  303. data/lib/mindbody_public_api/models/location1.rb +639 -0
  304. data/lib/mindbody_public_api/models/m0_culture_neutral_public_key_token_b77a5c561934e089.rb +71 -0
  305. data/lib/mindbody_public_api/models/mclass.rb +430 -0
  306. data/lib/mindbody_public_api/models/membership.rb +255 -0
  307. data/lib/mindbody_public_api/models/membership_type_restriction.rb +71 -0
  308. data/lib/mindbody_public_api/models/merge_clients_request.rb +75 -0
  309. data/lib/mindbody_public_api/models/minimum_commitment_unit_enum.rb +40 -0
  310. data/lib/mindbody_public_api/models/mobile_provider.rb +93 -0
  311. data/lib/mindbody_public_api/models/package.rb +131 -0
  312. data/lib/mindbody_public_api/models/pagination.rb +95 -0
  313. data/lib/mindbody_public_api/models/pagination_response.rb +95 -0
  314. data/lib/mindbody_public_api/models/payment_method_enum.rb +44 -0
  315. data/lib/mindbody_public_api/models/payment_processing_failure.rb +88 -0
  316. data/lib/mindbody_public_api/models/payment_type.rb +93 -0
  317. data/lib/mindbody_public_api/models/pick_a_spot_class.rb +193 -0
  318. data/lib/mindbody_public_api/models/pricing_relationships.rb +71 -0
  319. data/lib/mindbody_public_api/models/product.rb +267 -0
  320. data/lib/mindbody_public_api/models/products_inventory.rb +173 -0
  321. data/lib/mindbody_public_api/models/program.rb +129 -0
  322. data/lib/mindbody_public_api/models/program1.rb +150 -0
  323. data/lib/mindbody_public_api/models/program_membership.rb +71 -0
  324. data/lib/mindbody_public_api/models/promo_code.rb +233 -0
  325. data/lib/mindbody_public_api/models/prospect_stage.rb +84 -0
  326. data/lib/mindbody_public_api/models/public_display1_enum.rb +42 -0
  327. data/lib/mindbody_public_api/models/public_display_enum.rb +41 -0
  328. data/lib/mindbody_public_api/models/purchase_account_credit_request.rb +154 -0
  329. data/lib/mindbody_public_api/models/purchase_account_credit_response.rb +118 -0
  330. data/lib/mindbody_public_api/models/purchase_contract_request.rb +324 -0
  331. data/lib/mindbody_public_api/models/purchase_contract_response.rb +141 -0
  332. data/lib/mindbody_public_api/models/purchase_contract_response_totals.rb +92 -0
  333. data/lib/mindbody_public_api/models/purchase_gift_card_request.rb +273 -0
  334. data/lib/mindbody_public_api/models/purchase_gift_card_response.rb +183 -0
  335. data/lib/mindbody_public_api/models/purchased_item.rb +337 -0
  336. data/lib/mindbody_public_api/models/relationship.rb +85 -0
  337. data/lib/mindbody_public_api/models/remove_client_from_class_request.rb +142 -0
  338. data/lib/mindbody_public_api/models/remove_client_from_class_response.rb +63 -0
  339. data/lib/mindbody_public_api/models/remove_clients_from_classes_request.rb +140 -0
  340. data/lib/mindbody_public_api/models/remove_clients_from_classes_response.rb +102 -0
  341. data/lib/mindbody_public_api/models/remove_from_waitlist_request.rb +61 -0
  342. data/lib/mindbody_public_api/models/request_schedule_type_enum.rb +56 -0
  343. data/lib/mindbody_public_api/models/reservation.rb +158 -0
  344. data/lib/mindbody_public_api/models/resource.rb +71 -0
  345. data/lib/mindbody_public_api/models/resource1.rb +124 -0
  346. data/lib/mindbody_public_api/models/resource_availability.rb +100 -0
  347. data/lib/mindbody_public_api/models/resource_availability1.rb +124 -0
  348. data/lib/mindbody_public_api/models/resource_slim.rb +71 -0
  349. data/lib/mindbody_public_api/models/response_details.rb +82 -0
  350. data/lib/mindbody_public_api/models/return_sale_request.rb +71 -0
  351. data/lib/mindbody_public_api/models/return_sale_response.rb +82 -0
  352. data/lib/mindbody_public_api/models/sale.rb +210 -0
  353. data/lib/mindbody_public_api/models/sale_payment.rb +114 -0
  354. data/lib/mindbody_public_api/models/sales_rep.rb +107 -0
  355. data/lib/mindbody_public_api/models/sales_rep_response.rb +93 -0
  356. data/lib/mindbody_public_api/models/schedule_type1_enum.rb +57 -0
  357. data/lib/mindbody_public_api/models/schedule_type2_enum.rb +56 -0
  358. data/lib/mindbody_public_api/models/schedule_type3_enum.rb +57 -0
  359. data/lib/mindbody_public_api/models/schedule_type4_enum.rb +56 -0
  360. data/lib/mindbody_public_api/models/schedule_type_enum.rb +57 -0
  361. data/lib/mindbody_public_api/models/scheduled_service_earnings_event.rb +117 -0
  362. data/lib/mindbody_public_api/models/scheduled_service_type_enum.rb +44 -0
  363. data/lib/mindbody_public_api/models/semester.rb +167 -0
  364. data/lib/mindbody_public_api/models/send_auto_email_request.rb +71 -0
  365. data/lib/mindbody_public_api/models/send_password_reset_email_request.rb +81 -0
  366. data/lib/mindbody_public_api/models/service.rb +366 -0
  367. data/lib/mindbody_public_api/models/service_tag.rb +72 -0
  368. data/lib/mindbody_public_api/models/session_type.rb +198 -0
  369. data/lib/mindbody_public_api/models/session_type1.rb +204 -0
  370. data/lib/mindbody_public_api/models/shopping_cart.rb +151 -0
  371. data/lib/mindbody_public_api/models/site.rb +347 -0
  372. data/lib/mindbody_public_api/models/size.rb +71 -0
  373. data/lib/mindbody_public_api/models/spot.rb +87 -0
  374. data/lib/mindbody_public_api/models/staff.rb +501 -0
  375. data/lib/mindbody_public_api/models/staff1.rb +588 -0
  376. data/lib/mindbody_public_api/models/staff_permission_group.rb +105 -0
  377. data/lib/mindbody_public_api/models/staff_session_type.rb +205 -0
  378. data/lib/mindbody_public_api/models/staff_setting.rb +84 -0
  379. data/lib/mindbody_public_api/models/status1_enum.rb +56 -0
  380. data/lib/mindbody_public_api/models/status_enum.rb +66 -0
  381. data/lib/mindbody_public_api/models/stored_card_info.rb +62 -0
  382. data/lib/mindbody_public_api/models/sub_category.rb +82 -0
  383. data/lib/mindbody_public_api/models/substitute_class_teacher_request.rb +127 -0
  384. data/lib/mindbody_public_api/models/substitute_class_teacher_response.rb +63 -0
  385. data/lib/mindbody_public_api/models/substitute_teacher_class.rb +318 -0
  386. data/lib/mindbody_public_api/models/suspend_contract_request.rb +162 -0
  387. data/lib/mindbody_public_api/models/suspend_contract_response.rb +62 -0
  388. data/lib/mindbody_public_api/models/terminate_contract_request.rb +113 -0
  389. data/lib/mindbody_public_api/models/terminate_contract_response.rb +62 -0
  390. data/lib/mindbody_public_api/models/time_card_event.rb +139 -0
  391. data/lib/mindbody_public_api/models/tip.rb +101 -0
  392. data/lib/mindbody_public_api/models/transaction.rb +245 -0
  393. data/lib/mindbody_public_api/models/transaction_response.rb +74 -0
  394. data/lib/mindbody_public_api/models/type1_enum.rb +56 -0
  395. data/lib/mindbody_public_api/models/type2_enum.rb +56 -0
  396. data/lib/mindbody_public_api/models/type_enum.rb +57 -0
  397. data/lib/mindbody_public_api/models/unavailability.rb +109 -0
  398. data/lib/mindbody_public_api/models/unavailability1.rb +109 -0
  399. data/lib/mindbody_public_api/models/unavailability_plain.rb +119 -0
  400. data/lib/mindbody_public_api/models/upcoming_autopay_event.rb +133 -0
  401. data/lib/mindbody_public_api/models/update_appointment_request.rb +225 -0
  402. data/lib/mindbody_public_api/models/update_appointment_response.rb +62 -0
  403. data/lib/mindbody_public_api/models/update_availability_request.rb +171 -0
  404. data/lib/mindbody_public_api/models/update_availability_response.rb +89 -0
  405. data/lib/mindbody_public_api/models/update_class_enrollment_schedule_request.rb +343 -0
  406. data/lib/mindbody_public_api/models/update_class_schedule_notes_request.rb +62 -0
  407. data/lib/mindbody_public_api/models/update_client_contract_autopays_request.rb +149 -0
  408. data/lib/mindbody_public_api/models/update_client_request.rb +128 -0
  409. data/lib/mindbody_public_api/models/update_client_response.rb +62 -0
  410. data/lib/mindbody_public_api/models/update_client_rewards_request.rb +143 -0
  411. data/lib/mindbody_public_api/models/update_client_service_request.rb +121 -0
  412. data/lib/mindbody_public_api/models/update_client_service_response.rb +62 -0
  413. data/lib/mindbody_public_api/models/update_client_visit_request.rb +130 -0
  414. data/lib/mindbody_public_api/models/update_client_visit_response.rb +62 -0
  415. data/lib/mindbody_public_api/models/update_contact_log_comment.rb +72 -0
  416. data/lib/mindbody_public_api/models/update_contact_log_request.rb +188 -0
  417. data/lib/mindbody_public_api/models/update_contact_log_type.rb +71 -0
  418. data/lib/mindbody_public_api/models/update_pricing_option_request.rb +252 -0
  419. data/lib/mindbody_public_api/models/update_product_price_request.rb +83 -0
  420. data/lib/mindbody_public_api/models/update_product_price_response.rb +62 -0
  421. data/lib/mindbody_public_api/models/update_product_request.rb +83 -0
  422. data/lib/mindbody_public_api/models/update_reservation_response.rb +73 -0
  423. data/lib/mindbody_public_api/models/update_sale_date_request.rb +81 -0
  424. data/lib/mindbody_public_api/models/update_sale_date_response.rb +62 -0
  425. data/lib/mindbody_public_api/models/update_service_request.rb +82 -0
  426. data/lib/mindbody_public_api/models/update_service_response.rb +71 -0
  427. data/lib/mindbody_public_api/models/update_site_client_index_request.rb +172 -0
  428. data/lib/mindbody_public_api/models/update_site_client_index_response.rb +175 -0
  429. data/lib/mindbody_public_api/models/update_staff_permissions_request.rb +71 -0
  430. data/lib/mindbody_public_api/models/update_staff_permissions_response.rb +62 -0
  431. data/lib/mindbody_public_api/models/update_staff_request.rb +378 -0
  432. data/lib/mindbody_public_api/models/update_staff_response.rb +62 -0
  433. data/lib/mindbody_public_api/models/upload_client_document_request.rb +68 -0
  434. data/lib/mindbody_public_api/models/upload_client_document_response.rb +71 -0
  435. data/lib/mindbody_public_api/models/upload_client_photo_request.rb +68 -0
  436. data/lib/mindbody_public_api/models/upload_client_photo_response.rb +71 -0
  437. data/lib/mindbody_public_api/models/user.rb +95 -0
  438. data/lib/mindbody_public_api/models/visit.rb +399 -0
  439. data/lib/mindbody_public_api/models/visit_waitlist_info.rb +74 -0
  440. data/lib/mindbody_public_api/models/visit_with_waitlist_info.rb +410 -0
  441. data/lib/mindbody_public_api/models/waitlist_entry.rb +173 -0
  442. data/lib/mindbody_public_api/models/written_class_schedules_info.rb +73 -0
  443. data/lib/mindbody_public_api/utilities/date_time_helper.rb +11 -0
  444. data/lib/mindbody_public_api/utilities/file_wrapper.rb +28 -0
  445. data/lib/mindbody_public_api.rb +495 -0
  446. metadata +529 -0
@@ -0,0 +1,2106 @@
1
+ # mindbody_public_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module MindbodyPublicApi
7
+ # ClientController
8
+ class ClientController < BaseController
9
+ # Please note that client memberships with location restrictions can only be
10
+ # used to pay for scheduled services at the site to which they belong.
11
+ # Memberships with location restrictions can not be used to pay for
12
+ # scheduled services at other sites within an organization.
13
+ # @param [String] version Required parameter: version of the api.
14
+ # @param [String] request_client_id Required parameter: The ID of the client
15
+ # for whom memberships are returned.
16
+ # @param [String] site_id Required parameter: ID of the site from which to
17
+ # pull data.
18
+ # @param [String] authorization Optional parameter: A staff user
19
+ # authorization token.
20
+ # @param [Integer] request_client_associated_sites_offset Optional
21
+ # parameter: Used to retrieve a client’s memberships from multiple sites
22
+ # within an organization when the client is associated with more than ten
23
+ # sites. To change which ten sites are searched, change this offset value. A
24
+ # value of 0 means that no sites are skipped and the first ten sites are
25
+ # returned. You can use the `CrossRegionalClientAssociations` value from
26
+ # `GET CrossRegionalClientAssociations` to determine how many sites the
27
+ # client is associated with. Note that you must always have
28
+ # `CrossRegionalLookup` set to `true` to use this parameter.<br /> Default:
29
+ # **0** For example, if a client is associated with 25 sites, you need to
30
+ # call GET `ActiveClientMemberships` three times, as follows: * Use GET
31
+ # `CrossRegionalClientAssociations` to determine how many sites a client is
32
+ # associated with, which tells you how many additional calls you need to
33
+ # make. * Either omit `ClientAssociatedSitesOffset` or set it to 0 to
34
+ # return the client’s memberships from sites 1-10 * Set
35
+ # `ClientAssociatedSitesOffset` to 10 to return the client’s memberships
36
+ # from sites 11-20 * Set `ClientAssociatedSitesOffset` to 20 to return the
37
+ # client’s memberships from sites 21-25
38
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
39
+ # parameter: Used to retrieve a client’s memberships from multiple sites
40
+ # within an organization. When included and set to `true`, it searches a
41
+ # maximum of ten sites with which this client is associated. When a client
42
+ # is associated with more than ten sites, use `ClientAssociatedSitesOffset`
43
+ # as many times as needed to search the additional sites with which the
44
+ # client is associated. You can use the `CrossRegionalClientAssociations`
45
+ # value from `GET CrossRegionalClientAssociations` to determine how many
46
+ # sites the client is associated with. Note that a `SiteID` is returned and
47
+ # populated in the `ClientServices` response when `CrossRegionalLookup` is
48
+ # set to `true`. Default: **false**
49
+ # @param [Integer] request_limit Optional parameter: Number of results to
50
+ # include, defaults to 100
51
+ # @param [Integer] request_location_id Optional parameter: Filters results
52
+ # to memberships that can be used to pay for scheduled services at that
53
+ # location. This parameter can not be passed when `CrossRegionalLookup` is
54
+ # `true`.
55
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
56
+ # to 0.
57
+ # @param [Integer] request_unique_client_id Optional parameter: The Unique
58
+ # ID of the client for whom memberships are returned. Note that
59
+ # UniqueClientId takes precedence over ClientId if both are provided.
60
+ # @return [GetActiveClientMembershipsResponse] Response from the API call.
61
+ def get_active_client_memberships(version,
62
+ request_client_id,
63
+ site_id,
64
+ authorization: nil,
65
+ request_client_associated_sites_offset: nil,
66
+ request_cross_regional_lookup: nil,
67
+ request_limit: nil,
68
+ request_location_id: nil,
69
+ request_offset: nil,
70
+ request_unique_client_id: nil)
71
+ @api_call
72
+ .request(new_request_builder(HttpMethodEnum::GET,
73
+ '/public/v{version}/client/activeclientmemberships',
74
+ Server::DEFAULT)
75
+ .template_param(new_parameter(version, key: 'version')
76
+ .should_encode(true))
77
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
78
+ .header_param(new_parameter(site_id, key: 'siteId'))
79
+ .header_param(new_parameter(authorization, key: 'authorization'))
80
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
81
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
82
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
83
+ .query_param(new_parameter(request_location_id, key: 'request.locationId'))
84
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
85
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
86
+ .header_param(new_parameter('application/json', key: 'accept'))
87
+ .auth(Single.new('API-Key')))
88
+ .response(new_response_handler
89
+ .deserializer(APIHelper.method(:custom_type_deserializer))
90
+ .deserialize_into(GetActiveClientMembershipsResponse.method(:from_hash)))
91
+ .execute
92
+ end
93
+
94
+ # The endpoint returns a list of memberships for multiple clients we pass in
95
+ # query parameter. Please note that clients memberships with location
96
+ # restrictions can only be used to pay for scheduled services at the site to
97
+ # which they belong. Memberships with location restrictions can not be used
98
+ # to pay for scheduled services at other sites within an organization.
99
+ # @param [String] version Required parameter: version of the api.
100
+ # @param [Array[String]] request_client_ids Required parameter: The ID of
101
+ # the client for whom memberships are returned. Maximum allowed : 200.
102
+ # @param [String] site_id Required parameter: ID of the site from which to
103
+ # pull data.
104
+ # @param [String] authorization Optional parameter: A staff user
105
+ # authorization token.
106
+ # @param [Integer] request_client_associated_sites_offset Optional
107
+ # parameter: Used to retrieve a client’s memberships from multiple sites
108
+ # within an organization when the client is associated with more than ten
109
+ # sites. To change which ten sites are searched, change this offset value. A
110
+ # value of 0 means that no sites are skipped and the first ten sites are
111
+ # returned. You can use the `CrossRegionalClientAssociations` value from
112
+ # `GET CrossRegionalClientAssociations` to determine how many sites the
113
+ # client is associated with. Note that you must always have
114
+ # `CrossRegionalLookup` set to `true` to use this parameter.<br /> Default:
115
+ # **0** For example, if a client is associated with 25 sites, you need to
116
+ # call `GetClientServices` three times, as follows: * Use `GET
117
+ # CrossRegionalClientAssociations` to determine how many sites a client is
118
+ # associated with, which tells you how many additional calls you need to
119
+ # make. * Either omit `ClientAssociatedSitesOffset` or set it to 0 to
120
+ # return the client’s services (pricing options) from sites 1-10. * Set
121
+ # `ClientAssociatedSitesOffset` to 10 to return the client pricing options
122
+ # from sites 11-20 * Set `ClientAssociatedSitesOffset` to 20 to return the
123
+ # client pricing options from sites 21-25
124
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
125
+ # parameter: Used to retrieve a client’s memberships from multiple sites
126
+ # within an organization. When included and set to `true`, it searches a
127
+ # maximum of ten sites with which this client is associated. When a client
128
+ # is associated with more than ten sites, use `ClientAssociatedSitesOffset`
129
+ # as many times as needed to search the additional sites with which the
130
+ # client is associated. You can use the `CrossRegionalClientAssociations`
131
+ # value from `GET CrossRegionalClientAssociations` to determine how many
132
+ # sites the client is associated with. Note that a `SiteID` is returned and
133
+ # populated in the `ClientServices` response when `CrossRegionalLookup` is
134
+ # set to `true`. Default: **false**
135
+ # @param [Integer] request_limit Optional parameter: Number of results to
136
+ # include, defaults to 100
137
+ # @param [Integer] request_location_id Optional parameter: Filters results
138
+ # to memberships that can be used to pay for scheduled services at that
139
+ # location. This parameter can not be passed when `CrossRegionalLookup` is
140
+ # `true`.
141
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
142
+ # to 0.
143
+ # @return [GetActiveClientsMembershipsResponse] Response from the API call.
144
+ def get_active_clients_memberships(version,
145
+ request_client_ids,
146
+ site_id,
147
+ authorization: nil,
148
+ request_client_associated_sites_offset: nil,
149
+ request_cross_regional_lookup: nil,
150
+ request_limit: nil,
151
+ request_location_id: nil,
152
+ request_offset: nil)
153
+ @api_call
154
+ .request(new_request_builder(HttpMethodEnum::GET,
155
+ '/public/v{version}/client/activeclientsmemberships',
156
+ Server::DEFAULT)
157
+ .template_param(new_parameter(version, key: 'version')
158
+ .should_encode(true))
159
+ .query_param(new_parameter(request_client_ids, key: 'request.clientIds'))
160
+ .header_param(new_parameter(site_id, key: 'siteId'))
161
+ .header_param(new_parameter(authorization, key: 'authorization'))
162
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
163
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
164
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
165
+ .query_param(new_parameter(request_location_id, key: 'request.locationId'))
166
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
167
+ .header_param(new_parameter('application/json', key: 'accept'))
168
+ .auth(Single.new('API-Key')))
169
+ .response(new_response_handler
170
+ .deserializer(APIHelper.method(:custom_type_deserializer))
171
+ .deserialize_into(GetActiveClientsMembershipsResponse.method(:from_hash)))
172
+ .execute
173
+ end
174
+
175
+ # Get account balance information for one or more client(s).
176
+ # @param [String] version Required parameter: version of the api.
177
+ # @param [Array[String]] request_client_ids Required parameter: The list of
178
+ # clients IDs for which you want account balances.
179
+ # @param [String] site_id Required parameter: ID of the site from which to
180
+ # pull data.
181
+ # @param [String] authorization Optional parameter: A staff user
182
+ # authorization token.
183
+ # @param [DateTime] request_balance_date Optional parameter: The date you
184
+ # want a balance relative to. Default: **the current date**
185
+ # @param [Integer] request_class_id Optional parameter: The class ID of the
186
+ # event for which you want a balance.
187
+ # @param [Integer] request_limit Optional parameter: Number of results to
188
+ # include, defaults to 100
189
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
190
+ # to 0.
191
+ # @return [GetClientAccountBalancesResponse] Response from the API call.
192
+ def get_client_account_balances(version,
193
+ request_client_ids,
194
+ site_id,
195
+ authorization: nil,
196
+ request_balance_date: nil,
197
+ request_class_id: nil,
198
+ request_limit: nil,
199
+ request_offset: nil)
200
+ @api_call
201
+ .request(new_request_builder(HttpMethodEnum::GET,
202
+ '/public/v{version}/client/clientaccountbalances',
203
+ Server::DEFAULT)
204
+ .template_param(new_parameter(version, key: 'version')
205
+ .should_encode(true))
206
+ .query_param(new_parameter(request_client_ids, key: 'request.clientIds'))
207
+ .header_param(new_parameter(site_id, key: 'siteId'))
208
+ .header_param(new_parameter(authorization, key: 'authorization'))
209
+ .query_param(new_parameter(request_balance_date, key: 'request.balanceDate'))
210
+ .query_param(new_parameter(request_class_id, key: 'request.classId'))
211
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
212
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
213
+ .header_param(new_parameter('application/json', key: 'accept'))
214
+ .auth(Single.new('API-Key')))
215
+ .response(new_response_handler
216
+ .deserializer(APIHelper.method(:custom_type_deserializer))
217
+ .deserialize_into(GetClientAccountBalancesResponse.method(:from_hash)))
218
+ .execute
219
+ end
220
+
221
+ # This endpoint returns complete client information along with list of
222
+ # purchased services, contract details, membership details and arrival
223
+ # programs for a specific client.
224
+ # @param [String] version Required parameter: version of the api.
225
+ # @param [String] request_client_id Required parameter: Filters results to
226
+ # client with these ID.
227
+ # @param [String] site_id Required parameter: ID of the site from which to
228
+ # pull data.
229
+ # @param [String] authorization Optional parameter: A staff user
230
+ # authorization token.
231
+ # @param [String] consumer_identity_token Optional parameter: A consumers
232
+ # authorization token to replace the need of clientId in the request.
233
+ # @param [Integer] request_client_associated_sites_offset Optional
234
+ # parameter: Used to retrieve a client’s pricing options from multiple sites
235
+ # within an organization when the client is associated with more than ten
236
+ # sites. To change which ten sites are searched, change this offset value. A
237
+ # value of 0 means that no sites are skipped and the first ten sites are
238
+ # returned. You can use the `CrossRegionalClientAssociations` value from
239
+ # `GET CrossRegionalClientAssociations` to determine how many sites the
240
+ # client is associated with. Note that you must always have
241
+ # `CrossRegionalLookup` set to `true` to use this parameter.<br /> Default:
242
+ # **0** For example, if a client is associated with 25 sites, you need to
243
+ # call `GetClientServices` three times, as follows: * Use `GET
244
+ # CrossRegionalClientAssociations` to determine how many sites a client is
245
+ # associated with, which tells you how many additional calls you need to
246
+ # make. * Either omit `ClientAssociatedSitesOffset` or set it to 0 to
247
+ # return the client’s services (pricing options) from sites 1-10. * Set
248
+ # `ClientAssociatedSitesOffset` to 10 to return the client pricing options
249
+ # from sites 11-20 * Set `ClientAssociatedSitesOffset` to 20 to return the
250
+ # client pricing options from sites 21-25
251
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
252
+ # parameter: Used to retrieve a clients pricing options from multiple sites
253
+ # within an organization.When included and set to `true`, it searches a
254
+ # maximum of ten sites with which this client is associated.When a client is
255
+ # associated with more than ten sites, use `ClientAssociatedSitesOffset` as
256
+ # many times as needed to search the additional sites with which the client
257
+ # is associated. You can use the `CrossRegionalClientAssociations` value
258
+ # from `GET CrossRegionalClientAssociations` to determine how many sites the
259
+ # client is associated with. Note that a `SiteID` is returned and
260
+ # populated in the `ClientServices` response when `CrossRegionalLookup` is
261
+ # set to `true`. Default: **false**
262
+ # @param [DateTime] request_end_date Optional parameter: Filters results to
263
+ # pricing options that are purchased on or before this date. Default:
264
+ # **today’s date**.
265
+ # @param [TrueClass | FalseClass] request_exclude_inactive_sites Optional
266
+ # parameter: When this flag is set to `true`, will exclude inactive sites
267
+ # from the response Default: **false**
268
+ # @param [Array[String]] request_required_client_data Optional parameter:
269
+ # Used to retrieve list of purchased services, contract details, membership
270
+ # details and arrival programs for a specific client. Default
271
+ # `ClientServices`, `ClientContracts`, `ClientMemberships` and
272
+ # `ClientArrivals` will be returned when `RequiredClientDatais` not set.
273
+ # When `RequiredClientData` is set to `Contracts` then only
274
+ # `ClientContracts` will be returned in the response. When
275
+ # `RequiredClientData` is set to Services then only `ClientServices` will be
276
+ # returned in the response. When `RequiredClientData` is set to
277
+ # `Memberships` then only `ClientMemberships` will be returned in the
278
+ # response. When `RequiredClientData` is set to `ArrivalPrograms` then
279
+ # only `ClientArrivals` will be returned in the response.
280
+ # @param [TrueClass | FalseClass] request_show_active_only Optional
281
+ # parameter: When `true`, includes active services only. Set this field to
282
+ # `true` when trying to determine if a client has a service that can pay
283
+ # for a class or appointment. Default: **false**
284
+ # @param [DateTime] request_start_date Optional parameter: Filters results
285
+ # to pricing options that are purchased on or after this date. Default:
286
+ # **today’s date**.
287
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
288
+ # ID of the client who is viewing this class list.
289
+ # @param [TrueClass | FalseClass] request_use_activate_date Optional
290
+ # parameter: When this flag is set to `true`, the date filtering will use
291
+ # activate date to filter the pricing options. When this flag is set to
292
+ # `false`, the date filtering will use purchase date to filter the pricing
293
+ # options. Default: **false**
294
+ # @return [GetClientCompleteInfoResponse] Response from the API call.
295
+ def get_client_complete_info(version,
296
+ request_client_id,
297
+ site_id,
298
+ authorization: nil,
299
+ consumer_identity_token: nil,
300
+ request_client_associated_sites_offset: nil,
301
+ request_cross_regional_lookup: nil,
302
+ request_end_date: nil,
303
+ request_exclude_inactive_sites: nil,
304
+ request_required_client_data: nil,
305
+ request_show_active_only: nil,
306
+ request_start_date: nil,
307
+ request_unique_client_id: nil,
308
+ request_use_activate_date: nil)
309
+ @api_call
310
+ .request(new_request_builder(HttpMethodEnum::GET,
311
+ '/public/v{version}/client/clientcompleteinfo',
312
+ Server::DEFAULT)
313
+ .template_param(new_parameter(version, key: 'version')
314
+ .should_encode(true))
315
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
316
+ .header_param(new_parameter(site_id, key: 'siteId'))
317
+ .header_param(new_parameter(authorization, key: 'authorization'))
318
+ .header_param(new_parameter(consumer_identity_token, key: 'consumer-identity-token'))
319
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
320
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
321
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
322
+ .query_param(new_parameter(request_exclude_inactive_sites, key: 'request.excludeInactiveSites'))
323
+ .query_param(new_parameter(request_required_client_data, key: 'request.requiredClientData'))
324
+ .query_param(new_parameter(request_show_active_only, key: 'request.showActiveOnly'))
325
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
326
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
327
+ .query_param(new_parameter(request_use_activate_date, key: 'request.useActivateDate'))
328
+ .header_param(new_parameter('application/json', key: 'accept'))
329
+ .auth(Single.new('API-Key')))
330
+ .response(new_response_handler
331
+ .deserializer(APIHelper.method(:custom_type_deserializer))
332
+ .deserialize_into(GetClientCompleteInfoResponse.method(:from_hash)))
333
+ .execute
334
+ end
335
+
336
+ # Get contracts that a client has purchased.
337
+ # @param [String] version Required parameter: version of the api.
338
+ # @param [String] request_client_id Required parameter: The ID of the client
339
+ # (RssId).
340
+ # @param [String] site_id Required parameter: ID of the site from which to
341
+ # pull data.
342
+ # @param [String] authorization Optional parameter: A staff user
343
+ # authorization token.
344
+ # @param [Integer] request_client_associated_sites_offset Optional
345
+ # parameter: Determines how many sites are skipped over when retrieving a
346
+ # client’s cross regional contracts. Used when a client ID is linked to more
347
+ # than ten sites in an organization. Only a maximum of ten site databases
348
+ # are queried when this call is made and `CrossRegionalLookup` is set to
349
+ # `true`. To change which sites are queried, change this offset value.
350
+ # Default: **0**
351
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
352
+ # parameter: When `true`, indicates that the requesting client’s cross
353
+ # regional contracts are returned, if any.<br /> When `false`, indicates
354
+ # that cross regional contracts are not returned.
355
+ # @param [Integer] request_limit Optional parameter: Number of results to
356
+ # include, defaults to 100
357
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
358
+ # to 0.
359
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
360
+ # ID of the requested client.
361
+ # @return [GetClientContractsResponse] Response from the API call.
362
+ def get_client_contracts(version,
363
+ request_client_id,
364
+ site_id,
365
+ authorization: nil,
366
+ request_client_associated_sites_offset: nil,
367
+ request_cross_regional_lookup: nil,
368
+ request_limit: nil,
369
+ request_offset: nil,
370
+ request_unique_client_id: nil)
371
+ @api_call
372
+ .request(new_request_builder(HttpMethodEnum::GET,
373
+ '/public/v{version}/client/clientcontracts',
374
+ Server::DEFAULT)
375
+ .template_param(new_parameter(version, key: 'version')
376
+ .should_encode(true))
377
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
378
+ .header_param(new_parameter(site_id, key: 'siteId'))
379
+ .header_param(new_parameter(authorization, key: 'authorization'))
380
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
381
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
382
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
383
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
384
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
385
+ .header_param(new_parameter('application/json', key: 'accept'))
386
+ .auth(Single.new('API-Key')))
387
+ .response(new_response_handler
388
+ .deserializer(APIHelper.method(:custom_type_deserializer))
389
+ .deserialize_into(GetClientContractsResponse.method(:from_hash)))
390
+ .execute
391
+ end
392
+
393
+ # This endpoint returns direct debit info stored on a client's account. This
394
+ # endpoint requires staff user credentials.
395
+ #
396
+ # A null response from this endpoint indicates that the client has no usable
397
+ # direct debit information on their account.Use the POST
398
+ # AddClientDirectDebitInfo endpoint to add direct debit information to a
399
+ # client’s account.
400
+ # @param [String] version Required parameter: version of the api.
401
+ # @param [String] site_id Required parameter: ID of the site from which to
402
+ # pull data.
403
+ # @param [String] authorization Optional parameter: A staff user
404
+ # authorization token.
405
+ # @param [String] client_id Optional parameter: The ID of the client.
406
+ # @return [DirectDebitInfo] Response from the API call.
407
+ def get_direct_debit_info(version,
408
+ site_id,
409
+ authorization: nil,
410
+ client_id: nil)
411
+ @api_call
412
+ .request(new_request_builder(HttpMethodEnum::GET,
413
+ '/public/v{version}/client/clientdirectdebitinfo',
414
+ Server::DEFAULT)
415
+ .template_param(new_parameter(version, key: 'version')
416
+ .should_encode(true))
417
+ .header_param(new_parameter(site_id, key: 'siteId'))
418
+ .header_param(new_parameter(authorization, key: 'authorization'))
419
+ .query_param(new_parameter(client_id, key: 'clientId'))
420
+ .header_param(new_parameter('application/json', key: 'accept'))
421
+ .auth(Single.new('API-Key')))
422
+ .response(new_response_handler
423
+ .deserializer(APIHelper.method(:custom_type_deserializer))
424
+ .deserialize_into(DirectDebitInfo.method(:from_hash)))
425
+ .execute
426
+ end
427
+
428
+ # This endpoint deletes direct debit info from a client’s account. This
429
+ # endpoint requires staff user credentials.
430
+ # @param [String] version Required parameter: version of the api.
431
+ # @param [String] site_id Required parameter: ID of the site from which to
432
+ # pull data.
433
+ # @param [String] authorization Optional parameter: A staff user
434
+ # authorization token.
435
+ # @param [String] client_id Optional parameter: The ID of the client.
436
+ # @return [Object] Response from the API call.
437
+ def delete_direct_debit_info(version,
438
+ site_id,
439
+ authorization: nil,
440
+ client_id: nil)
441
+ @api_call
442
+ .request(new_request_builder(HttpMethodEnum::DELETE,
443
+ '/public/v{version}/client/clientdirectdebitinfo',
444
+ Server::DEFAULT)
445
+ .template_param(new_parameter(version, key: 'version')
446
+ .should_encode(true))
447
+ .header_param(new_parameter(site_id, key: 'siteId'))
448
+ .header_param(new_parameter(authorization, key: 'authorization'))
449
+ .query_param(new_parameter(client_id, key: 'clientId'))
450
+ .header_param(new_parameter('application/json', key: 'accept'))
451
+ .auth(Single.new('API-Key')))
452
+ .response(new_response_handler
453
+ .deserializer(APIHelper.method(:json_deserialize)))
454
+ .execute
455
+ end
456
+
457
+ # This endpoint gets client records that would be considered duplicates
458
+ # based on case-insensitive matching of the client's first name, last name,
459
+ # and email. For there to be results, all three parameters must match a
460
+ # client record. This endpoint requires staff user credentials.
461
+ #
462
+ # An empty `ClientDuplicates` object in the response from this endpoint
463
+ # indicates that there were no client records found that match the first
464
+ # name, last name, and email fields passed in.
465
+ #
466
+ # If one client record is returned, it is not a duplicate itself, but no
467
+ # other client record can be created or updated that would match this
468
+ # client's first name, last name, and email combination.
469
+ #
470
+ # If more than one client record is returned, these clients are duplicates
471
+ # of each other.We recommend discussing with the business how they would
472
+ # like to resolve duplicate records in the event the response contains more
473
+ # than one client record.Businesses can use the Merge Duplicate Clients tool
474
+ # in the Core Business Mode software to resolve the duplicate client
475
+ # records.
476
+ # @param [String] version Required parameter: version of the api.
477
+ # @param [String] site_id Required parameter: ID of the site from which to
478
+ # pull data.
479
+ # @param [String] authorization Optional parameter: A staff user
480
+ # authorization token.
481
+ # @param [String] request_email Optional parameter: The client email to
482
+ # match on when searching for duplicates.
483
+ # @param [String] request_first_name Optional parameter: The client first
484
+ # name to match on when searching for duplicates.
485
+ # @param [String] request_last_name Optional parameter: The client last name
486
+ # to match on when searching for duplicates.
487
+ # @param [Integer] request_limit Optional parameter: Number of results to
488
+ # include, defaults to 100
489
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
490
+ # to 0.
491
+ # @return [GetClientDuplicatesResponse] Response from the API call.
492
+ def get_client_duplicates(version,
493
+ site_id,
494
+ authorization: nil,
495
+ request_email: nil,
496
+ request_first_name: nil,
497
+ request_last_name: nil,
498
+ request_limit: nil,
499
+ request_offset: nil)
500
+ @api_call
501
+ .request(new_request_builder(HttpMethodEnum::GET,
502
+ '/public/v{version}/client/clientduplicates',
503
+ Server::DEFAULT)
504
+ .template_param(new_parameter(version, key: 'version')
505
+ .should_encode(true))
506
+ .header_param(new_parameter(site_id, key: 'siteId'))
507
+ .header_param(new_parameter(authorization, key: 'authorization'))
508
+ .query_param(new_parameter(request_email, key: 'request.email'))
509
+ .query_param(new_parameter(request_first_name, key: 'request.firstName'))
510
+ .query_param(new_parameter(request_last_name, key: 'request.lastName'))
511
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
512
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
513
+ .header_param(new_parameter('application/json', key: 'accept'))
514
+ .auth(Single.new('API-Key')))
515
+ .response(new_response_handler
516
+ .deserializer(APIHelper.method(:custom_type_deserializer))
517
+ .deserialize_into(GetClientDuplicatesResponse.method(:from_hash)))
518
+ .execute
519
+ end
520
+
521
+ # ***QueryParams***: Enables to retrieve cross regional formula notes for a
522
+ # client, or for a specific appointment. The two parameters are optional,
523
+ # however at least one must be provided. This endpoint supports pagination.
524
+ # @param [String] version Required parameter: version of the api.
525
+ # @param [String] site_id Required parameter: ID of the site from which to
526
+ # pull data.
527
+ # @param [String] authorization Optional parameter: A staff user
528
+ # authorization token.
529
+ # @param [Integer] request_appointment_id Optional parameter: The
530
+ # appointment ID of an appointment in the studio specified in the header of
531
+ # the request.
532
+ # @param [String] request_client_id Optional parameter: The client ID of the
533
+ # client whose formula notes are being requested.
534
+ # @param [Integer] request_limit Optional parameter: Number of results to
535
+ # include, defaults to 100
536
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
537
+ # to 0.
538
+ # @return [GetClientFormulaNotesResponse] Response from the API call.
539
+ def get_client_formula_notes(version,
540
+ site_id,
541
+ authorization: nil,
542
+ request_appointment_id: nil,
543
+ request_client_id: nil,
544
+ request_limit: nil,
545
+ request_offset: nil)
546
+ @api_call
547
+ .request(new_request_builder(HttpMethodEnum::GET,
548
+ '/public/v{version}/client/clientformulanotes',
549
+ Server::DEFAULT)
550
+ .template_param(new_parameter(version, key: 'version')
551
+ .should_encode(true))
552
+ .header_param(new_parameter(site_id, key: 'siteId'))
553
+ .header_param(new_parameter(authorization, key: 'authorization'))
554
+ .query_param(new_parameter(request_appointment_id, key: 'request.appointmentId'))
555
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
556
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
557
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
558
+ .header_param(new_parameter('application/json', key: 'accept'))
559
+ .auth(Single.new('API-Key')))
560
+ .response(new_response_handler
561
+ .deserializer(APIHelper.method(:custom_type_deserializer))
562
+ .deserialize_into(GetClientFormulaNotesResponse.method(:from_hash)))
563
+ .execute
564
+ end
565
+
566
+ # Client indexes are used to analyze client demographics. A business owner
567
+ # can set up different categories with sets of values which they can assign
568
+ # to each client. Client indexes are used in client searches, for tagging
569
+ # clients so that the owner can send mass emails to similar groups, and for
570
+ # many reports.
571
+ # For more information, see Client Indexes and [Client Index Values (video
572
+ # tutorial)](https://support.mindbodyonline.com/s/article/203261653-Client-i
573
+ # ndexes-and-client-index-values-video-tutorial?language=en_USclient).
574
+ # @param [String] version Required parameter: version of the api.
575
+ # @param [String] site_id Required parameter: ID of the site from which to
576
+ # pull data.
577
+ # @param [String] authorization Optional parameter: A staff user
578
+ # authorization token.
579
+ # @param [TrueClass | FalseClass] request_required_only Optional parameter:
580
+ # When `true`, filters the results to only indexes that are required on
581
+ # creation.<br /> When `false` or omitted, returns all of the client
582
+ # indexes.
583
+ # @return [GetClientIndexesResponse] Response from the API call.
584
+ def get_client_indexes(version,
585
+ site_id,
586
+ authorization: nil,
587
+ request_required_only: nil)
588
+ @api_call
589
+ .request(new_request_builder(HttpMethodEnum::GET,
590
+ '/public/v{version}/client/clientindexes',
591
+ Server::DEFAULT)
592
+ .template_param(new_parameter(version, key: 'version')
593
+ .should_encode(true))
594
+ .header_param(new_parameter(site_id, key: 'siteId'))
595
+ .header_param(new_parameter(authorization, key: 'authorization'))
596
+ .query_param(new_parameter(request_required_only, key: 'request.requiredOnly'))
597
+ .header_param(new_parameter('application/json', key: 'accept'))
598
+ .auth(Single.new('API-Key')))
599
+ .response(new_response_handler
600
+ .deserializer(APIHelper.method(:custom_type_deserializer))
601
+ .deserialize_into(GetClientIndexesResponse.method(:from_hash)))
602
+ .execute
603
+ end
604
+
605
+ # Gets a list of purchases made by a specific client.
606
+ # @param [String] version Required parameter: version of the api.
607
+ # @param [String] request_client_id Required parameter: The ID of the client
608
+ # you are querying for purchases.
609
+ # @param [String] site_id Required parameter: ID of the site from which to
610
+ # pull data.
611
+ # @param [String] authorization Optional parameter: A staff user
612
+ # authorization token.
613
+ # @param [DateTime] request_end_date Optional parameter: Filters results to
614
+ # purchases made before this timestamp.<br /> Default: **end of today**
615
+ # @param [Integer] request_limit Optional parameter: Number of results to
616
+ # include, defaults to 100
617
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
618
+ # to 0.
619
+ # @param [Integer] request_sale_id Optional parameter: Filters results to
620
+ # the single record associated with this ID.
621
+ # @param [DateTime] request_start_date Optional parameter: Filters results
622
+ # to purchases made on or after this timestamp.<br /> Default: **now**
623
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
624
+ # ID of the requested client.
625
+ # @return [GetClientPurchasesResponse] Response from the API call.
626
+ def get_client_purchases(version,
627
+ request_client_id,
628
+ site_id,
629
+ authorization: nil,
630
+ request_end_date: nil,
631
+ request_limit: nil,
632
+ request_offset: nil,
633
+ request_sale_id: nil,
634
+ request_start_date: nil,
635
+ request_unique_client_id: nil)
636
+ @api_call
637
+ .request(new_request_builder(HttpMethodEnum::GET,
638
+ '/public/v{version}/client/clientpurchases',
639
+ Server::DEFAULT)
640
+ .template_param(new_parameter(version, key: 'version')
641
+ .should_encode(true))
642
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
643
+ .header_param(new_parameter(site_id, key: 'siteId'))
644
+ .header_param(new_parameter(authorization, key: 'authorization'))
645
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
646
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
647
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
648
+ .query_param(new_parameter(request_sale_id, key: 'request.saleId'))
649
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
650
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
651
+ .header_param(new_parameter('application/json', key: 'accept'))
652
+ .auth(Single.new('API-Key')))
653
+ .response(new_response_handler
654
+ .deserializer(APIHelper.method(:custom_type_deserializer))
655
+ .deserialize_into(GetClientPurchasesResponse.method(:from_hash)))
656
+ .execute
657
+ end
658
+
659
+ # Gets a list of referral types. Referral types are options that new clients
660
+ # can choose to identify how they learned about the business. Referral types
661
+ # are typically used for the sign-up process.
662
+ # @param [String] version Required parameter: version of the api.
663
+ # @param [String] site_id Required parameter: ID of the site from which to
664
+ # pull data.
665
+ # @param [String] authorization Optional parameter: A staff user
666
+ # authorization token.
667
+ # @param [TrueClass | FalseClass] request_include_inactive Optional
668
+ # parameter: When `true`, filters the results to include subtypes and
669
+ # inactive referral types.<br /> When `false`, includes no subtypes and
670
+ # only active types. Default:**false**
671
+ # @return [GetClientReferralTypesResponse] Response from the API call.
672
+ def get_client_referral_types(version,
673
+ site_id,
674
+ authorization: nil,
675
+ request_include_inactive: nil)
676
+ @api_call
677
+ .request(new_request_builder(HttpMethodEnum::GET,
678
+ '/public/v{version}/client/clientreferraltypes',
679
+ Server::DEFAULT)
680
+ .template_param(new_parameter(version, key: 'version')
681
+ .should_encode(true))
682
+ .header_param(new_parameter(site_id, key: 'siteId'))
683
+ .header_param(new_parameter(authorization, key: 'authorization'))
684
+ .query_param(new_parameter(request_include_inactive, key: 'request.includeInactive'))
685
+ .header_param(new_parameter('application/json', key: 'accept'))
686
+ .auth(Single.new('API-Key')))
687
+ .response(new_response_handler
688
+ .deserializer(APIHelper.method(:custom_type_deserializer))
689
+ .deserialize_into(GetClientReferralTypesResponse.method(:from_hash)))
690
+ .execute
691
+ end
692
+
693
+ # Gets the client rewards.
694
+ # @param [String] version Required parameter: version of the api.
695
+ # @param [String] request_client_id Required parameter: The ID of the
696
+ # client.
697
+ # @param [String] site_id Required parameter: ID of the site from which to
698
+ # pull data.
699
+ # @param [String] authorization Optional parameter: A staff user
700
+ # authorization token.
701
+ # @param [DateTime] request_end_date Optional parameter: The end date of
702
+ # transaction. Default: **StartDate**
703
+ # @param [Integer] request_limit Optional parameter: Number of results to
704
+ # include, defaults to 100
705
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
706
+ # to 0.
707
+ # @param [DateTime] request_start_date Optional parameter: The start date of
708
+ # transaction. Default: **today**
709
+ # @return [GetClientRewardsResponse] Response from the API call.
710
+ def get_client_rewards(version,
711
+ request_client_id,
712
+ site_id,
713
+ authorization: nil,
714
+ request_end_date: nil,
715
+ request_limit: nil,
716
+ request_offset: nil,
717
+ request_start_date: nil)
718
+ @api_call
719
+ .request(new_request_builder(HttpMethodEnum::GET,
720
+ '/public/v{version}/client/clientrewards',
721
+ Server::DEFAULT)
722
+ .template_param(new_parameter(version, key: 'version')
723
+ .should_encode(true))
724
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
725
+ .header_param(new_parameter(site_id, key: 'siteId'))
726
+ .header_param(new_parameter(authorization, key: 'authorization'))
727
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
728
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
729
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
730
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
731
+ .header_param(new_parameter('application/json', key: 'accept'))
732
+ .auth(Single.new('API-Key')))
733
+ .response(new_response_handler
734
+ .deserializer(APIHelper.method(:custom_type_deserializer))
735
+ .deserialize_into(GetClientRewardsResponse.method(:from_hash)))
736
+ .execute
737
+ end
738
+
739
+ # Earns or redeems rewards points for a given client, based on site
740
+ # settings. Cross regional rewards are not supported at this time.
741
+ # @param [String] version Required parameter: version of the api.
742
+ # @param [UpdateClientRewardsRequest] request Required parameter: TODO: type
743
+ # description here
744
+ # @param [String] site_id Required parameter: ID of the site from which to
745
+ # pull data.
746
+ # @param [String] authorization Optional parameter: A staff user
747
+ # authorization token.
748
+ # @return [GetClientRewardsResponse] Response from the API call.
749
+ def update_client_rewards(version,
750
+ request,
751
+ site_id,
752
+ authorization: nil)
753
+ @api_call
754
+ .request(new_request_builder(HttpMethodEnum::POST,
755
+ '/public/v{version}/client/clientrewards',
756
+ Server::DEFAULT)
757
+ .template_param(new_parameter(version, key: 'version')
758
+ .should_encode(true))
759
+ .body_param(new_parameter(request))
760
+ .header_param(new_parameter(site_id, key: 'siteId'))
761
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
762
+ .header_param(new_parameter(authorization, key: 'authorization'))
763
+ .header_param(new_parameter('application/json', key: 'accept'))
764
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
765
+ .auth(Single.new('API-Key')))
766
+ .response(new_response_handler
767
+ .deserializer(APIHelper.method(:custom_type_deserializer))
768
+ .deserialize_into(GetClientRewardsResponse.method(:from_hash)))
769
+ .execute
770
+ end
771
+
772
+ # This endpoint requires staff user credentials. This endpoint supports
773
+ # pagination. See Pagination for a description of the Pagination
774
+ # information.
775
+ # @param [String] version Required parameter: version of the api.
776
+ # @param [String] site_id Required parameter: ID of the site from which to
777
+ # pull data.
778
+ # @param [String] authorization Optional parameter: A staff user
779
+ # authorization token.
780
+ # @param [Array[String]] request_client_i_ds Optional parameter: The
781
+ # requested client IDs. Default: **all IDs** that the authenticated user’s
782
+ # access level allows.<br /> Note: You can fetch information for maximum 20
783
+ # clients at once.
784
+ # @param [TrueClass | FalseClass] request_include_inactive Optional
785
+ # parameter: When `true`, indicates the results to include active and
786
+ # inactive clients.<br /> When `false`, indicates that only those clients
787
+ # who are marked as active should be returned. Default: **false**
788
+ # @param [TrueClass | FalseClass] request_is_prospect Optional parameter:
789
+ # When `true`, filters the results to include only those clients marked as
790
+ # prospects for the business.<br /> When `false`, indicates that only those
791
+ # clients who are not marked prospects should be returned.
792
+ # @param [DateTime] request_last_modified_date Optional parameter: Filters
793
+ # the results to include only the clients that have been modified on or
794
+ # after this date.
795
+ # @param [Integer] request_limit Optional parameter: Number of results to
796
+ # include, defaults to 100
797
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
798
+ # to 0.
799
+ # @param [String] request_search_text Optional parameter: Text to use in the
800
+ # search. Can include FirstName, LastName, and Email. Note that user
801
+ # credentials must be provided.
802
+ # @param [Array[Integer]] request_unique_ids Optional parameter: Filters
803
+ # results to clients with these `UniqueIDs`. This parameter cannot be used
804
+ # with `ClientIDs` or `SearchText`. Default: **all UniqueIDs** that the
805
+ # authenticated user’s access level allows.
806
+ # @return [GetClientsResponse] Response from the API call.
807
+ def get_clients(version,
808
+ site_id,
809
+ authorization: nil,
810
+ request_client_i_ds: nil,
811
+ request_include_inactive: nil,
812
+ request_is_prospect: nil,
813
+ request_last_modified_date: nil,
814
+ request_limit: nil,
815
+ request_offset: nil,
816
+ request_search_text: nil,
817
+ request_unique_ids: nil)
818
+ @api_call
819
+ .request(new_request_builder(HttpMethodEnum::GET,
820
+ '/public/v{version}/client/clients',
821
+ Server::DEFAULT)
822
+ .template_param(new_parameter(version, key: 'version')
823
+ .should_encode(true))
824
+ .header_param(new_parameter(site_id, key: 'siteId'))
825
+ .header_param(new_parameter(authorization, key: 'authorization'))
826
+ .query_param(new_parameter(request_client_i_ds, key: 'request.clientIDs'))
827
+ .query_param(new_parameter(request_include_inactive, key: 'request.includeInactive'))
828
+ .query_param(new_parameter(request_is_prospect, key: 'request.isProspect'))
829
+ .query_param(new_parameter(request_last_modified_date, key: 'request.lastModifiedDate'))
830
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
831
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
832
+ .query_param(new_parameter(request_search_text, key: 'request.searchText'))
833
+ .query_param(new_parameter(request_unique_ids, key: 'request.uniqueIds'))
834
+ .header_param(new_parameter('application/json', key: 'accept'))
835
+ .auth(Single.new('API-Key')))
836
+ .response(new_response_handler
837
+ .deserializer(APIHelper.method(:custom_type_deserializer))
838
+ .deserialize_into(GetClientsResponse.method(:from_hash)))
839
+ .execute
840
+ end
841
+
842
+ # This endpoint can be utilized to retrieve scheduled visits which is
843
+ # associated with the requested client.
844
+ # @param [String] version Required parameter: version of the api.
845
+ # @param [String] site_id Required parameter: ID of the site from which to
846
+ # pull data.
847
+ # @param [String] authorization Optional parameter: A staff user
848
+ # authorization token.
849
+ # @param [Integer] request_client_associated_sites_offset Optional
850
+ # parameter: The number of sites to skip when returning the site associated
851
+ # with a client.
852
+ # @param [String] request_client_id Optional parameter: The ID of the
853
+ # requested client.
854
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
855
+ # parameter: When `true`, indicates that past and scheduled client visits
856
+ # across all sites in the region are returned. When `false`, indicates that
857
+ # only visits at the current site are returned.
858
+ # @param [DateTime] request_end_date Optional parameter: The date past which
859
+ # class visits are not returned. Default is today’s date
860
+ # @param [TrueClass | FalseClass] request_include_waitlist_entries Optional
861
+ # parameter: When `true`, waitlist entries are included in the response.
862
+ # When `false`, waitlist entries are removed from the response. Default:
863
+ # **false**
864
+ # @param [Integer] request_limit Optional parameter: Number of results to
865
+ # include, defaults to 100
866
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
867
+ # to 0.
868
+ # @param [DateTime] request_start_date Optional parameter: The date before
869
+ # which class visits are not returned. Default is the end date
870
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
871
+ # ID of the requested client. Note: you need to provide the
872
+ # 'UniqueClientId' OR the 'ClientId'. If both are provided, the
873
+ # 'UniqueClientId' takes precedence.
874
+ # @return [GetClientScheduleResponse] Response from the API call.
875
+ def get_client_schedule(version,
876
+ site_id,
877
+ authorization: nil,
878
+ request_client_associated_sites_offset: nil,
879
+ request_client_id: nil,
880
+ request_cross_regional_lookup: nil,
881
+ request_end_date: nil,
882
+ request_include_waitlist_entries: nil,
883
+ request_limit: nil,
884
+ request_offset: nil,
885
+ request_start_date: nil,
886
+ request_unique_client_id: nil)
887
+ @api_call
888
+ .request(new_request_builder(HttpMethodEnum::GET,
889
+ '/public/v{version}/client/clientschedule',
890
+ Server::DEFAULT)
891
+ .template_param(new_parameter(version, key: 'version')
892
+ .should_encode(true))
893
+ .header_param(new_parameter(site_id, key: 'siteId'))
894
+ .header_param(new_parameter(authorization, key: 'authorization'))
895
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
896
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
897
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
898
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
899
+ .query_param(new_parameter(request_include_waitlist_entries, key: 'request.includeWaitlistEntries'))
900
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
901
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
902
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
903
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
904
+ .header_param(new_parameter('application/json', key: 'accept'))
905
+ .auth(Single.new('API-Key')))
906
+ .response(new_response_handler
907
+ .deserializer(APIHelper.method(:custom_type_deserializer))
908
+ .deserialize_into(GetClientScheduleResponse.method(:from_hash)))
909
+ .execute
910
+ end
911
+
912
+ # Get pricing options that a client has purchased.
913
+ # @param [String] version Required parameter: version of the api.
914
+ # @param [String] site_id Required parameter: ID of the site from which to
915
+ # pull data.
916
+ # @param [String] authorization Optional parameter: A staff user
917
+ # authorization token.
918
+ # @param [Integer] request_class_id Optional parameter: Filters results to
919
+ # only those pricing options that can be used to pay for this class.
920
+ # @param [Array[Integer]] request_class_schedule_id Optional parameter:
921
+ # Filters results to pricing options which are associated with one of the
922
+ # ClassScheduleIDs
923
+ # @param [Integer] request_client_associated_sites_offset Optional
924
+ # parameter: Used to retrieve a client’s pricing options from multiple sites
925
+ # within an organization when the client is associated with more than ten
926
+ # sites. To change which ten sites are searched, change this offset value. A
927
+ # value of 0 means that no sites are skipped and the first ten sites are
928
+ # returned. You can use the `CrossRegionalClientAssociations` value from
929
+ # `GET CrossRegionalClientAssociations` to determine how many sites the
930
+ # client is associated with. Note that you must always have
931
+ # `CrossRegionalLookup` set to `true` to use this parameter.<br /> Default:
932
+ # **0** For example, if a client is associated with 25 sites, you need to
933
+ # call `GetClientServices` three times, as follows: * Use `GET
934
+ # CrossRegionalClientAssociations` to determine how many sites a client is
935
+ # associated with, which tells you how many additional calls you need to
936
+ # make. * Either omit `ClientAssociatedSitesOffset` or set it to 0 to
937
+ # return the client’s services (pricing options) from sites 1-10. * Set
938
+ # `ClientAssociatedSitesOffset` to 10 to return the client pricing options
939
+ # from sites 11-20 * Set `ClientAssociatedSitesOffset` to 20 to return the
940
+ # client pricing options from sites 21-25
941
+ # @param [String] request_client_id Optional parameter: The ID of the client
942
+ # to query. The results are a list of pricing options that the client has
943
+ # purchased. Note that “service” and “pricing option” are synonymous in this
944
+ # section of the documentation.
945
+ # @param [Array[String]] request_client_ids Optional parameter: The IDs of
946
+ # the clients to query. The results are a list of pricing options that the
947
+ # clients have purchased. ClientId parameter takes priority over ClientIds
948
+ # due to backward compatibility. So if you want to use ClientIds, then
949
+ # ClientId needs to be empty. Either of ClientId or ClientIds need to be
950
+ # specified
951
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
952
+ # parameter: Used to retrieve a client’s pricing options from multiple sites
953
+ # within an organization. When included and set to `true`, it searches a
954
+ # maximum of ten sites with which this client is associated. When a client
955
+ # is associated with more than ten sites, use `ClientAssociatedSitesOffset`
956
+ # as many times as needed to search the additional sites with which the
957
+ # client is associated. You can use the `CrossRegionalClientAssociations`
958
+ # value from `GET CrossRegionalClientAssociations` to determine how many
959
+ # sites the client is associated with. Note that a `SiteID` is returned and
960
+ # populated in the `ClientServices` response when `CrossRegionalLookup` is
961
+ # set to `true`. Default: **false**
962
+ # @param [DateTime] request_end_date Optional parameter: Filters results to
963
+ # pricing options that are purchased on or before this date. Default:
964
+ # **today’s date**
965
+ # @param [TrueClass | FalseClass] request_exclude_inactive_sites Optional
966
+ # parameter: When this flag is set to `true`, will exclude inactive sites
967
+ # from the response. Default: **false**
968
+ # @param [TrueClass | FalseClass] request_ignore_cross_regional_site_limit
969
+ # Optional parameter: Used to specify if the number of cross regional sites
970
+ # used to search for client’s pricing options should be ignored. Default:
971
+ # **false**
972
+ # @param [Integer] request_limit Optional parameter: Number of results to
973
+ # include, defaults to 100
974
+ # @param [Array[Integer]] request_location_ids Optional parameter: Filters
975
+ # results to pricing options that can be used at the listed location IDs.
976
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
977
+ # to 0.
978
+ # @param [Array[Integer]] request_program_ids Optional parameter: Filters
979
+ # results to pricing options that belong to one of the given program IDs.
980
+ # @param [Integer] request_session_type_id Optional parameter: Filters
981
+ # results to pricing options that will pay for the given session type ID.
982
+ # Use this to find pricing options that will pay for a specific appointment
983
+ # type.
984
+ # @param [TrueClass | FalseClass] request_show_active_only Optional
985
+ # parameter: When `true`, includes active services only. Default:
986
+ # **false**
987
+ # @param [DateTime] request_start_date Optional parameter: Filters results
988
+ # to pricing options that are purchased on or after this date. Default:
989
+ # **today’s date**
990
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
991
+ # ID of the client to query. Note that UniqueClientId takes precedence over
992
+ # ClientId.
993
+ # @param [Array[Integer]] request_unique_client_ids Optional parameter: The
994
+ # Unique IDs of the clients to query. Note that UniqueClientIds collection
995
+ # takes precedence over ClientIds collection.
996
+ # @param [TrueClass | FalseClass] request_use_activate_date Optional
997
+ # parameter: When this flag is set to `true`, the date filtering will use
998
+ # activate date to filter the pricing options. When this flag is set to
999
+ # `false`, the date filtering will use purchase date to filter the pricing
1000
+ # options. Default: **false**
1001
+ # @param [Integer] request_visit_count Optional parameter: A filter on the
1002
+ # minimum number of visits a service can pay for.
1003
+ # @return [GetClientServicesResponse] Response from the API call.
1004
+ def get_client_services(version,
1005
+ site_id,
1006
+ authorization: nil,
1007
+ request_class_id: nil,
1008
+ request_class_schedule_id: nil,
1009
+ request_client_associated_sites_offset: nil,
1010
+ request_client_id: nil,
1011
+ request_client_ids: nil,
1012
+ request_cross_regional_lookup: nil,
1013
+ request_end_date: nil,
1014
+ request_exclude_inactive_sites: nil,
1015
+ request_ignore_cross_regional_site_limit: nil,
1016
+ request_limit: nil,
1017
+ request_location_ids: nil,
1018
+ request_offset: nil,
1019
+ request_program_ids: nil,
1020
+ request_session_type_id: nil,
1021
+ request_show_active_only: nil,
1022
+ request_start_date: nil,
1023
+ request_unique_client_id: nil,
1024
+ request_unique_client_ids: nil,
1025
+ request_use_activate_date: nil,
1026
+ request_visit_count: nil)
1027
+ @api_call
1028
+ .request(new_request_builder(HttpMethodEnum::GET,
1029
+ '/public/v{version}/client/clientservices',
1030
+ Server::DEFAULT)
1031
+ .template_param(new_parameter(version, key: 'version')
1032
+ .should_encode(true))
1033
+ .header_param(new_parameter(site_id, key: 'siteId'))
1034
+ .header_param(new_parameter(authorization, key: 'authorization'))
1035
+ .query_param(new_parameter(request_class_id, key: 'request.classId'))
1036
+ .query_param(new_parameter(request_class_schedule_id, key: 'request.classScheduleID'))
1037
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
1038
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
1039
+ .query_param(new_parameter(request_client_ids, key: 'request.clientIds'))
1040
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
1041
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
1042
+ .query_param(new_parameter(request_exclude_inactive_sites, key: 'request.excludeInactiveSites'))
1043
+ .query_param(new_parameter(request_ignore_cross_regional_site_limit, key: 'request.ignoreCrossRegionalSiteLimit'))
1044
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1045
+ .query_param(new_parameter(request_location_ids, key: 'request.locationIds'))
1046
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1047
+ .query_param(new_parameter(request_program_ids, key: 'request.programIds'))
1048
+ .query_param(new_parameter(request_session_type_id, key: 'request.sessionTypeId'))
1049
+ .query_param(new_parameter(request_show_active_only, key: 'request.showActiveOnly'))
1050
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
1051
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
1052
+ .query_param(new_parameter(request_unique_client_ids, key: 'request.uniqueClientIds'))
1053
+ .query_param(new_parameter(request_use_activate_date, key: 'request.useActivateDate'))
1054
+ .query_param(new_parameter(request_visit_count, key: 'request.visitCount'))
1055
+ .header_param(new_parameter('application/json', key: 'accept'))
1056
+ .auth(Single.new('API-Key')))
1057
+ .response(new_response_handler
1058
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1059
+ .deserialize_into(GetClientServicesResponse.method(:from_hash)))
1060
+ .execute
1061
+ end
1062
+
1063
+ # Gets the Client Visits for a specific client.
1064
+ # @param [String] version Required parameter: version of the api.
1065
+ # @param [String] site_id Required parameter: ID of the site from which to
1066
+ # pull data.
1067
+ # @param [String] authorization Optional parameter: A staff user
1068
+ # authorization token.
1069
+ # @param [Integer] request_client_associated_sites_offset Optional
1070
+ # parameter: The number of sites to skip when returning the site associated
1071
+ # with a client.
1072
+ # @param [String] request_client_id Optional parameter: The ID of the
1073
+ # requested client.
1074
+ # @param [TrueClass | FalseClass] request_cross_regional_lookup Optional
1075
+ # parameter: When `true`, indicates that past and scheduled client visits
1076
+ # across all sites in the region are returned.<br /> When `false`,
1077
+ # indicates that only visits at the current site are returned.
1078
+ # @param [DateTime] request_end_date Optional parameter: The date past which
1079
+ # class visits are not returned. Default: **today's date**
1080
+ # @param [Integer] request_limit Optional parameter: Number of results to
1081
+ # include, defaults to 100
1082
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
1083
+ # to 0.
1084
+ # @param [DateTime] request_start_date Optional parameter: The date before
1085
+ # which class visits are not returned. Default: **the end date**
1086
+ # @param [Integer] request_unique_client_id Optional parameter: The unique
1087
+ # ID of the requested client. Note: you need to provide the
1088
+ # 'UniqueClientId' OR the 'ClientId'. If both are provided, the
1089
+ # 'UniqueClientId' takes precedence.
1090
+ # @param [TrueClass | FalseClass] request_unpaids_only Optional parameter:
1091
+ # When `true`, indicates that only visits that have not been paid for are
1092
+ # returned.<br /> When `false`, indicates that all visits are returned,
1093
+ # regardless of whether they have been paid for.<br /> Default: **false**
1094
+ # @return [GetClientVisitsResponse] Response from the API call.
1095
+ def get_client_visits(version,
1096
+ site_id,
1097
+ authorization: nil,
1098
+ request_client_associated_sites_offset: nil,
1099
+ request_client_id: nil,
1100
+ request_cross_regional_lookup: nil,
1101
+ request_end_date: nil,
1102
+ request_limit: nil,
1103
+ request_offset: nil,
1104
+ request_start_date: nil,
1105
+ request_unique_client_id: nil,
1106
+ request_unpaids_only: nil)
1107
+ @api_call
1108
+ .request(new_request_builder(HttpMethodEnum::GET,
1109
+ '/public/v{version}/client/clientvisits',
1110
+ Server::DEFAULT)
1111
+ .template_param(new_parameter(version, key: 'version')
1112
+ .should_encode(true))
1113
+ .header_param(new_parameter(site_id, key: 'siteId'))
1114
+ .header_param(new_parameter(authorization, key: 'authorization'))
1115
+ .query_param(new_parameter(request_client_associated_sites_offset, key: 'request.clientAssociatedSitesOffset'))
1116
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
1117
+ .query_param(new_parameter(request_cross_regional_lookup, key: 'request.crossRegionalLookup'))
1118
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
1119
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1120
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1121
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
1122
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
1123
+ .query_param(new_parameter(request_unpaids_only, key: 'request.unpaidsOnly'))
1124
+ .header_param(new_parameter('application/json', key: 'accept'))
1125
+ .auth(Single.new('API-Key')))
1126
+ .response(new_response_handler
1127
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1128
+ .deserialize_into(GetClientVisitsResponse.method(:from_hash)))
1129
+ .execute
1130
+ end
1131
+
1132
+ # This endpoint contains a variety of filters that can return not just all
1133
+ # contact logs, but also system-generated contact logs, contact logs
1134
+ # assigned to specific staff members, and contact logs of specific types or
1135
+ # subtypes.
1136
+ # @param [String] version Required parameter: version of the api.
1137
+ # @param [String] request_client_id Required parameter: The ID of the client
1138
+ # whose contact logs are being requested.
1139
+ # @param [String] site_id Required parameter: ID of the site from which to
1140
+ # pull data.
1141
+ # @param [String] authorization Optional parameter: A staff user
1142
+ # authorization token.
1143
+ # @param [DateTime] request_end_date Optional parameter: Filters the results
1144
+ # to contact logs created before this date.<br /> Default: **the start
1145
+ # date**
1146
+ # @param [Integer] request_limit Optional parameter: Number of results to
1147
+ # include, defaults to 100
1148
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
1149
+ # to 0.
1150
+ # @param [TrueClass | FalseClass] request_show_system_generated Optional
1151
+ # parameter: When `true`, system-generated contact logs are returned in the
1152
+ # results.<br /> Default: **false**
1153
+ # @param [Array[Integer]] request_staff_ids Optional parameter: Filters the
1154
+ # results to return contact logs assigned to one or more staff IDs.
1155
+ # @param [DateTime] request_start_date Optional parameter: Filters the
1156
+ # results to contact logs created on or after this date.<br /> Default:
1157
+ # **the current date**
1158
+ # @param [Array[Integer]] request_subtype_ids Optional parameter: Filters
1159
+ # the results to contact logs assigned one or more of these subtype IDs.
1160
+ # @param [Array[Integer]] request_type_ids Optional parameter: Filters the
1161
+ # results to contact logs assigned one or more of these type IDs.
1162
+ # @return [GetContactLogsResponse] Response from the API call.
1163
+ def get_contact_logs(version,
1164
+ request_client_id,
1165
+ site_id,
1166
+ authorization: nil,
1167
+ request_end_date: nil,
1168
+ request_limit: nil,
1169
+ request_offset: nil,
1170
+ request_show_system_generated: nil,
1171
+ request_staff_ids: nil,
1172
+ request_start_date: nil,
1173
+ request_subtype_ids: nil,
1174
+ request_type_ids: nil)
1175
+ @api_call
1176
+ .request(new_request_builder(HttpMethodEnum::GET,
1177
+ '/public/v{version}/client/contactlogs',
1178
+ Server::DEFAULT)
1179
+ .template_param(new_parameter(version, key: 'version')
1180
+ .should_encode(true))
1181
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
1182
+ .header_param(new_parameter(site_id, key: 'siteId'))
1183
+ .header_param(new_parameter(authorization, key: 'authorization'))
1184
+ .query_param(new_parameter(request_end_date, key: 'request.endDate'))
1185
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1186
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1187
+ .query_param(new_parameter(request_show_system_generated, key: 'request.showSystemGenerated'))
1188
+ .query_param(new_parameter(request_staff_ids, key: 'request.staffIds'))
1189
+ .query_param(new_parameter(request_start_date, key: 'request.startDate'))
1190
+ .query_param(new_parameter(request_subtype_ids, key: 'request.subtypeIds'))
1191
+ .query_param(new_parameter(request_type_ids, key: 'request.typeIds'))
1192
+ .header_param(new_parameter('application/json', key: 'accept'))
1193
+ .auth(Single.new('API-Key')))
1194
+ .response(new_response_handler
1195
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1196
+ .deserialize_into(GetContactLogsResponse.method(:from_hash)))
1197
+ .execute
1198
+ end
1199
+
1200
+ # This endpoint contains a variety of filters that can return not just all
1201
+ # contact logs, but also system-generated contact logs, contact logs
1202
+ # assigned to specific staff members, and contact logs of specific types or
1203
+ # subtypes.
1204
+ # @param [String] version Required parameter: version of the api.
1205
+ # @param [String] site_id Required parameter: ID of the site from which to
1206
+ # pull data.
1207
+ # @param [String] authorization Optional parameter: A staff user
1208
+ # authorization token.
1209
+ # @param [Integer] request_contact_log_type_id Optional parameter: The
1210
+ # requested ContactLogType ID. Default: **all** IDs that the authenticated
1211
+ # user’s access level allows.
1212
+ # @param [Integer] request_limit Optional parameter: Number of results to
1213
+ # include, defaults to 100
1214
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
1215
+ # to 0.
1216
+ # @return [GetContactLogTypesResponse] Response from the API call.
1217
+ def get_contact_log_types(version,
1218
+ site_id,
1219
+ authorization: nil,
1220
+ request_contact_log_type_id: nil,
1221
+ request_limit: nil,
1222
+ request_offset: nil)
1223
+ @api_call
1224
+ .request(new_request_builder(HttpMethodEnum::GET,
1225
+ '/public/v{version}/client/contactlogtypes',
1226
+ Server::DEFAULT)
1227
+ .template_param(new_parameter(version, key: 'version')
1228
+ .should_encode(true))
1229
+ .header_param(new_parameter(site_id, key: 'siteId'))
1230
+ .header_param(new_parameter(authorization, key: 'authorization'))
1231
+ .query_param(new_parameter(request_contact_log_type_id, key: 'request.contactLogTypeId'))
1232
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1233
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1234
+ .header_param(new_parameter('application/json', key: 'accept'))
1235
+ .auth(Single.new('API-Key')))
1236
+ .response(new_response_handler
1237
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1238
+ .deserialize_into(GetContactLogTypesResponse.method(:from_hash)))
1239
+ .execute
1240
+ end
1241
+
1242
+ # Returns a list of sites that a particular client ID (also referred to as
1243
+ # an RSSID) or a client email address is associated with in a cross-regional
1244
+ # organization. Either the `ClientID` or `Email` parameter is required. If
1245
+ # both are provided, the `ClientID` is used.
1246
+ # Use this endpoint to retrieve information for other Public API endpoints,
1247
+ # about the same client at multiple sites within an organization. To use
1248
+ # this endpoint, your developer account must have been granted permission to
1249
+ # the site's entire organization.
1250
+ # Note that this endpoint does not work on the Developer Sandbox site, as it
1251
+ # is not set up for cross-regional use cases.
1252
+ # @param [String] version Required parameter: version of the api.
1253
+ # @param [String] site_id Required parameter: ID of the site from which to
1254
+ # pull data.
1255
+ # @param [String] authorization Optional parameter: A staff user
1256
+ # authorization token.
1257
+ # @param [String] request_client_id Optional parameter: Looks up the cross
1258
+ # regional associations by the client’s ID.
1259
+ # @param [String] request_email Optional parameter: Looks up the cross
1260
+ # regional associations by the client’s email address.
1261
+ # @param [TrueClass | FalseClass] request_exclude_inactive_sites Optional
1262
+ # parameter: Used to exclude inactive and deleted sites from the results.
1263
+ # When this flag is set to `true`, client profiles associated with inactive
1264
+ # and deleted sites are not getting returned. When this flag is set to
1265
+ # `false`,client profiles associated with inactive and deleted sites are
1266
+ # getting returned. Default: **true**
1267
+ # @param [String] request_first_name Optional parameter: First name (used
1268
+ # for email queries)
1269
+ # @param [String] request_last_name Optional parameter: Last name (used for
1270
+ # email queries)
1271
+ # @param [Integer] request_limit Optional parameter: Number of results to
1272
+ # include, defaults to 100
1273
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
1274
+ # to 0.
1275
+ # @param [Integer] request_unique_client_id Optional parameter: Looks up the
1276
+ # cross regional associations by the unique client’s ID. Note: you need to
1277
+ # provide the 'UniqueClientId' OR the 'ClientId' OR the 'Email'.
1278
+ # 'UniqueClientId' takes precedence when provided. If not, but both
1279
+ # 'ClientId' and 'Email' are provided, 'ClientId' is used by default.
1280
+ # @param [TrueClass | FalseClass] request_v2 Optional parameter: Use newer
1281
+ # method
1282
+ # @return [GetCrossRegionalClientAssociationsResponse] Response from the API call.
1283
+ def get_cross_regional_client_associations(version,
1284
+ site_id,
1285
+ authorization: nil,
1286
+ request_client_id: nil,
1287
+ request_email: nil,
1288
+ request_exclude_inactive_sites: nil,
1289
+ request_first_name: nil,
1290
+ request_last_name: nil,
1291
+ request_limit: nil,
1292
+ request_offset: nil,
1293
+ request_unique_client_id: nil,
1294
+ request_v2: nil)
1295
+ @api_call
1296
+ .request(new_request_builder(HttpMethodEnum::GET,
1297
+ '/public/v{version}/client/crossregionalclientassociations',
1298
+ Server::DEFAULT)
1299
+ .template_param(new_parameter(version, key: 'version')
1300
+ .should_encode(true))
1301
+ .header_param(new_parameter(site_id, key: 'siteId'))
1302
+ .header_param(new_parameter(authorization, key: 'authorization'))
1303
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
1304
+ .query_param(new_parameter(request_email, key: 'request.email'))
1305
+ .query_param(new_parameter(request_exclude_inactive_sites, key: 'request.excludeInactiveSites'))
1306
+ .query_param(new_parameter(request_first_name, key: 'request.firstName'))
1307
+ .query_param(new_parameter(request_last_name, key: 'request.lastName'))
1308
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1309
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1310
+ .query_param(new_parameter(request_unique_client_id, key: 'request.uniqueClientId'))
1311
+ .query_param(new_parameter(request_v2, key: 'request.v2'))
1312
+ .header_param(new_parameter('application/json', key: 'accept'))
1313
+ .auth(Single.new('API-Key')))
1314
+ .response(new_response_handler
1315
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1316
+ .deserialize_into(GetCrossRegionalClientAssociationsResponse.method(:from_hash)))
1317
+ .execute
1318
+ end
1319
+
1320
+ # Get a site's configured custom client fields.
1321
+ # @param [String] version Required parameter: version of the api.
1322
+ # @param [String] site_id Required parameter: ID of the site from which to
1323
+ # pull data.
1324
+ # @param [String] authorization Optional parameter: A staff user
1325
+ # authorization token.
1326
+ # @param [Integer] request_limit Optional parameter: Number of results to
1327
+ # include, defaults to 100
1328
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
1329
+ # to 0.
1330
+ # @return [GetCustomClientFieldsResponse] Response from the API call.
1331
+ def get_custom_client_fields(version,
1332
+ site_id,
1333
+ authorization: nil,
1334
+ request_limit: nil,
1335
+ request_offset: nil)
1336
+ @api_call
1337
+ .request(new_request_builder(HttpMethodEnum::GET,
1338
+ '/public/v{version}/client/customclientfields',
1339
+ Server::DEFAULT)
1340
+ .template_param(new_parameter(version, key: 'version')
1341
+ .should_encode(true))
1342
+ .header_param(new_parameter(site_id, key: 'siteId'))
1343
+ .header_param(new_parameter(authorization, key: 'authorization'))
1344
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
1345
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
1346
+ .header_param(new_parameter('application/json', key: 'accept'))
1347
+ .auth(Single.new('API-Key')))
1348
+ .response(new_response_handler
1349
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1350
+ .deserialize_into(GetCustomClientFieldsResponse.method(:from_hash)))
1351
+ .execute
1352
+ end
1353
+
1354
+ # Gets the list of fields that a new client has to fill out in business
1355
+ # mode, specifically for the sign-up process. `AddClient` and `UpdateClient`
1356
+ # validate against these fields.
1357
+ # This endpoint has no query parameters.
1358
+ # @param [String] version Required parameter: version of the api.
1359
+ # @param [String] site_id Required parameter: ID of the site from which to
1360
+ # pull data.
1361
+ # @param [String] authorization Optional parameter: A staff user
1362
+ # authorization token.
1363
+ # @return [GetRequiredClientFieldsResponse] Response from the API call.
1364
+ def get_required_client_fields(version,
1365
+ site_id,
1366
+ authorization: nil)
1367
+ @api_call
1368
+ .request(new_request_builder(HttpMethodEnum::GET,
1369
+ '/public/v{version}/client/requiredclientfields',
1370
+ Server::DEFAULT)
1371
+ .template_param(new_parameter(version, key: 'version')
1372
+ .should_encode(true))
1373
+ .header_param(new_parameter(site_id, key: 'siteId'))
1374
+ .header_param(new_parameter(authorization, key: 'authorization'))
1375
+ .header_param(new_parameter('application/json', key: 'accept'))
1376
+ .auth(Single.new('API-Key')))
1377
+ .response(new_response_handler
1378
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1379
+ .deserialize_into(GetRequiredClientFieldsResponse.method(:from_hash)))
1380
+ .execute
1381
+ end
1382
+
1383
+ # Marks a client as arrived for a specified location. A staff user token
1384
+ # must be included with staff assigned the LaunchSignInScreen permission.
1385
+ #
1386
+ # When used on a site that is part of a region, the following additional
1387
+ # logic will apply:
1388
+ #
1389
+ # * When a client exists within the region but not at the studio where the
1390
+ # arrival is being logged, a local client record will be automatically
1391
+ # created.
1392
+ # * If the local client does not have an applicable local membership or
1393
+ # pricing option, a membership or pricing option will be automatically used
1394
+ # if it exists elsewhere within the region.
1395
+ # @param [String] version Required parameter: version of the api.
1396
+ # @param [AddArrivalRequest] request Required parameter: TODO: type
1397
+ # description here
1398
+ # @param [String] site_id Required parameter: ID of the site from which to
1399
+ # pull data.
1400
+ # @param [String] authorization Optional parameter: A staff user
1401
+ # authorization token.
1402
+ # @return [AddArrivalResponse] Response from the API call.
1403
+ def add_arrival(version,
1404
+ request,
1405
+ site_id,
1406
+ authorization: nil)
1407
+ @api_call
1408
+ .request(new_request_builder(HttpMethodEnum::POST,
1409
+ '/public/v{version}/client/addarrival',
1410
+ Server::DEFAULT)
1411
+ .template_param(new_parameter(version, key: 'version')
1412
+ .should_encode(true))
1413
+ .body_param(new_parameter(request))
1414
+ .header_param(new_parameter(site_id, key: 'siteId'))
1415
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1416
+ .header_param(new_parameter(authorization, key: 'authorization'))
1417
+ .header_param(new_parameter('application/json', key: 'accept'))
1418
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1419
+ .auth(Single.new('API-Key')))
1420
+ .response(new_response_handler
1421
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1422
+ .deserialize_into(AddArrivalResponse.method(:from_hash)))
1423
+ .execute
1424
+ end
1425
+
1426
+ # Starting the week of May 11th, 2020 all versions of the Public API will no
1427
+ # longer allow duplicate clients to be created. This applies to both adding
1428
+ # a client and updating a client record. A duplicate client is created when
1429
+ # two profiles have the same first name, last name and email.<br />
1430
+ # Creates a new client record at the specified business.Passing a User Token
1431
+ # as Authorization will create a client and respect Business Mode required
1432
+ # fields.Omitting the token will create a client and respect Consumer Mode
1433
+ # required fi elds. To make sure you are collecting all required pieces of
1434
+ # information, first run GetRequired ClientFields.<br />
1435
+ # If you have purchased an Ultimate tier then this endpoint will
1436
+ # automatically start showing new opportunity on Sales Pipeline.
1437
+ # @param [String] version Required parameter: version of the api.
1438
+ # @param [AddClientRequest] request Required parameter: The `FirstName` and
1439
+ # `LastName` parameters are always required in this request.
1440
+ # All other parameters are optional, but note that any of the optional
1441
+ # parameters could be required by a particular business,
1442
+ # depending on how the business has configured the site settings. If
1443
+ # `GetRequiredClientFields` returns `EmergContact` in the list of required
1444
+ # fields, then all emergency contact parameters are required,
1445
+ # which includes `EmergencyContactInfoEmail`, `EmergencyContactInfoName`,
1446
+ # `EmergencyContactInfoPhone`, and `EmergencyContactInfoRelationship`.
1447
+ # @param [String] site_id Required parameter: ID of the site from which to
1448
+ # pull data.
1449
+ # @param [String] authorization Optional parameter: A staff user
1450
+ # authorization token.
1451
+ # @return [AddClientResponse] Response from the API call.
1452
+ def add_client(version,
1453
+ request,
1454
+ site_id,
1455
+ authorization: nil)
1456
+ @api_call
1457
+ .request(new_request_builder(HttpMethodEnum::POST,
1458
+ '/public/v{version}/client/addclient',
1459
+ Server::DEFAULT)
1460
+ .template_param(new_parameter(version, key: 'version')
1461
+ .should_encode(true))
1462
+ .body_param(new_parameter(request))
1463
+ .header_param(new_parameter(site_id, key: 'siteId'))
1464
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1465
+ .header_param(new_parameter(authorization, key: 'authorization'))
1466
+ .header_param(new_parameter('application/json', key: 'accept'))
1467
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1468
+ .auth(Single.new('API-Key')))
1469
+ .response(new_response_handler
1470
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1471
+ .deserialize_into(AddClientResponse.method(:from_hash)))
1472
+ .execute
1473
+ end
1474
+
1475
+ # This endpoint adds direct debit info to a client’s account. This endpoint
1476
+ # requires staff user credentials.
1477
+ # @param [String] version Required parameter: version of the api.
1478
+ # @param [AddClientDirectDebitInfoRequest] request Required parameter: TODO:
1479
+ # type description here
1480
+ # @param [String] site_id Required parameter: ID of the site from which to
1481
+ # pull data.
1482
+ # @param [String] authorization Optional parameter: A staff user
1483
+ # authorization token.
1484
+ # @return [AddClientDirectDebitInfoResponse] Response from the API call.
1485
+ def add_client_direct_debit_info(version,
1486
+ request,
1487
+ site_id,
1488
+ authorization: nil)
1489
+ @api_call
1490
+ .request(new_request_builder(HttpMethodEnum::POST,
1491
+ '/public/v{version}/client/addclientdirectdebitinfo',
1492
+ Server::DEFAULT)
1493
+ .template_param(new_parameter(version, key: 'version')
1494
+ .should_encode(true))
1495
+ .body_param(new_parameter(request))
1496
+ .header_param(new_parameter(site_id, key: 'siteId'))
1497
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1498
+ .header_param(new_parameter(authorization, key: 'authorization'))
1499
+ .header_param(new_parameter('application/json', key: 'accept'))
1500
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1501
+ .auth(Single.new('API-Key')))
1502
+ .response(new_response_handler
1503
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1504
+ .deserialize_into(AddClientDirectDebitInfoResponse.method(:from_hash)))
1505
+ .execute
1506
+ end
1507
+
1508
+ # This endpoint adds a formula note for a specified client or specified
1509
+ # client appointment. A staff user token must be included with staff
1510
+ # assigned permission to view client profile or have both
1511
+ # ViewAppointmentDetails and ModifyAppointment permissions.
1512
+ # @param [String] version Required parameter: version of the api.
1513
+ # @param [AddFormulaNoteRequest] request Required parameter: TODO: type
1514
+ # description here
1515
+ # @param [String] site_id Required parameter: ID of the site from which to
1516
+ # pull data.
1517
+ # @param [String] authorization Optional parameter: A staff user
1518
+ # authorization token.
1519
+ # @return [FormulaNoteResponse] Response from the API call.
1520
+ def add_formula_note(version,
1521
+ request,
1522
+ site_id,
1523
+ authorization: nil)
1524
+ @api_call
1525
+ .request(new_request_builder(HttpMethodEnum::POST,
1526
+ '/public/v{version}/client/addclientformulanote',
1527
+ Server::DEFAULT)
1528
+ .template_param(new_parameter(version, key: 'version')
1529
+ .should_encode(true))
1530
+ .body_param(new_parameter(request))
1531
+ .header_param(new_parameter(site_id, key: 'siteId'))
1532
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1533
+ .header_param(new_parameter(authorization, key: 'authorization'))
1534
+ .header_param(new_parameter('application/json', key: 'accept'))
1535
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1536
+ .auth(Single.new('API-Key')))
1537
+ .response(new_response_handler
1538
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1539
+ .deserialize_into(FormulaNoteResponse.method(:from_hash)))
1540
+ .execute
1541
+ end
1542
+
1543
+ # Add a contact log to a client's account.
1544
+ # @param [String] version Required parameter: version of the api.
1545
+ # @param [AddContactLogRequest] request Required parameter: TODO: type
1546
+ # description here
1547
+ # @param [String] site_id Required parameter: ID of the site from which to
1548
+ # pull data.
1549
+ # @param [String] authorization Optional parameter: A staff user
1550
+ # authorization token.
1551
+ # @return [ContactLog] Response from the API call.
1552
+ def add_contact_log(version,
1553
+ request,
1554
+ site_id,
1555
+ authorization: nil)
1556
+ @api_call
1557
+ .request(new_request_builder(HttpMethodEnum::POST,
1558
+ '/public/v{version}/client/addcontactlog',
1559
+ Server::DEFAULT)
1560
+ .template_param(new_parameter(version, key: 'version')
1561
+ .should_encode(true))
1562
+ .body_param(new_parameter(request))
1563
+ .header_param(new_parameter(site_id, key: 'siteId'))
1564
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1565
+ .header_param(new_parameter(authorization, key: 'authorization'))
1566
+ .header_param(new_parameter('application/json', key: 'accept'))
1567
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1568
+ .auth(Single.new('API-Key')))
1569
+ .response(new_response_handler
1570
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1571
+ .deserialize_into(ContactLog.method(:from_hash)))
1572
+ .execute
1573
+ end
1574
+
1575
+ # This endpoint helps to merge clients.
1576
+ # @param [String] version Required parameter: version of the api.
1577
+ # @param [MergeClientsRequest] request Required parameter: TODO: type
1578
+ # description here
1579
+ # @param [String] site_id Required parameter: ID of the site from which to
1580
+ # pull data.
1581
+ # @param [String] authorization Optional parameter: A staff user
1582
+ # authorization token.
1583
+ # @return [Object] Response from the API call.
1584
+ def merge_client(version,
1585
+ request,
1586
+ site_id,
1587
+ authorization: nil)
1588
+ @api_call
1589
+ .request(new_request_builder(HttpMethodEnum::POST,
1590
+ '/public/v{version}/client/mergeclients',
1591
+ Server::DEFAULT)
1592
+ .template_param(new_parameter(version, key: 'version')
1593
+ .should_encode(true))
1594
+ .body_param(new_parameter(request))
1595
+ .header_param(new_parameter(site_id, key: 'siteId'))
1596
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1597
+ .header_param(new_parameter(authorization, key: 'authorization'))
1598
+ .header_param(new_parameter('application/json', key: 'accept'))
1599
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1600
+ .auth(Single.new('API-Key')))
1601
+ .response(new_response_handler
1602
+ .deserializer(APIHelper.method(:json_deserialize)))
1603
+ .execute
1604
+ end
1605
+
1606
+ # This endpoint requires staff user credentials.
1607
+ # @param [String] version Required parameter: version of the api.
1608
+ # @param [SendAutoEmailRequest] request Required parameter: TODO: type
1609
+ # description here
1610
+ # @param [String] site_id Required parameter: ID of the site from which to
1611
+ # pull data.
1612
+ # @param [String] authorization Optional parameter: A staff user
1613
+ # authorization token.
1614
+ # @return [Object] Response from the API call.
1615
+ def send_auto_email(version,
1616
+ request,
1617
+ site_id,
1618
+ authorization: nil)
1619
+ @api_call
1620
+ .request(new_request_builder(HttpMethodEnum::POST,
1621
+ '/public/v{version}/client/sendautoemail',
1622
+ Server::DEFAULT)
1623
+ .template_param(new_parameter(version, key: 'version')
1624
+ .should_encode(true))
1625
+ .body_param(new_parameter(request))
1626
+ .header_param(new_parameter(site_id, key: 'siteId'))
1627
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1628
+ .header_param(new_parameter(authorization, key: 'authorization'))
1629
+ .header_param(new_parameter('application/json', key: 'accept'))
1630
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1631
+ .auth(Single.new('API-Key')))
1632
+ .response(new_response_handler
1633
+ .deserializer(APIHelper.method(:json_deserialize)))
1634
+ .execute
1635
+ end
1636
+
1637
+ # Send a password reset email to a client.
1638
+ # @param [String] version Required parameter: version of the api.
1639
+ # @param [SendPasswordResetEmailRequest] request Required parameter: TODO:
1640
+ # type description here
1641
+ # @param [String] site_id Required parameter: ID of the site from which to
1642
+ # pull data.
1643
+ # @param [String] authorization Optional parameter: A staff user
1644
+ # authorization token.
1645
+ # @return [Object] Response from the API call.
1646
+ def send_password_reset_email(version,
1647
+ request,
1648
+ site_id,
1649
+ authorization: nil)
1650
+ @api_call
1651
+ .request(new_request_builder(HttpMethodEnum::POST,
1652
+ '/public/v{version}/client/sendpasswordresetemail',
1653
+ Server::DEFAULT)
1654
+ .template_param(new_parameter(version, key: 'version')
1655
+ .should_encode(true))
1656
+ .body_param(new_parameter(request))
1657
+ .header_param(new_parameter(site_id, key: 'siteId'))
1658
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1659
+ .header_param(new_parameter(authorization, key: 'authorization'))
1660
+ .header_param(new_parameter('application/json', key: 'accept'))
1661
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1662
+ .auth(Single.new('API-Key')))
1663
+ .response(new_response_handler
1664
+ .deserializer(APIHelper.method(:json_deserialize)))
1665
+ .execute
1666
+ end
1667
+
1668
+ # Suspend client contract
1669
+ # @param [String] version Required parameter: version of the api.
1670
+ # @param [SuspendContractRequest] request Required parameter: TODO: type
1671
+ # description here
1672
+ # @param [String] site_id Required parameter: ID of the site from which to
1673
+ # pull data.
1674
+ # @param [String] authorization Optional parameter: A staff user
1675
+ # authorization token.
1676
+ # @return [SuspendContractResponse] Response from the API call.
1677
+ def suspend_contract(version,
1678
+ request,
1679
+ site_id,
1680
+ authorization: nil)
1681
+ @api_call
1682
+ .request(new_request_builder(HttpMethodEnum::POST,
1683
+ '/public/v{version}/client/suspendcontract',
1684
+ Server::DEFAULT)
1685
+ .template_param(new_parameter(version, key: 'version')
1686
+ .should_encode(true))
1687
+ .body_param(new_parameter(request))
1688
+ .header_param(new_parameter(site_id, key: 'siteId'))
1689
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1690
+ .header_param(new_parameter(authorization, key: 'authorization'))
1691
+ .header_param(new_parameter('application/json', key: 'accept'))
1692
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1693
+ .auth(Single.new('API-Key')))
1694
+ .response(new_response_handler
1695
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1696
+ .deserialize_into(SuspendContractResponse.method(:from_hash)))
1697
+ .execute
1698
+ end
1699
+
1700
+ # This endpoint terminates a client contract. This endpoint requires staff
1701
+ # user credentials with TerminateClientContract permission.
1702
+ # @param [String] version Required parameter: version of the api.
1703
+ # @param [TerminateContractRequest] request Required parameter: TODO: type
1704
+ # description here
1705
+ # @param [String] site_id Required parameter: ID of the site from which to
1706
+ # pull data.
1707
+ # @param [String] authorization Optional parameter: A staff user
1708
+ # authorization token.
1709
+ # @return [TerminateContractResponse] Response from the API call.
1710
+ def terminate_contract(version,
1711
+ request,
1712
+ site_id,
1713
+ authorization: nil)
1714
+ @api_call
1715
+ .request(new_request_builder(HttpMethodEnum::POST,
1716
+ '/public/v{version}/client/terminatecontract',
1717
+ Server::DEFAULT)
1718
+ .template_param(new_parameter(version, key: 'version')
1719
+ .should_encode(true))
1720
+ .body_param(new_parameter(request))
1721
+ .header_param(new_parameter(site_id, key: 'siteId'))
1722
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1723
+ .header_param(new_parameter(authorization, key: 'authorization'))
1724
+ .header_param(new_parameter('application/json', key: 'accept'))
1725
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1726
+ .auth(Single.new('API-Key')))
1727
+ .response(new_response_handler
1728
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1729
+ .deserialize_into(TerminateContractResponse.method(:from_hash)))
1730
+ .execute
1731
+ end
1732
+
1733
+ # Starting the week of May 11th, 2020 all versions of the Public API will no
1734
+ # longer allow duplicate clients to be created. This applies to both adding
1735
+ # a client and updating a client record. A duplicate client is created when
1736
+ # two profiles have the same first name, last name and email.<br />
1737
+ # Updates an existing client for a specific subscriber.Passing a User Token
1738
+ # as Authorization respects Business Mode required fields.Omitting the token
1739
+ # respects Consumer Mode required fields.To make sure you are collecting all
1740
+ # required pieces of information, first run GetRequiredClientFields.
1741
+ # <br />.
1742
+ # Use this endpoint as follows:
1743
+ # * If you need to update the `ReferredBy` parameter, use this endpoint
1744
+ # after calling `GET ClientReferralTypes`.
1745
+ # * When updating a client's home location, use after calling `GET
1746
+ # Locations`.
1747
+ # * If you are updating a client's stored credit card, use after calling
1748
+ # `GET AcceptedCardTypes` so that you can make sure the card is a type that
1749
+ # is accepted at the subscriber.
1750
+ # * If this endpoint is used on a cross-regional site, passing in a client's
1751
+ # RSSID and email address creates a cross-regional link. This means that the
1752
+ # client is created in cross-regional sites where the client does not exist
1753
+ # and `GET CrossRegionalClientAssociations` returns all appropriate
1754
+ # cross-regional sites.
1755
+ # * When `CrossRegionalUpdate` is omitted or set to `true`, the client's
1756
+ # updated information is propagated to all of the region's sites. If
1757
+ # `CrossRegionalUpdate` is set to `false`, only the local client is updated.
1758
+ # * Important: Starting in June 2025, the fields RSSID, Prefix, Name, Email,
1759
+ # Birthday, Phone, and Address will automatically update cross-regionally
1760
+ # when changed, regardless of the CrossRegionalUpdate setting. The update is
1761
+ # rolling out on a per customer basis and is expected to complete to all
1762
+ # customers by September 2025.
1763
+ # Note that the following items cannot be updated for a cross-regional
1764
+ # client:
1765
+ # * `ClientIndexes`
1766
+ # * `ClientRelationships`
1767
+ # * `CustomClientFields`
1768
+ # * `SalesReps`
1769
+ # * `SendAccountEmails`
1770
+ # * `SendAccountTexts`
1771
+ # * `SendPromotionalEmails`
1772
+ # * `SendPromotionalTexts`
1773
+ # * `SendScheduleEmails`
1774
+ # * `SendScheduleTexts`
1775
+ # * `Gender` (for site custom values)
1776
+ # Custom client Gender options can only be created with non-cross-regional
1777
+ # requests.
1778
+ #
1779
+ # If you have purchased an Ultimate tier then this endpoint will
1780
+ # automatically start showing a new opportunity on Sales Pipeline.It will
1781
+ # create a new opportunity if the current request modify the contact as
1782
+ # follows::
1783
+ #
1784
+ # * You need to update the `IsProspect` parameter, to `true`.
1785
+ # * You need to update the `ProspectStage`.`Description parameter`, to `New
1786
+ # Lead`.<br />
1787
+ # Updates made to any inactive clients will automatically reactivate the
1788
+ # client unless the `Acive` property is explicitly set to `false` in the
1789
+ # request body.
1790
+ # @param [String] version Required parameter: version of the api.
1791
+ # @param [UpdateClientRequest] request Required parameter: TODO: type
1792
+ # description here
1793
+ # @param [String] site_id Required parameter: ID of the site from which to
1794
+ # pull data.
1795
+ # @param [String] authorization Optional parameter: A staff user
1796
+ # authorization token.
1797
+ # @return [UpdateClientResponse] Response from the API call.
1798
+ def update_client(version,
1799
+ request,
1800
+ site_id,
1801
+ authorization: nil)
1802
+ @api_call
1803
+ .request(new_request_builder(HttpMethodEnum::POST,
1804
+ '/public/v{version}/client/updateclient',
1805
+ Server::DEFAULT)
1806
+ .template_param(new_parameter(version, key: 'version')
1807
+ .should_encode(true))
1808
+ .body_param(new_parameter(request))
1809
+ .header_param(new_parameter(site_id, key: 'siteId'))
1810
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1811
+ .header_param(new_parameter(authorization, key: 'authorization'))
1812
+ .header_param(new_parameter('application/json', key: 'accept'))
1813
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1814
+ .auth(Single.new('API-Key')))
1815
+ .response(new_response_handler
1816
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1817
+ .deserialize_into(UpdateClientResponse.method(:from_hash)))
1818
+ .execute
1819
+ end
1820
+
1821
+ # This endpoint can be used to update the amount and/or the item of a
1822
+ # client’s autopay schedule.
1823
+ # @param [String] version Required parameter: version of the api.
1824
+ # @param [UpdateClientContractAutopaysRequest] request Required parameter:
1825
+ # TODO: type description here
1826
+ # @param [String] site_id Required parameter: ID of the site from which to
1827
+ # pull data.
1828
+ # @param [String] authorization Optional parameter: A staff user
1829
+ # authorization token.
1830
+ # @return [Contract] Response from the API call.
1831
+ def update_client_contract_autopays(version,
1832
+ request,
1833
+ site_id,
1834
+ authorization: nil)
1835
+ @api_call
1836
+ .request(new_request_builder(HttpMethodEnum::POST,
1837
+ '/public/v{version}/client/updateclientcontractautopays',
1838
+ Server::DEFAULT)
1839
+ .template_param(new_parameter(version, key: 'version')
1840
+ .should_encode(true))
1841
+ .body_param(new_parameter(request))
1842
+ .header_param(new_parameter(site_id, key: 'siteId'))
1843
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1844
+ .header_param(new_parameter(authorization, key: 'authorization'))
1845
+ .header_param(new_parameter('application/json', key: 'accept'))
1846
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1847
+ .auth(Single.new('API-Key')))
1848
+ .response(new_response_handler
1849
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1850
+ .deserialize_into(Contract.method(:from_hash)))
1851
+ .execute
1852
+ end
1853
+
1854
+ # Updates the active date and/or expiration date of a client pricing option.
1855
+ # This request requires staff user credentials. If the active date is
1856
+ # modified, the expiration date is also modified accordingly. If the
1857
+ # expiration date is modified, the active date is unchanged.
1858
+ # @param [String] version Required parameter: version of the api.
1859
+ # @param [UpdateClientServiceRequest] request Required parameter: TODO: type
1860
+ # description here
1861
+ # @param [String] site_id Required parameter: ID of the site from which to
1862
+ # pull data.
1863
+ # @param [String] authorization Optional parameter: A staff user
1864
+ # authorization token.
1865
+ # @return [UpdateClientServiceResponse] Response from the API call.
1866
+ def update_client_service(version,
1867
+ request,
1868
+ site_id,
1869
+ authorization: nil)
1870
+ @api_call
1871
+ .request(new_request_builder(HttpMethodEnum::POST,
1872
+ '/public/v{version}/client/updateclientservice',
1873
+ Server::DEFAULT)
1874
+ .template_param(new_parameter(version, key: 'version')
1875
+ .should_encode(true))
1876
+ .body_param(new_parameter(request))
1877
+ .header_param(new_parameter(site_id, key: 'siteId'))
1878
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1879
+ .header_param(new_parameter(authorization, key: 'authorization'))
1880
+ .header_param(new_parameter('application/json', key: 'accept'))
1881
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1882
+ .auth(Single.new('API-Key')))
1883
+ .response(new_response_handler
1884
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1885
+ .deserialize_into(UpdateClientServiceResponse.method(:from_hash)))
1886
+ .execute
1887
+ end
1888
+
1889
+ # Updates the status of the specified visit.
1890
+ # @param [String] version Required parameter: version of the api.
1891
+ # @param [UpdateClientVisitRequest] request Required parameter: TODO: type
1892
+ # description here
1893
+ # @param [String] site_id Required parameter: ID of the site from which to
1894
+ # pull data.
1895
+ # @param [String] authorization Optional parameter: A staff user
1896
+ # authorization token.
1897
+ # @return [UpdateClientVisitResponse] Response from the API call.
1898
+ def update_client_visit(version,
1899
+ request,
1900
+ site_id,
1901
+ authorization: nil)
1902
+ @api_call
1903
+ .request(new_request_builder(HttpMethodEnum::POST,
1904
+ '/public/v{version}/client/updateclientvisit',
1905
+ Server::DEFAULT)
1906
+ .template_param(new_parameter(version, key: 'version')
1907
+ .should_encode(true))
1908
+ .body_param(new_parameter(request))
1909
+ .header_param(new_parameter(site_id, key: 'siteId'))
1910
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1911
+ .header_param(new_parameter(authorization, key: 'authorization'))
1912
+ .header_param(new_parameter('application/json', key: 'accept'))
1913
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1914
+ .auth(Single.new('API-Key')))
1915
+ .response(new_response_handler
1916
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1917
+ .deserialize_into(UpdateClientVisitResponse.method(:from_hash)))
1918
+ .execute
1919
+ end
1920
+
1921
+ # Update a contact log on a client's account.
1922
+ # @param [String] version Required parameter: version of the api.
1923
+ # @param [UpdateContactLogRequest] request Required parameter: TODO: type
1924
+ # description here
1925
+ # @param [String] site_id Required parameter: ID of the site from which to
1926
+ # pull data.
1927
+ # @param [String] authorization Optional parameter: A staff user
1928
+ # authorization token.
1929
+ # @return [ContactLog] Response from the API call.
1930
+ def update_contact_log(version,
1931
+ request,
1932
+ site_id,
1933
+ authorization: nil)
1934
+ @api_call
1935
+ .request(new_request_builder(HttpMethodEnum::POST,
1936
+ '/public/v{version}/client/updatecontactlog',
1937
+ Server::DEFAULT)
1938
+ .template_param(new_parameter(version, key: 'version')
1939
+ .should_encode(true))
1940
+ .body_param(new_parameter(request))
1941
+ .header_param(new_parameter(site_id, key: 'siteId'))
1942
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1943
+ .header_param(new_parameter(authorization, key: 'authorization'))
1944
+ .header_param(new_parameter('application/json', key: 'accept'))
1945
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1946
+ .auth(Single.new('API-Key')))
1947
+ .response(new_response_handler
1948
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1949
+ .deserialize_into(ContactLog.method(:from_hash)))
1950
+ .execute
1951
+ end
1952
+
1953
+ # Uploads a document file for a specific client. Returns a string
1954
+ # representation of the image byte array. The maximum size file that can be
1955
+ # uploaded is **4MB**.
1956
+ # @param [String] version Required parameter: version of the api.
1957
+ # @param [UploadClientDocumentRequest] request Required parameter: TODO:
1958
+ # type description here
1959
+ # @param [String] site_id Required parameter: ID of the site from which to
1960
+ # pull data.
1961
+ # @param [String] authorization Optional parameter: A staff user
1962
+ # authorization token.
1963
+ # @return [UploadClientDocumentResponse] Response from the API call.
1964
+ def upload_client_document(version,
1965
+ request,
1966
+ site_id,
1967
+ authorization: nil)
1968
+ @api_call
1969
+ .request(new_request_builder(HttpMethodEnum::POST,
1970
+ '/public/v{version}/client/uploadclientdocument',
1971
+ Server::DEFAULT)
1972
+ .template_param(new_parameter(version, key: 'version')
1973
+ .should_encode(true))
1974
+ .body_param(new_parameter(request))
1975
+ .header_param(new_parameter(site_id, key: 'siteId'))
1976
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1977
+ .header_param(new_parameter(authorization, key: 'authorization'))
1978
+ .header_param(new_parameter('application/json', key: 'accept'))
1979
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1980
+ .auth(Single.new('API-Key')))
1981
+ .response(new_response_handler
1982
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1983
+ .deserialize_into(UploadClientDocumentResponse.method(:from_hash)))
1984
+ .execute
1985
+ end
1986
+
1987
+ # Uploads a client’s profile photo. The maximum file size is 4 MB and
1988
+ # acceptable file types are:
1989
+ # * bmp
1990
+ # * jpeg
1991
+ # * gif
1992
+ # * tiff
1993
+ # * png
1994
+ # @param [String] version Required parameter: version of the api.
1995
+ # @param [UploadClientPhotoRequest] request Required parameter: TODO: type
1996
+ # description here
1997
+ # @param [String] site_id Required parameter: ID of the site from which to
1998
+ # pull data.
1999
+ # @param [String] authorization Optional parameter: A staff user
2000
+ # authorization token.
2001
+ # @return [UploadClientPhotoResponse] Response from the API call.
2002
+ def upload_client_photo(version,
2003
+ request,
2004
+ site_id,
2005
+ authorization: nil)
2006
+ @api_call
2007
+ .request(new_request_builder(HttpMethodEnum::POST,
2008
+ '/public/v{version}/client/uploadclientphoto',
2009
+ Server::DEFAULT)
2010
+ .template_param(new_parameter(version, key: 'version')
2011
+ .should_encode(true))
2012
+ .body_param(new_parameter(request))
2013
+ .header_param(new_parameter(site_id, key: 'siteId'))
2014
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
2015
+ .header_param(new_parameter(authorization, key: 'authorization'))
2016
+ .header_param(new_parameter('application/json', key: 'accept'))
2017
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
2018
+ .auth(Single.new('API-Key')))
2019
+ .response(new_response_handler
2020
+ .deserializer(APIHelper.method(:custom_type_deserializer))
2021
+ .deserialize_into(UploadClientPhotoResponse.method(:from_hash)))
2022
+ .execute
2023
+ end
2024
+
2025
+ # This endpoint deletes an existing formula note. A staff user token must be
2026
+ # included with staff assigned permission to view client profile or have
2027
+ # both ViewAppointmentDetails and ModifyAppointment permissions.
2028
+ # @param [String] version Required parameter: version of the api.
2029
+ # @param [String] request_client_id Required parameter: The client ID of the
2030
+ # client whose formula note needs to be deleted.
2031
+ # @param [Integer] request_formula_note_id Required parameter: The formula
2032
+ # note ID for the note to be deleted.
2033
+ # @param [String] site_id Required parameter: ID of the site from which to
2034
+ # pull data.
2035
+ # @param [String] authorization Optional parameter: A staff user
2036
+ # authorization token.
2037
+ # @param [Integer] request_limit Optional parameter: Number of results to
2038
+ # include, defaults to 100
2039
+ # @param [Integer] request_offset Optional parameter: Page offset, defaults
2040
+ # to 0.
2041
+ # @return [void] Response from the API call.
2042
+ def delete_client_formula_note(version,
2043
+ request_client_id,
2044
+ request_formula_note_id,
2045
+ site_id,
2046
+ authorization: nil,
2047
+ request_limit: nil,
2048
+ request_offset: nil)
2049
+ @api_call
2050
+ .request(new_request_builder(HttpMethodEnum::DELETE,
2051
+ '/public/v{version}/client/clientformulanote',
2052
+ Server::DEFAULT)
2053
+ .template_param(new_parameter(version, key: 'version')
2054
+ .should_encode(true))
2055
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
2056
+ .query_param(new_parameter(request_formula_note_id, key: 'request.formulaNoteId'))
2057
+ .header_param(new_parameter(site_id, key: 'siteId'))
2058
+ .header_param(new_parameter(authorization, key: 'authorization'))
2059
+ .query_param(new_parameter(request_limit, key: 'request.limit'))
2060
+ .query_param(new_parameter(request_offset, key: 'request.offset'))
2061
+ .auth(Single.new('API-Key')))
2062
+ .response(new_response_handler
2063
+ .is_response_void(true))
2064
+ .execute
2065
+ end
2066
+
2067
+ # This endpoint deletes contactlog of client. This endpoint requires staff
2068
+ # user credentials.
2069
+ # @param [String] version Required parameter: version of the api.
2070
+ # @param [String] request_client_id Required parameter: The client ID of the
2071
+ # client whose Contact Log is being deleted.
2072
+ # @param [Integer] request_contact_log_id Required parameter: The Contact
2073
+ # Log ID.
2074
+ # @param [String] site_id Required parameter: ID of the site from which to
2075
+ # pull data.
2076
+ # @param [String] authorization Optional parameter: A staff user
2077
+ # authorization token.
2078
+ # @param [TrueClass | FalseClass] request_test Optional parameter: When
2079
+ # `true`, indicates that this is a test request and no data is inserted into
2080
+ # the subscriber’s database. When `false`, the database is updated.
2081
+ # @return [Object] Response from the API call.
2082
+ def delete_contact_log(version,
2083
+ request_client_id,
2084
+ request_contact_log_id,
2085
+ site_id,
2086
+ authorization: nil,
2087
+ request_test: nil)
2088
+ @api_call
2089
+ .request(new_request_builder(HttpMethodEnum::DELETE,
2090
+ '/public/v{version}/client/deletecontactlog',
2091
+ Server::DEFAULT)
2092
+ .template_param(new_parameter(version, key: 'version')
2093
+ .should_encode(true))
2094
+ .query_param(new_parameter(request_client_id, key: 'request.clientId'))
2095
+ .query_param(new_parameter(request_contact_log_id, key: 'request.contactLogId'))
2096
+ .header_param(new_parameter(site_id, key: 'siteId'))
2097
+ .header_param(new_parameter(authorization, key: 'authorization'))
2098
+ .query_param(new_parameter(request_test, key: 'request.test'))
2099
+ .header_param(new_parameter('application/json', key: 'accept'))
2100
+ .auth(Single.new('API-Key')))
2101
+ .response(new_response_handler
2102
+ .deserializer(APIHelper.method(:json_deserialize)))
2103
+ .execute
2104
+ end
2105
+ end
2106
+ end