Sha256: 053b6b170524839ce462bed020d4d18d6eca143b0fd9529665e78b5cc153ae2c
Contents?: true
Size: 988 Bytes
Versions: 5
Compression:
Stored size: 988 Bytes
Contents
class Cieloz::RequisicaoTransacao class DadosPedido include Cieloz::Helpers IDIOMAS = [ "PT", "EN", "ES" ] # portugues, ingles, espanhol attr_accessor :numero, :valor, :moeda, :data_hora, :descricao, :idioma, :soft_descriptor validates :numero, :valor, :moeda, :data_hora, presence: true validates :numero, length: { maximum: 20 } validates :valor, length: { maximum: 12 } validates :valor, numericality: { only_integer: true }, unless: "@valor.blank?" validates :descricao, length: { maximum: 1024 } validates :idioma, inclusion: { in: IDIOMAS } validates :soft_descriptor, length: { maximum: 13 } def attributes { numero: @numero, valor: @valor, moeda: @moeda, data_hora: @data_hora.strftime("%Y-%m-%dT%H:%M:%S"), descricao: @descricao, idioma: @idioma, soft_descriptor: @soft_descriptor } end end end
Version data entries
5 entries across 5 versions & 1 rubygems