Class: Verizon::PlaceOfUse
- Defined in:
- lib/verizon/models/place_of_use.rb
Overview
The customer name and the address of the device’s primary place of use. Leave these fields empty to use the account profile address as the primary place of use. These values will be applied to all devices in the request.If the account is enabled for non-geographic MDNs and the device supports it, the primaryPlaceOfUse address will also be used to derive the MDN for the device.
Instance Attribute Summary collapse
-
#address ⇒ Address
The customer address for the line’s primary place of use, for line usage taxation.
-
#customer_name ⇒ CustomerName
The customer name to be used for line usage taxation.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(address = nil, customer_name = nil) ⇒ PlaceOfUse
constructor
A new instance of PlaceOfUse.
Methods inherited from BaseModel
Constructor Details
#initialize(address = nil, customer_name = nil) ⇒ PlaceOfUse
Returns a new instance of PlaceOfUse.
44 45 46 47 |
# File 'lib/verizon/models/place_of_use.rb', line 44 def initialize(address = nil, customer_name = nil) @address = address @customer_name = customer_name end |
Instance Attribute Details
#address ⇒ Address
The customer address for the line’s primary place of use, for line usage taxation.
20 21 22 |
# File 'lib/verizon/models/place_of_use.rb', line 20 def address @address end |
#customer_name ⇒ CustomerName
The customer name to be used for line usage taxation.
24 25 26 |
# File 'lib/verizon/models/place_of_use.rb', line 24 def customer_name @customer_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/verizon/models/place_of_use.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address = Address.from_hash(hash['address']) if hash['address'] customer_name = CustomerName.from_hash(hash['customerName']) if hash['customerName'] # Create object from extracted values. PlaceOfUse.new(address, customer_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 |
# File 'lib/verizon/models/place_of_use.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['address'] = 'address' @_hash['customer_name'] = 'customerName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/verizon/models/place_of_use.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 |
# File 'lib/verizon/models/place_of_use.rb', line 35 def self.optionals [] end |