Class: Telnyx::Resources::MessagingOptouts
- Inherits:
-
Object
- Object
- Telnyx::Resources::MessagingOptouts
- Defined in:
- lib/telnyx/resources/messaging_optouts.rb
Overview
Opt-Out Management
Instance Method Summary collapse
-
#initialize(client:) ⇒ MessagingOptouts
constructor
private
A new instance of MessagingOptouts.
-
#list(created_at: nil, filter: nil, page_number: nil, page_size: nil, redaction_enabled: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingOptoutListResponse>
Some parameter documentations has been truncated, see Models::MessagingOptoutListParams for more details.
Constructor Details
#initialize(client:) ⇒ MessagingOptouts
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 MessagingOptouts.
45 46 47 |
# File 'lib/telnyx/resources/messaging_optouts.rb', line 45 def initialize(client:) @client = client end |
Instance Method Details
#list(created_at: nil, filter: nil, page_number: nil, page_size: nil, redaction_enabled: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::MessagingOptoutListResponse>
Some parameter documentations has been truncated, see Models::MessagingOptoutListParams for more details.
Retrieve a list of opt-out blocks.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/telnyx/resources/messaging_optouts.rb', line 29 def list(params = {}) parsed, = Telnyx::MessagingOptoutListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "messaging_optouts", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::MessagingOptoutListResponse, options: ) end |