0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
This gem allow you to consume the chilean citybox SOAP API in a simple way
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

 Project Readme

CityboxApi

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/citybox_api. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'citybox_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install citybox_api

Usage

This is a Ruby wrapper for Citybox SOAP API

Configure CityboxApi

CityboxApi.configure do |config|
	config.user  = your_user
	config.key = your_password
end

In this version of citybox_api gem you can use all the 21 API services:

  • Regions Services:

    @regions_services = CityboxApi::Regions.new

    1. @regions_services.list_regions # return a list with all availables regions

    2. @regions_services.list_comunes # return a list with all availables communes

    3. @regions_services.list_comunes_by_region(region_id) # return a list with all availables communes for region with id 'region_id'

  • Branch Offices Services

    @branch_offices_services = CityboxApi::BranchOffices.new

    1. @branch_offices_services.list_branch_offices # return a list with all availables branch offices

    2. @branch_offices_services.list_branch_offices_by_commune(commune_id) # return a list with all availables branch offices for commue with id 'commune_id'

    3. @branch_offices_services.list_branch_offices_near_to(street_name: '', street_number: '', commune_name: '') # return a list with all availables branch offices near to especific location

  • Shipments

    @shipments = CityboxApi::Shipments.new

    1. @shipments.allow_shipment # sent an allow shipping request => 'admitirEnvio' Service

    2. @shipments.validate_shipment # send a validate shipment request => 'validarEnvio' service

    3. @shipments.cancel_shipment # send a cancel shipment request => 'anularEnvio' service

  • Take ups

    @take_ups = CityboxApi::TakeUps.new

    1. @take_ups.register # send a register take up request => 'reistrarRetiro' service
  • Tariff

    @tariff = CityboxApi::Tariff.new

    1. @tariff.apply_tariff_to_person # send an apply tariff to person request => 'aplicarTarifaPersona' service

    2. @tariff.see_scope # see scope => 'consultarCobertura' service

    3. @tariff.see_scope_by_product # see scope by product => 'consultarCoberturaPorProducto' service

    4. @tariff.see_products_by_client # see products by client => 'consultaProductosPorCliente' service

  • Utilities

    @utilities = CityboxApi::Utilities.new

    1. @utilities.list_cityboxes # list available cityboxes => 'listarCityboxDisponibles' service

    2. @utilities.list_master_products # list master products => 'listarMaestroProductos' service

    3. @utilities.list_countries # list countries => 'listarTodosLosPaises' service

    4. @utilities.see_scl_documents # see scl documents => 'consultaDocumentosSCL' service

    5. @utilities.see_fivps # see fivps => 'consultaFIVPS' service

    6. @utilities.normalize_address # return a hash with normalized address => 'normalizarDireccion' service

    7. @utilities.claim_status # see clain status => 'consultaEstadoDeReclamo' service

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/citybox_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.