https://github.com/ademdc/in-time-ruby
Ruby InTime client
https://github.com/ademdc/in-time-ruby
Last synced: 2 months ago
JSON representation
Ruby InTime client
- Host: GitHub
- URL: https://github.com/ademdc/in-time-ruby
- Owner: ademdc
- Created: 2022-08-08T17:26:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-09T14:19:22.000Z (over 3 years ago)
- Last Synced: 2025-02-13T04:47:51.133Z (11 months ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# In Time Ruby
Ruby client for In Time shipment tracker and parcel creator
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'in-time-ruby', '0.0.3'
```
...followed with:
```
bundle install
```
Or install it with:
```
gem install in-time-ruby
```
## Usage
```
connection = InTimeRuby::Connection.new(url, client_id, client_secret)
```
### Get shipment
```
connection.get_shipment(id)
```
### Create shipment
```
opts = {
"billingCode": "string",
"serviceTypeCode": "string",
"collectionDateTimeFrom": "2022-08-08T17:30:08.040Z",
"collectionDateTimeTo": "2022-08-08T17:30:08.040Z",
"deliveryDateTimeFrom": "2022-08-08T17:30:08.040Z",
"deliveryDateTimeTo": "2022-08-08T17:30:08.040Z",
"shipFromContactName": "string",
"shipFromContactPhone": "string",
"shipFromEmail": "string",
"shipFromCompanyName": "string",
"shipFromStreet1": "string",
"shipFromStreet2": "string",
"shipFromStreet3": "string",
"shipFromPostalCode": "string",
"shipFromCity": "string",
"shipFromCountry": "string",
"shipFromContactTypeCode": "string",
"shipToContactName": "string",
"shipToContactPhone": "string",
"shipToEmail": "string",
"shipToCompanyName": "string",
"shipToStreet1": "string",
"shipToStreet2": "string",
"shipToStreet3": "string",
"shipToPostalCode": "string",
"shipToCity": "string",
"shipToCountry": "string",
"shipToContactTypeCode": "string",
"productDescription": "string",
"goodsValue": 0,
"goodsValueCurrencyCode": "string",
"parcelQuantity": 0,
"weight": 0,
"pickupNote": "string",
"specialNote": "string",
"costCenterCode": "string",
"deliveryNote": "string",
"packageTypeCode": "string",
"cashOnDelivery": 0,
"externalNumber": "string",
"externalNumber2": "string",
"documentationReturn": true,
"personallyHandover": true,
"fragile": true,
"specialPackaging": true,
"shippingDocument": "string",
"parcelReturnQuantity": 0,
"insurance": true
}
connection.create_parcel(opts)
```
### Confirm shipment by tracking number
```
connection.confirm_shipment(tracking_number)
```
## Thank you for using InTimeRuby!