Class: Facturama::FacturamaApiWeb

Inherits:
Object
  • Object
show all
Defined in:
lib/facturama/facturama_api_web.rb

Instance Method Summary collapse

Constructor Details

#initialize(facturama_user, facturama_password, is_development = true) ⇒ FacturamaApiWeb

Returns a new instance of FacturamaApiWeb.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/facturama/facturama_api_web.rb', line 13

def initialize(facturama_user, facturama_password, is_development = true)

    @connection_info = Facturama::Models::ConnectionInfo.new(facturama_user, facturama_password, is_development)

    @client_service = Facturama::Services::ClientService.new(@connection_info)
    @product_service = Facturama::Services::ProductService.new(@connection_info)
    @catalog_service = Facturama::Services::CatalogService.new(@connection_info)
    @branch_office_service = Facturama::Services::BranchOfficeService.new(@connection_info)
    @cfdi_service = Facturama::Services::CfdiService.new(@connection_info)

end

Instance Method Details

#branch_officeObject

Lugares de expedición (Sucursales)



42
43
44
# File 'lib/facturama/facturama_api_web.rb', line 42

def branch_office
    @branch_office_service
end

#catalogObject

Catálogo



37
38
39
# File 'lib/facturama/facturama_api_web.rb', line 37

def catalog
    @catalog_service
end

#cfdisObject

CFDI (Facturas)



47
48
49
# File 'lib/facturama/facturama_api_web.rb', line 47

def cfdis
    @cfdi_service
end

#clientsObject

Clientes



27
28
29
# File 'lib/facturama/facturama_api_web.rb', line 27

def clients
    @client_service
end

#productsObject

Artículos ( Productos o servicios para los conceptos )



32
33
34
# File 'lib/facturama/facturama_api_web.rb', line 32

def products
  @product_service
end