Class: Sigiss::Provider

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, Extension
Defined in:
lib/sigiss/provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Extension

#to_hash

Constructor Details

#initialize(attributes = {}) ⇒ Provider

Returns a new instance of Provider.



11
12
13
14
15
16
17
# File 'lib/sigiss/provider.rb', line 11

def initialize(attributes = {})
  @ccm = attributes[:ccm]
  @cnpj = attributes[:cnpj]
  @senha = attributes[:senha]
  @crc = attributes[:crc]
  @crc_estado = attributes[:crc_estado]
end

Instance Attribute Details

#ccmObject

Returns the value of attribute ccm.



7
8
9
# File 'lib/sigiss/provider.rb', line 7

def ccm
  @ccm
end

#cnpjObject

Returns the value of attribute cnpj.



7
8
9
# File 'lib/sigiss/provider.rb', line 7

def cnpj
  @cnpj
end

#crcObject

Returns the value of attribute crc.



7
8
9
# File 'lib/sigiss/provider.rb', line 7

def crc
  @crc
end

#crc_estadoObject

Returns the value of attribute crc_estado.



7
8
9
# File 'lib/sigiss/provider.rb', line 7

def crc_estado
  @crc_estado
end

#senhaObject

Returns the value of attribute senha.



7
8
9
# File 'lib/sigiss/provider.rb', line 7

def senha
  @senha
end

Instance Method Details

#to_cancelObject



23
24
25
# File 'lib/sigiss/provider.rb', line 23

def to_cancel
  { cnpj: @cnpj, ccm: @ccm, senha: @senha }
end

#to_fetchObject



19
20
21
# File 'lib/sigiss/provider.rb', line 19

def to_fetch
  { prestador_cnpj: @cnpj, prestador_ccm: @ccm }
end