Class: Zavudev::Models::ContactListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/zavudev/models/contact_list_params.rb,
sig/zavudev/models/contact_list_params.rbs

Overview

See Also:

  • Zavudev::Resources::Contacts#list

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(cursor: nil, limit: nil, phone_number: nil, search: nil, tag: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Zavudev::Models::ContactListParams for more details.

Parameters:

  • cursor (String) (defaults to: nil) —

    Opaque cursor from a previous response's nextCursor. Do not construct it.

  • limit (Integer) (defaults to: nil)
  • phone_number (String) (defaults to: nil) —

    Exact match on the contact's primary phone number, in E.164.

  • search (String) (defaults to: nil) —

    Free-text match over the contact's name (displayName and the WhatsApp profile

  • tag (Array<String>) (defaults to: nil) —

    Tag name. Repeatable: ?tag=vip&tag=chile returns contacts carrying every t

  • request_options (Zavudev::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/zavudev/models/contact_list_params.rb', line 54

Instance Attribute Details

#cursor ⇒ String?

Opaque cursor from a previous response's nextCursor. Do not construct it.

Parameters:

  • (String)

Returns:

  • (String, nil)


14
# File 'lib/zavudev/models/contact_list_params.rb', line 14

optional :cursor, String

#limit ⇒ Integer?

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


19
# File 'lib/zavudev/models/contact_list_params.rb', line 19

optional :limit, Integer

#phone_number ⇒ String?

Exact match on the contact's primary phone number, in E.164.

Parameters:

  • (String)

Returns:

  • (String, nil)


25
# File 'lib/zavudev/models/contact_list_params.rb', line 25

optional :phone_number, String

#search ⇒ String?

Free-text match over the contact's name (displayName and the WhatsApp profile name), phone numbers and email addresses. Case- and accent-insensitive. A phone number matches on a trailing fragment too, so 5551234 finds +14155551234.

Contacts created automatically from an inbound message have no displayName — they are matched by their identifier until you set one with PATCH /v1/contacts/{contactId}.

Results come back in relevance order rather than newest-first. cursor is opaque in both modes; pass back exactly what the previous response returned, and start a new pagination run when the search term changes.

Parameters:

  • (String)

Returns:

  • (String, nil)


41
# File 'lib/zavudev/models/contact_list_params.rb', line 41

optional :search, String

#tag ⇒ Array<String>?

Tag name. Repeatable: ?tag=vip&tag=chile returns contacts carrying every tag given, not any of them — the same rule the dashboard filter applies.

Tags are matched by name, case-insensitively. An unknown tag returns 400 rather than being ignored, because a typo that silently matched every contact would be a worse answer than an error.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


52
# File 'lib/zavudev/models/contact_list_params.rb', line 52

optional :tag, Zavudev::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


46
# File 'sig/zavudev/models/contact_list_params.rbs', line 46

def to_hash: -> {