Module: BookingSync::API::Client::PreferencesGeneralSettings

Included in:
BookingSync::API::Client
Defined in:
lib/bookingsync/api/client/preferences_general_settings.rb

Instance Method Summary collapse

Instance Method Details

#edit_preferences_general_setting(preferences_general_setting, options = {}) ⇒ BookingSync::API::Resource

Edit a preferences general setting

Examples:

preferences_general_setting = @api.preferences_general_settings.first
@api.edit_preferences_general_setting(preferences_general_setting, { selected_locales: ["fr"] })

Parameters:

  • preferences_general_setting (BookingSync::API::Resource|Integer)

    PreferencesGeneralSetting or ID of the preferences_general_setting to be updated

  • options (Hash) (defaults to: {})

    preferences_general_setting attributes to be updated

Returns:



30
31
32
33
# File 'lib/bookingsync/api/client/preferences_general_settings.rb', line 30

def edit_preferences_general_setting(preferences_general_setting, options = {})
  put("preferences_general_settings/#{preferences_general_setting}",
    preferences_general_settings: [options]).pop
end

#preferences_general_settings(options = {}, &block) ⇒ Array<BookingSync::API::Resource>

List preferences general settings

Returns preferences general settings for the account user is authenticated with.

Examples:

Get the list of preferences general settings for the current account

preferences_general_settings = @api.preferences_general_settings
preferences_general_settings.first.email # => "[email protected]"

Get the list of preferences general settings only with email for smaller response

@api.preferences_general_settings(fields: [:email])

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:



16
17
18
# File 'lib/bookingsync/api/client/preferences_general_settings.rb', line 16

def preferences_general_settings(options = {}, &block)
  paginate :preferences_general_settings, options, &block
end