Class: Onlyfans::Resources::Settings::BlockedCountries
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Settings::BlockedCountries
- Defined in:
- lib/onlyfans/resources/settings/blocked_countries.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ BlockedCountries
constructor
private
A new instance of BlockedCountries.
-
#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::Settings::BlockedCountryRetrieveResponse
Returns the countries blocked from viewing the account.
-
#update(account, blocked_countries:, blocked_states: nil, request_options: {}) ⇒ Onlyfans::Models::Settings::BlockedCountryUpdateResponse
Some parameter documentations has been truncated, see Models::Settings::BlockedCountryUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ BlockedCountries
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 BlockedCountries.
59 60 61 |
# File 'lib/onlyfans/resources/settings/blocked_countries.rb', line 59 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::Settings::BlockedCountryRetrieveResponse
Returns the countries blocked from viewing the account.
18 19 20 21 22 23 24 25 |
# File 'lib/onlyfans/resources/settings/blocked_countries.rb', line 18 def retrieve(account, params = {}) @client.request( method: :get, path: ["api/%1$s/settings/blocked-countries", account], model: Onlyfans::Models::Settings::BlockedCountryRetrieveResponse, options: params[:request_options] ) end |
#update(account, blocked_countries:, blocked_states: nil, request_options: {}) ⇒ Onlyfans::Models::Settings::BlockedCountryUpdateResponse
Some parameter documentations has been truncated, see Models::Settings::BlockedCountryUpdateParams for more details.
Updates the countries blocked from viewing the account.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/onlyfans/resources/settings/blocked_countries.rb', line 45 def update(account, params) parsed, = Onlyfans::Settings::BlockedCountryUpdateParams.dump_request(params) @client.request( method: :put, path: ["api/%1$s/settings/blocked-countries", account], body: parsed, model: Onlyfans::Models::Settings::BlockedCountryUpdateResponse, options: ) end |