module Deliveries
“codigoOficina”=>“4894006”, “nombreOficina”=>“OF.CORREOS: LAMIAKO - 4894006”, “direccionOficina”=>“LANGILERIA 88”, “codigoPostalOficina”=>“48940”, “poblacionOficina”=>“LAMIAKO”, “horarioOficina”=>“L-V:DE 08:30 A 14:30/S:DE 09:30 A 13:00/Festivos:SIN SERVICIO”, “horarioOficinaVerano”=>“L-V:08:30-14:30/S:09:30-13:00/Festivos:SIN SERVICIO”, “geoposicionOficina”=>“43.32142,-3.00031”
Deliveries.courier
(‘mondial_relay’).get_collection_point(point_id: 23191, country: ‘ES’)
DELIVERY MODES: 24R: Point relais delivery 24L: POint relais XL delivery 24X: Point relais XXL delivery DRI: Colis drive delivery LD1: Home delivery(1 delivery man) LDS: Home delivery(2 delivery men) HOM: Home delivery < 30kg HOC: Home delivery (specific for Spain) LCC: Reverse
Constants
- VERSION
Public Class Methods
courier(courier_id)
click to toggle source
# File lib/deliveries.rb, line 55 def self.courier(courier_id) Couriers.const_get(courier_id.to_s.downcase.split('_').map(&:capitalize).join) end
debug()
click to toggle source
# File lib/deliveries.rb, line 47 def self.debug instance_variable_get(:@debug) == true end
debug=(debug)
click to toggle source
# File lib/deliveries.rb, line 51 def self.debug=(debug) instance_variable_set :@debug, debug end
get_collection_point(global_point_id)
click to toggle source
# File lib/deliveries.rb, line 59 def self.get_collection_point(global_point_id) global_point = CollectionPoint.parse_global_point_id global_point_id: global_point_id courier(global_point.courier_id).get_collection_point global_point_id: global_point_id end
live?()
click to toggle source
# File lib/deliveries.rb, line 35 def self.live? mode == :live end
logger()
click to toggle source
# File lib/deliveries.rb, line 39 def self.logger instance_variable_get :@logger end
logger=(logger)
click to toggle source
# File lib/deliveries.rb, line 43 def self.logger=(logger) instance_variable_set :@logger, logger end
mode()
click to toggle source
# File lib/deliveries.rb, line 16 def self.mode if instance_variable_defined? :@mode instance_variable_get :@mode else :test end end
mode=(mode)
click to toggle source
# File lib/deliveries.rb, line 24 def self.mode=(mode) mode = mode&.to_sym raise "Invalid mode #{mode}" unless %i[live test].include?(mode) instance_variable_set :@mode, mode end
test?()
click to toggle source
# File lib/deliveries.rb, line 31 def self.test? mode == :test end