Class: Telegram::Bot::Types::Contact

Inherits:
Base
  • Object
show all
Defined in:
sig/telegram/bot/types/contact.rbs

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Methods included from Compactable

#to_compact_hash, #to_json

Methods included from PatternMatching

#deconstruct_keys

Instance Attribute Details

#first_nameString (readonly)

Returns the value of attribute first_name.

Returns:

  • (String)


9
10
11
# File 'sig/telegram/bot/types/contact.rbs', line 9

def first_name
  @first_name
end

#last_nameString? (readonly)

Returns the value of attribute last_name.

Returns:

  • (String, nil)


10
11
12
# File 'sig/telegram/bot/types/contact.rbs', line 10

def last_name
  @last_name
end

#phone_numberString (readonly)

Returns the value of attribute phone_number.

Returns:

  • (String)


8
9
10
# File 'sig/telegram/bot/types/contact.rbs', line 8

def phone_number
  @phone_number
end

#user_idInteger? (readonly)

Returns the value of attribute user_id.

Returns:

  • (Integer, nil)


11
12
13
# File 'sig/telegram/bot/types/contact.rbs', line 11

def user_id
  @user_id
end

#vcardString? (readonly)

Returns the value of attribute vcard.

Returns:

  • (String, nil)


12
13
14
# File 'sig/telegram/bot/types/contact.rbs', line 12

def vcard
  @vcard
end

Class Method Details

.new(phone_number:, first_name:, last_name:, user_id:, vcard:) ⇒ instance .new(attributes) ⇒ instance

Overloads:

  • .new(phone_number:, first_name:, last_name:, user_id:, vcard:) ⇒ instance

    Parameters:

    • phone_number: (String)
    • first_name: (String)
    • last_name: (String)
    • user_id: (Integer)
    • vcard: (String)

    Returns:

    • (instance)
  • .new(attributes) ⇒ instance

    Parameters:

    • attributes (Hash[Symbol | String, untyped])

    Returns:

    • (instance)


6
7
# File 'sig/telegram/bot/types/contact.rbs', line 6

def self.new: (phone_number: String, first_name: String, ?last_name: String, ?user_id: Integer, ?vcard: String) -> instance
| (?Hash[Symbol | String, untyped] attributes) -> instance