Class: MTProto::TL::SendCode
- Inherits:
-
Object
- Object
- MTProto::TL::SendCode
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/send_code.rb
Instance Attribute Summary collapse
-
#api_hash ⇒ Object
readonly
Returns the value of attribute api_hash.
-
#api_id ⇒ Object
readonly
Returns the value of attribute api_id.
-
#phone_number ⇒ Object
readonly
Returns the value of attribute phone_number.
Instance Method Summary collapse
-
#initialize(phone_number:, api_id:, api_hash:) ⇒ SendCode
constructor
A new instance of SendCode.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(phone_number:, api_id:, api_hash:) ⇒ SendCode
Returns a new instance of SendCode.
10 11 12 13 14 |
# File 'lib/mtproto/tl/objects/send_code.rb', line 10 def initialize(phone_number:, api_id:, api_hash:) @phone_number = phone_number @api_id = api_id @api_hash = api_hash end |
Instance Attribute Details
#api_hash ⇒ Object (readonly)
Returns the value of attribute api_hash.
8 9 10 |
# File 'lib/mtproto/tl/objects/send_code.rb', line 8 def api_hash @api_hash end |
#api_id ⇒ Object (readonly)
Returns the value of attribute api_id.
8 9 10 |
# File 'lib/mtproto/tl/objects/send_code.rb', line 8 def api_id @api_id end |
#phone_number ⇒ Object (readonly)
Returns the value of attribute phone_number.
8 9 10 |
# File 'lib/mtproto/tl/objects/send_code.rb', line 8 def phone_number @phone_number end |
Instance Method Details
#serialize ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/mtproto/tl/objects/send_code.rb', line 16 def serialize u32_b(Constructors::AUTH_SEND_CODE) + serialize_tl_string(@phone_number) + u32_b(@api_id) + serialize_tl_string(@api_hash) + code_settings end |