Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Gem to consume WEBFLEET.connect API.
The WEBFLEET.connect API connects software applications with the Webfleet fleet management solution. Via WEBFLEET.connect you can enhance the value of all types of business solutions, including routing and scheduling optimization, ERP, Transport Management System (TMS), supply chain planning, asset management, and much more.
Check also the version for:
Add this line to your application's Gemfile:
gem 'webfleet_connect'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install webfleet_connect
require 'webfleet_connect'
webfleet_connect = WebfleetConnect.create
response = webfleet_connect.show_object_report_extern
response.to_hash # [{:objectno=>"858EU4", :objectname=>"YRT-MMD2439", :objectclassname=>"sales", ...
WebfleetConnect.create
returns a new WebfleetConnect::Session
object which has the capabilities to request info from the WEBFLEET.connect API.
The Webfleet credential are taken from the env variables WEBFLEET_CONNECT_ACCOUNT
, WEBFLEET_CONNECT_USERNAME
, WEBFLEET_CONNECT_PASSWORD
and WEBFLEET_CONNECT_APIKEY
(if you want to know more about env variables check this link).
If your system needs to work with multiple accounts or you need to specify the credentials dynamically for some other reason, you can do it this way:
webfleet_connect = WebfleetConnect.create(account: 'companyName', username: 'dev', password: 'VLm5PpiZST6U', apikey: 'ZSksD88s-F7Uf')
When you use one of the methods of this gem, like for example show_vehicle_report_extern
, this returns a WebfleetConnect::Response
object which you can do:
response = webfleet_connect.show_vehicle_report_extern
response.url # gets the url to fetch the informtion from WEBFLEET.connect
response.status_code # gets the status code of the request
response.to_s # returns the response message as plain text as is returned by WEBFLEET.connect
response.to_hash # returns the data as a ruby Array/Hash object
The methods available in this gem are the same that are documented in the WEBFLEET.connect docs page just changed from cammelCase to snake_case. See below the list of methods.
In order to add params to a request is as easy as passing a hash of options in the request like:
response = webfleet_connect.show_vehicle_report_extern(filterstring: 'ECO', objectgroupname: 'Vehiculos', ungroupedonly: true)
The rangefrom_string
and rangeto_string
can accept Time
objects:
start_date = Time.now
end_date = start_date + (60 * 60 * 24)
response = webfleet_connect.show_event_report_extern(range_pattern: :ud, rangefrom_string: start_date, rangeto_string: end_date)
The range_pattern
can accept the values
:today
,
:yesterday
,
:two_days_ago
,
:three_days_ago
,
:four_days_ago
,
:five_days_ago
,
:six_days_ago
,
:current_week
,
:last_week
,
:two_weeks_ago
,
:three_weeks_ago
,
:floating_week
,
:last_floating_week
,
:two_floating_weeks_ago
,
:three_floating_weeks_ago
,
:current_month
,
:last_month
,
:two_months_ago
,
:three_months_ago
,
:user_defined_range
and
:ud
response = webfleet_connect.show_event_report_extern(range_pattern: :today)
The WebfleetConnect::Session
object works with the default configuration:
lang: :en, format: :csv, useUTF8: false, useISO8601: false
but you can change the default configuration when you create the object:
credentials = {
account: 'companyName',
username: 'dev',
password: 'VLm5PpiZST6U',
apikey: 'ZSksD88s-F7Uf'
}
config = {
lang: :de,
format: :json,
useUTF8: true
}
params = credentials.merge config
webfleet_connect = WebfleetConnect.create(params)
Mesage queues:
Objects:
Orders:
Messages:
Drivers:
Addresses:
Events:
Trips and working times:
Miscellaneous reports:
Geocoding and routing:
Configuration and security:
User management:
Vehicle maintenance:
Reporting:
Areas:
LINK.connect:
Plugins:
FAQs
Unknown package
We found that webfleet_connect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.