Class: Booker::V4::CustomerClient

Inherits:
Client
  • Object
show all
Includes:
CustomerREST
Defined in:
lib/booker/v4/customer_client.rb

Constant Summary collapse

ENV_BASE_URL_KEY =
'BOOKER_CUSTOMER_SERVICE_URL'.freeze
DEFAULT_BASE_URL =
'https://apicurrent-app.booker.ninja/webservice4/json/CustomerService.svc'.freeze

Constants included from RequestHelper

RequestHelper::DEFAULT_PAGINATION_PARAMS

Constants inherited from Client

Client::API_GATEWAY_ERRORS, Client::BOOKER_SERVER_TIMEZONE, Client::CLIENT_CREDENTIALS_GRANT_TYPE, Client::CREATE_TOKEN_CONTENT_TYPE, Client::CREATE_TOKEN_PATH, Client::DEFAULT_AUTH_BASE_URL, Client::DEFAULT_CONTENT_TYPE, Client::DEFAULT_REQUEST_TIMEOUT, Client::REFRESH_TOKEN_GRANT_TYPE, Client::UPDATE_TOKEN_CONTEXT_PATH, Client::VALID_ACCESS_TOKEN_SCOPES

Instance Attribute Summary

Attributes inherited from Client

#access_token_scope, #api_subscription_key, #auth_base_url, #auth_with_client_credentials, #base_url, #client_id, #client_secret, #location_id, #refresh_token, #request_timeout, #temp_access_token, #temp_access_token_expires_at, #token_store, #token_store_callback_method

Instance Method Summary collapse

Methods included from CustomerREST

#create_appointment, #create_class_appointment, #run_class_availability

Methods included from CommonREST

#confirm_appointment, #get_location, #get_online_booking_settings

Methods included from RequestHelper

#build_params

Methods inherited from Client

#access_token, #access_token_response, #delete, #full_url, #get, #get_access_token, #get_base_url, #get_booker_resources, #get_location_access_token, #handle_errors!, #paginated_request, #patch, #post, #put, #update_token_store

Constructor Details

#initialize(options = {}) ⇒ CustomerClient

Returns a new instance of CustomerClient.



8
9
10
11
12
# File 'lib/booker/v4/customer_client.rb', line 8

def initialize(options={})
  super
  self.token_store ||= GenericTokenStore
  self.token_store_callback_method ||= :update_booker_access_token!
end