Class: MercadoPublicoCl::POBuyer
- Inherits:
-
Data
- Object
- Data
- MercadoPublicoCl::POBuyer
- Defined in:
- lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb
Instance Attribute Summary collapse
-
#activity ⇒ Object
readonly
Returns the value of attribute activity.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#unit_address ⇒ Object
readonly
Returns the value of attribute unit_address.
-
#unit_code ⇒ Object
readonly
Returns the value of attribute unit_code.
-
#unit_comuna ⇒ Object
readonly
Returns the value of attribute unit_comuna.
-
#unit_name ⇒ Object
readonly
Returns the value of attribute unit_name.
-
#unit_region ⇒ Object
readonly
Returns the value of attribute unit_region.
-
#unit_rut ⇒ Object
readonly
Returns the value of attribute unit_rut.
Class Method Summary collapse
Instance Method Summary collapse
- #inspect ⇒ Object (also: #to_s)
Instance Attribute Details
#activity ⇒ Object (readonly)
Returns the value of attribute activity
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def activity @activity end |
#code ⇒ Object (readonly)
Returns the value of attribute code
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def code @code end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def contact @contact end |
#country ⇒ Object (readonly)
Returns the value of attribute country
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def country @country end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def raw @raw end |
#unit_address ⇒ Object (readonly)
Returns the value of attribute unit_address
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_address @unit_address end |
#unit_code ⇒ Object (readonly)
Returns the value of attribute unit_code
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_code @unit_code end |
#unit_comuna ⇒ Object (readonly)
Returns the value of attribute unit_comuna
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_comuna @unit_comuna end |
#unit_name ⇒ Object (readonly)
Returns the value of attribute unit_name
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_name @unit_name end |
#unit_region ⇒ Object (readonly)
Returns the value of attribute unit_region
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_region @unit_region end |
#unit_rut ⇒ Object (readonly)
Returns the value of attribute unit_rut
4 5 6 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 4 def unit_rut @unit_rut end |
Class Method Details
.from_payload(raw) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 18 def self.from_payload(raw) return nil if raw.nil? || raw.empty? new( code: Resources::Base.to_int(raw["CodigoOrganismo"]), name: raw["NombreOrganismo"], activity: raw["Actividad"], country: raw["Pais"], unit_code: raw["CodigoUnidad"], unit_name: raw["NombreUnidad"], unit_rut: raw["RutUnidad"], unit_address: raw["DireccionUnidad"], unit_comuna: raw["ComunaUnidad"], unit_region: raw["RegionUnidad"], contact: Contact.from_payload(raw), raw: raw ) end |
Instance Method Details
#inspect ⇒ Object Also known as: to_s
37 38 39 |
# File 'lib/mercado_publico_cl/value_objects/purchase_order_buyer.rb', line 37 def inspect "#<POBuyer code=#{code.inspect} name=#{name.inspect} unit=#{unit_name.inspect}>" end |