Class: MercadoPublicoCl::TenderDates

Inherits:
Data
  • Object
show all
Defined in:
lib/mercado_publico_cl/value_objects/tender_dates.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#awardObject (readonly)

Returns the value of attribute award

Returns:

  • (Object)

    the current value of award



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def award
  @award
end

#closingObject (readonly)

Returns the value of attribute closing

Returns:

  • (Object)

    the current value of closing



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def closing
  @closing
end

#creationObject (readonly)

Returns the value of attribute creation

Returns:

  • (Object)

    the current value of creation



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def creation
  @creation
end

#documents_deliveryObject (readonly)

Returns the value of attribute documents_delivery

Returns:

  • (Object)

    the current value of documents_delivery



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def documents_delivery
  @documents_delivery
end

#economic_openingObject (readonly)

Returns the value of attribute economic_opening

Returns:

  • (Object)

    the current value of economic_opening



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def economic_opening
  @economic_opening
end

#estimated_awardObject (readonly)

Returns the value of attribute estimated_award

Returns:

  • (Object)

    the current value of estimated_award



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def estimated_award
  @estimated_award
end

#estimated_signingObject (readonly)

Returns the value of attribute estimated_signing

Returns:

  • (Object)

    the current value of estimated_signing



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def estimated_signing
  @estimated_signing
end

#evaluation_timeObject (readonly)

Returns the value of attribute evaluation_time

Returns:

  • (Object)

    the current value of evaluation_time



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def evaluation_time
  @evaluation_time
end

#finalObject (readonly)

Returns the value of attribute final

Returns:

  • (Object)

    the current value of final



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def final
  @final
end

#physical_supportObject (readonly)

Returns the value of attribute physical_support

Returns:

  • (Object)

    the current value of physical_support



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def physical_support
  @physical_support
end

#publicationObject (readonly)

Returns the value of attribute publication

Returns:

  • (Object)

    the current value of publication



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def publication
  @publication
end

#questions_publicationObject (readonly)

Returns the value of attribute questions_publication

Returns:

  • (Object)

    the current value of questions_publication



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def questions_publication
  @questions_publication
end

#rawObject (readonly)

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def raw
  @raw
end

#site_visitObject (readonly)

Returns the value of attribute site_visit

Returns:

  • (Object)

    the current value of site_visit



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def site_visit
  @site_visit
end

#startObject (readonly)

Returns the value of attribute start

Returns:

  • (Object)

    the current value of start



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def start
  @start
end

#technical_openingObject (readonly)

Returns the value of attribute technical_opening

Returns:

  • (Object)

    the current value of technical_opening



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def technical_opening
  @technical_opening
end

#user_datesObject (readonly)

Returns the value of attribute user_dates

Returns:

  • (Object)

    the current value of user_dates



4
5
6
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 4

def user_dates
  @user_dates
end

Class Method Details

.from_payload(raw) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 23

def self.from_payload(raw)
  return nil if raw.nil? || raw.empty?

  new(
    creation: Resources::Base.parse_date(raw["FechaCreacion"]),
    closing: Resources::Base.parse_date(raw["FechaCierre"]),
    start: Resources::Base.parse_date(raw["FechaInicio"]),
    final: Resources::Base.parse_date(raw["FechaFinal"]),
    questions_publication: Resources::Base.parse_date(raw["FechaPubRespuestas"]),
    technical_opening: Resources::Base.parse_date(raw["FechaActoAperturaTecnica"]),
    economic_opening: Resources::Base.parse_date(raw["FechaActoAperturaEconomica"]),
    publication: Resources::Base.parse_date(raw["FechaPublicacion"]),
    award: Resources::Base.parse_date(raw["FechaAdjudicacion"]),
    estimated_award: Resources::Base.parse_date(raw["FechaEstimadaAdjudicacion"]),
    physical_support: Resources::Base.parse_date(raw["FechaSoporteFisico"]),
    evaluation_time: Resources::Base.parse_date(raw["FechaTiempoEvaluacion"]),
    estimated_signing: Resources::Base.parse_date(raw["FechaEstimadaFirma"]),
    site_visit: Resources::Base.parse_date(raw["FechaVisitaTerreno"]),
    documents_delivery: Resources::Base.parse_date(raw["FechaEntregaAntecedentes"]),
    user_dates: raw["FechasUsuario"],
    raw: raw
  )
end

Instance Method Details

#inspectObject Also known as: to_s



47
48
49
# File 'lib/mercado_publico_cl/value_objects/tender_dates.rb', line 47

def inspect
  "#<TenderDates publication=#{publication} closing=#{closing} award=#{award}>"
end