Class: Booker::CustomerClient
- Includes:
- CustomerREST
- Defined in:
- lib/booker/customer_client.rb
Constant Summary
Constants included from CommonREST
Booker::CommonREST::DEFAULT_PAGINATION_PARAMS
Constants inherited from Client
Booker::Client::ACCESS_TOKEN_ENDPOINT, Booker::Client::ACCESS_TOKEN_HTTP_METHOD, Booker::Client::TimeZone
Instance Attribute Summary
Attributes inherited from Client
#base_url, #client_id, #client_secret, #temp_access_token, #temp_access_token_expires_at, #token_store, #token_store_callback_method
Instance Method Summary collapse
- #access_token_options ⇒ Object
- #default_base_url ⇒ Object
- #env_base_url_key ⇒ Object
-
#initialize(options = {}) ⇒ CustomerClient
constructor
A new instance of CustomerClient.
Methods included from CustomerREST
#calculate_appointment_cost, #cancel_appointment, #create_appointment, #create_class_appointment, #create_customer, #create_incomplete_appointment, #find_employees, #find_treatments, #forgot_password, #get_appointment, #get_customer, #get_customer_appointments, #get_locations, #get_special_by_code, #get_treatment_categories, #login, #reset_password, #run_class_availability, #run_multi_service_availability, #run_multi_spa_multi_sub_category_availability, #update_customer
Methods included from CommonREST
#confirm_appointment, #get_location, #get_online_booking_settings
Methods inherited from Client
#access_token, #access_token_response, #full_url, #get, #get_access_token, #get_base_url, #get_booker_resources, #handle_errors!, #paginated_request, #post, #put, #raise_invalid_api_credentials_for_empty_resp!, #update_token_store
Constructor Details
#initialize(options = {}) ⇒ CustomerClient
Returns a new instance of CustomerClient.
5 6 7 8 9 |
# File 'lib/booker/customer_client.rb', line 5 def initialize(={}) super self.token_store ||= GenericTokenStore self.token_store_callback_method ||= :update_booker_access_token! end |
Instance Method Details
#access_token_options ⇒ Object
15 |
# File 'lib/booker/customer_client.rb', line 15 def ; super.merge!(grant_type: 'client_credentials'); end |
#default_base_url ⇒ Object
13 |
# File 'lib/booker/customer_client.rb', line 13 def default_base_url; 'https://apicurrent-app.booker.ninja/webservice4/json/CustomerService.svc'; end |
#env_base_url_key ⇒ Object
11 |
# File 'lib/booker/customer_client.rb', line 11 def env_base_url_key; 'BOOKER_CUSTOMER_SERVICE_URL'; end |