Module: FlowCl::Merchant

Included in:
Client
Defined in:
lib/flow_cl/merchant.rb

Instance Method Summary collapse

Instance Method Details

#create_merchant(params: {}) ⇒ Object

Este método permite crear un nuevo comercio asociado en Flow



23
24
25
26
27
# File 'lib/flow_cl/merchant.rb', line 23

def create_merchant(params: {})
  path = '/api/merchant/create'

  private_post(path, params)
end

#delete_merchant(id:) ⇒ Object

Este método permite eliminar un comercio asociado previamente creado en Flow



30
31
32
33
34
# File 'lib/flow_cl/merchant.rb', line 30

def delete_merchant(id:)
  path = '/api/merchant/delete'

  private_post(path, { id: id })
end

#edit_merchant(params: {}) ⇒ Object

Este método permite modificar un comercio asociado previamente creado en Flow



37
38
39
40
41
# File 'lib/flow_cl/merchant.rb', line 37

def edit_merchant(params: {})
  path = '/api/merchant/edit'

  private_post(path, params)
end

#merchant(id:) ⇒ Object

Este método permite obtener la información de un comercio asociado previamente creado en Flow



16
17
18
19
20
# File 'lib/flow_cl/merchant.rb', line 16

def merchant(id:)
  path = '/api/merchant/get'

  private_get(path, { id: id })
end

#merchants(params: {}) ⇒ Object

Permite obtener la lista de comercios paginada de acuerdo a los parámetros de paginación. Además, se puede definir los siguientes filtros: filter: filtro por nombre del comercio asociado status: filtro por estado del comercio asociado



9
10
11
12
13
# File 'lib/flow_cl/merchant.rb', line 9

def merchants(params: {})
  path = '/api/merchant/list'

  private_get(path, params)
end