Class: Facturama::Services::CatalogService

Inherits:
CrudService show all
Defined in:
lib/facturama/services/catalog_service.rb

Instance Method Summary collapse

Methods inherited from CrudService

#create, #list, #remove, #retrieve, #update

Methods inherited from HttpService

#delete, #get, #post, #put

Constructor Details

#initialize(connection_info) ⇒ CatalogService

Returns a new instance of CatalogService.



8
9
10
# File 'lib/facturama/services/catalog_service.rb', line 8

def initialize( connection_info )
    super(connection_info, "catalogs")
end

Instance Method Details

#currencies(keyword = nil) ⇒ Object



25
26
27
28
# File 'lib/facturama/services/catalog_service.rb', line 25

def currencies(keyword = nil)
    parameters = (keyword.to_s.empty?)? "" : "?keyword=" + keyword
    get("currencies" + parameters)
end

#name_idsObject



17
18
19
# File 'lib/facturama/services/catalog_service.rb', line 17

def name_ids
    get("NameIds")
end

#payment_formsObject



30
31
32
# File 'lib/facturama/services/catalog_service.rb', line 30

def payment_forms
    get("paymentforms")
end

#payment_methodsObject



34
35
36
# File 'lib/facturama/services/catalog_service.rb', line 34

def payment_methods
    get("paymentmethods")
end

#products_or_services(keyword) ⇒ Object



21
22
23
# File 'lib/facturama/services/catalog_service.rb', line 21

def products_or_services(keyword)
    get("ProductsOrServices?keyword="+keyword)
end

#units(keyword = nil) ⇒ Object



12
13
14
15
# File 'lib/facturama/services/catalog_service.rb', line 12

def units(keyword = nil)
    parameters = (keyword.to_s.empty?)? "" : "?keyword=" + keyword
    get("units" + parameters)
end