Class: Zavudev::Models::InvitationCreateParams

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

Overview

See Also:

  • Zavudev::Resources::Invitations#create

Defined Under Namespace

Modules: ConnectionType

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(allowed_phone_countries: nil, client_email: nil, client_name: nil, client_phone: nil, connection_type: nil, expires_in_days: nil, phone_number_id: nil, request_options: {}) ⇒ Object

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

Parameters:

  • allowed_phone_countries (Array<String>) (defaults to: nil)

    ISO country codes for allowed phone numbers. Only valid when connectionType is

  • client_email (String) (defaults to: nil)

    Email of the client being invited.

  • client_name (String) (defaults to: nil)

    Name of the client being invited.

  • client_phone (String) (defaults to: nil)

    Phone number of the client in E.164 format.

  • connection_type (Symbol, Zavudev::Models::InvitationCreateParams::ConnectionType) (defaults to: nil)

    Which Meta channel the client connects, and how.

  • expires_in_days (Integer) (defaults to: nil)

    Number of days until the invitation expires.

  • phone_number_id (String) (defaults to: nil)

    ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,

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


# File 'lib/zavudev/models/invitation_create_params.rb', line 72

Instance Attribute Details

#allowed_phone_countriesArray<String>?

ISO country codes for allowed phone numbers. Only valid when connectionType is whatsapp_waba — sending it with messenger returns 400.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


15
16
17
# File 'lib/zavudev/models/invitation_create_params.rb', line 15

optional :allowed_phone_countries,
Zavudev::Internal::Type::ArrayOf[String],
api_name: :allowedPhoneCountries

#client_emailString?

Email of the client being invited.

Parameters:

  • (String)

Returns:

  • (String, nil)


23
# File 'lib/zavudev/models/invitation_create_params.rb', line 23

optional :client_email, String, api_name: :clientEmail

#client_nameString?

Name of the client being invited.

Parameters:

  • (String)

Returns:

  • (String, nil)


29
# File 'lib/zavudev/models/invitation_create_params.rb', line 29

optional :client_name, String, api_name: :clientName

#client_phoneString?

Phone number of the client in E.164 format.

Parameters:

  • (String)

Returns:

  • (String, nil)


35
# File 'lib/zavudev/models/invitation_create_params.rb', line 35

optional :client_phone, String, api_name: :clientPhone

#connection_typeSymbol, ...

Which Meta channel the client connects, and how.

  • whatsapp_waba (default): Meta's embedded signup links an official WhatsApp Business Account. Accepts phoneNumberId and allowedPhoneCountries.
  • messenger: the client authorizes with Facebook and picks a Facebook Page they administer. The Page's Messenger inbox — including Marketplace chats — is routed to Zavu. They must be an admin of at least one Page. A Page can only be connected to one Zavu project at a time: if the client picks a Page that another project already connected, the newer connection wins and the older one is disconnected.

One invitation connects one channel. To onboard a client on several channels, create one invitation per channel; each completes into its own sender.



53
54
55
# File 'lib/zavudev/models/invitation_create_params.rb', line 53

optional :connection_type,
enum: -> { Zavudev::InvitationCreateParams::ConnectionType },
api_name: :connectionType

#expires_in_daysInteger?

Number of days until the invitation expires.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


61
# File 'lib/zavudev/models/invitation_create_params.rb', line 61

optional :expires_in_days, Integer, api_name: :expiresInDays

#phone_number_idString?

ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided, the client will use this number instead of their own. Only valid when connectionType is whatsapp_waba — sending it with messenger returns 400, since a Facebook Page has no phone number.

Parameters:

  • (String)

Returns:

  • (String, nil)


70
# File 'lib/zavudev/models/invitation_create_params.rb', line 70

optional :phone_number_id, String, api_name: :phoneNumberId

Instance Method Details

#to_hash{

Returns:

  • ({)


60
# File 'sig/zavudev/models/invitation_create_params.rbs', line 60

def to_hash: -> {