Class: Verizon::CallbackRegistered

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/callback_registered.rb

Overview

Registered callback listener.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(account_name = nil, name = nil) ⇒ CallbackRegistered

Returns a new instance of CallbackRegistered.



39
40
41
42
# File 'lib/verizon/models/callback_registered.rb', line 39

def initialize( = nil, name = nil)
  @account_name = 
  @name = name
end

Instance Attribute Details

#account_nameString

The billing account number for which callback messages will be sent.

Returns:

  • (String)


14
15
16
# File 'lib/verizon/models/callback_registered.rb', line 14

def 
  @account_name
end

#nameString

The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.

Returns:

  • (String)


19
20
21
# File 'lib/verizon/models/callback_registered.rb', line 19

def name
  @name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/verizon/models/callback_registered.rb', line 45

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('accountName') ? hash['accountName'] : nil
  name = hash.key?('name') ? hash['name'] : nil

  # Create object from extracted values.
  CallbackRegistered.new(,
                         name)
end

.namesObject

A mapping from model property names to API property names.



22
23
24
25
26
27
# File 'lib/verizon/models/callback_registered.rb', line 22

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_name'] = 'accountName'
  @_hash['name'] = 'name'
  @_hash
end

.nullablesObject

An array for nullable fields



35
36
37
# File 'lib/verizon/models/callback_registered.rb', line 35

def self.nullables
  []
end

.optionalsObject

An array for optional fields



30
31
32
# File 'lib/verizon/models/callback_registered.rb', line 30

def self.optionals
  []
end