Class: Onlyfans::Resources::SavedForLater::Messages::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyfans/resources/saved_for_later/messages/settings.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Settings

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Settings.

Parameters:



79
80
81
# File 'lib/onlyfans/resources/saved_for_later/messages/settings.rb', line 79

def initialize(client:)
  @client = client
end

Instance Method Details

#disable_automatic_messaging(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Messages::SettingDisableAutomaticMessagingResponse

Disable automatic messaging of Saved For Later messages.



39
40
41
42
43
44
45
46
# File 'lib/onlyfans/resources/saved_for_later/messages/settings.rb', line 39

def disable_automatic_messaging(, params = {})
  @client.request(
    method: :patch,
    path: ["api/%1$s/saved-for-later/messages/settings/disable-automatic-messaging", ],
    model: Onlyfans::Models::SavedForLater::Messages::SettingDisableAutomaticMessagingResponse,
    options: params[:request_options]
  )
end

#enable_or_update_automatic_messaging(account, period:, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Messages::SettingEnableOrUpdateAutomaticMessagingResponse

Enable or update automatic messaging of Saved For Later messages.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/onlyfans/resources/saved_for_later/messages/settings.rb', line 61

def enable_or_update_automatic_messaging(, params)
  parsed, options =
    Onlyfans::SavedForLater::Messages::SettingEnableOrUpdateAutomaticMessagingParams.dump_request(params)
  @client.request(
    method: :patch,
    path: [
      "api/%1$s/saved-for-later/messages/settings/enable-or-update-automatic-messaging",
      
    ],
    body: parsed,
    model: Onlyfans::Models::SavedForLater::Messages::SettingEnableOrUpdateAutomaticMessagingResponse,
    options: options
  )
end

#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Messages::SettingRetrieveResponse

Get the Saved For Later message settings.

Parameters:

Returns:

See Also:



19
20
21
22
23
24
25
26
# File 'lib/onlyfans/resources/saved_for_later/messages/settings.rb', line 19

def retrieve(, params = {})
  @client.request(
    method: :get,
    path: ["api/%1$s/saved-for-later/messages/settings", ],
    model: Onlyfans::Models::SavedForLater::Messages::SettingRetrieveResponse,
    options: params[:request_options]
  )
end