Class: Afipws::PersonaServiceA100

Inherits:
Object
  • Object
show all
Defined in:
lib/afipws/persona_service_a100.rb

Constant Summary collapse

WSDL =
{
  development: 'https://awshomo.afip.gov.ar/sr-parametros/webservices/parameterServiceA100?WSDL',
  production: 'https://aws.afip.gov.ar/sr-parametros/webservices/parameterServiceA100?WSDL',
  test: Root + '/spec/fixtures/ws_sr_padron_a100.wsdl'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ PersonaServiceA100

Returns a new instance of PersonaServiceA100.



11
12
13
14
15
# File 'lib/afipws/persona_service_a100.rb', line 11

def initialize options = {}
  @cuit = options[:cuit]
  @wsaa = WSAA.new options.merge(service: 'ws_sr_padron_a100')
  @client = Client.new Hash(options[:savon]).reverse_merge(wsdl: WSDL[@wsaa.env], soap_version: 1)
end

Instance Attribute Details

#wsaaObject (readonly)

Returns the value of attribute wsaa.



9
10
11
# File 'lib/afipws/persona_service_a100.rb', line 9

def wsaa
  @wsaa
end

Instance Method Details

#company_typesObject



25
26
27
# File 'lib/afipws/persona_service_a100.rb', line 25

def company_types
  get_parameter_collection_by_name 'SUPA.TIPO_EMPRESA_JURIDICA'
end

#dummyObject



17
18
19
# File 'lib/afipws/persona_service_a100.rb', line 17

def dummy
  request(:dummy)[:return]
end

#jurisdictionsObject



21
22
23
# File 'lib/afipws/persona_service_a100.rb', line 21

def jurisdictions
  get_parameter_collection_by_name 'SUPA.E_PROVINCIA'
end

#public_organismsObject



29
30
31
# File 'lib/afipws/persona_service_a100.rb', line 29

def public_organisms
  get_parameter_collection_by_name 'SUPA.E_ORGANISMO_INFORMANTE'
end