deliveree_sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 771d30372fca7c547f44fa62e3433261449a7165216a5275cb43582fe76565b6
4
+ data.tar.gz: 24d37298e0b48a4f324ab49e06bae1f8836c278cc2ce8778ede33b6e4d7892ba
5
+ SHA512:
6
+ metadata.gz: df3144092c6e870e12ad370304a8d13a07e96a3e7b8ce65f08876363e29e516f73f255dbbb68ebb72e15e00d701eb2011b7fe5ebfa10708308bd53e55aa79aa2
7
+ data.tar.gz: b807f3ccedae3b145ea8271315d8ebf1220a8b7413596e6a399e09a0d849556162df10b50cb31a04a54d4e5ab9aac81b0f113b2734021159743a15074a3575f7
@@ -0,0 +1,11 @@
1
+ # Deliverree SDK build gem
2
+
3
+ ### Build a gem
4
+
5
+ Run command to build the Ruby code into a gem:
6
+
7
+ ```shell
8
+ bundle install
9
+
10
+ gem build deliveree_sdk.gemspec
11
+ ```
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ deliveree_sdk (1.0.0)
5
+ json (~> 2.1, >= 2.1.0)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ethon (0.12.0)
12
+ ffi (>= 1.3.0)
13
+ ffi (1.11.3)
14
+ json (2.2.0)
15
+ rake (12.0.0)
16
+ typhoeus (1.3.1)
17
+ ethon (>= 0.9.0)
18
+ vcr (3.0.3)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ deliveree_sdk!
25
+ rake (~> 12.0.0)
26
+ vcr (~> 3.0, >= 3.0.1)
27
+
28
+ BUNDLED WITH
29
+ 1.17.2
@@ -0,0 +1,153 @@
1
+ # Deliveree SDK guidelines
2
+
3
+ Deliveree - the Ruby gem for the Deliveree SDK
4
+
5
+ With Deliveree SDK, developers can integrate our on-demand local delivery platform into their applications. The SDK is designed for developers to check prices, book an immediate or scheduled delivery and follow updates until delivery completion.
6
+
7
+ - API version: 1.0.0
8
+ - Package version: 1.0.0
9
+ ## Installation
10
+
11
+ ### Install the gem locally:
12
+
13
+ ```shell
14
+ gem install ./deliveree_sdk-1.0.0.gem
15
+ ```
16
+ (for development, run `gem install --dev ./deliveree_sdk-1.0.0.gem` to install the development dependencies)
17
+
18
+ ## Getting Started
19
+
20
+ Please follow the [installation](#installation) procedure and then run the following code:
21
+
22
+ ### Application config
23
+ Adding the code bellow in your application.rb file
24
+ ```ruby
25
+ # Load the gem in your application
26
+ require 'deliveree_sdk'
27
+
28
+ # setup authorization
29
+ Deliveree.configure do |config|
30
+ # Configure API key authorization: ApiKeyAuth
31
+ config.api_key['Authorization'] = 'YOUR API KEY'
32
+ end
33
+
34
+ ```
35
+
36
+ # **1. Cancel booking api**
37
+ > cancel_booking(id, opts)
38
+
39
+ ### Example
40
+ ```ruby
41
+
42
+ api_instance = Deliveree::DelivereeApi.new
43
+ id = 56 # Integer | ID of delivery
44
+
45
+ opts = {
46
+ accept_language: 'en' # String |
47
+ }
48
+
49
+ begin
50
+ api_instance.cancel_booking(id, opts)
51
+ rescue Deliveree::ApiError => e
52
+ puts "Exception when calling DelivereeApi->cancel_booking: #{e}"
53
+ end
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ Name | Type | Description | Notes
59
+ ------------- | ------------- | ------------- | -------------
60
+ **id** | **Integer**| ID of delivery |
61
+ **accept_language** | **String**| | [optional] [default to en]
62
+
63
+ ### Return type
64
+
65
+ nil (empty response body)
66
+
67
+ # **2. Deliveries get quote api**
68
+ > ResponseWithData deliveries_get_quote(body, opts)
69
+
70
+ ### Example
71
+ ```ruby
72
+ api_instance = Deliveree::DelivereeApi.new
73
+
74
+ body = Deliveree::Quote.new # Quote |
75
+
76
+ opts = {
77
+ accept_language: 'en' # String |
78
+ }
79
+
80
+ begin
81
+ result = api_instance.deliveries_get_quote(body, opts)
82
+ p result
83
+ rescue Deliveree::ApiError => e
84
+ puts "Exception when calling DelivereeApi->deliveries_get_quote: #{e}"
85
+ end
86
+ ```
87
+
88
+ ### Parameters
89
+
90
+ Name | Type | Description | Notes
91
+ ------------- | ------------- | ------------- | -------------
92
+ **body** | [**Quote**](Quote.md)| |
93
+ **accept_language** | **String**| | [optional] [default to en]
94
+
95
+
96
+ # **3. Create delivery booking api**
97
+ > ResponseDefault deliveries_post(body, opts)
98
+
99
+ ### Example
100
+ ```ruby
101
+
102
+ api_instance = Deliveree::DelivereeApi.new
103
+
104
+ body = Deliveree::Delivery.new # Delivery |
105
+
106
+ opts = {
107
+ accept_language: 'en' # String |
108
+ }
109
+
110
+ begin
111
+ result = api_instance.deliveries_post(body, opts)
112
+ p result
113
+ rescue Deliveree::ApiError => e
114
+ puts "Exception when calling DelivereeApi->deliveries_post: #{e}"
115
+ end
116
+ ```
117
+
118
+ ### Parameters
119
+
120
+ Name | Type | Description | Notes
121
+ ------------- | ------------- | ------------- | -------------
122
+ **body** | [**Delivery**](Delivery.md)| |
123
+ **accept_language** | **String**| | [optional] [default to en]
124
+
125
+
126
+ ## Documentation for API Endpoints
127
+
128
+ All URIs are relative to *https:api.sandbox.deliveree.com//public_api/v1*
129
+
130
+ Class | Method | HTTP request | Description
131
+ ------------ | ------------- | ------------- | -------------
132
+ *Deliveree::DelivereeApi* | [**cancel_booking**](docs/DelivereeApi.md#cancel_booking) | **POST** /deliveries/{id}/cancel |
133
+ *Deliveree::DelivereeApi* | [**deliveries_get_quote**](docs/DelivereeApi.md#deliveries_get_quote) | **POST** /deliveries/get_quote |
134
+ *Deliveree::DelivereeApi* | [**deliveries_post**](docs/DelivereeApi.md#deliveries_post) | **POST** /deliveries |
135
+
136
+
137
+ ## Documentation for Models
138
+
139
+ - [Deliveree::Delivery](docs/Delivery.md)
140
+ - [Deliveree::Location](docs/Location.md)
141
+ - [Deliveree::PositionTracking](docs/PositionTracking.md)
142
+ - [Deliveree::Quote](docs/Quote.md)
143
+
144
+
145
+ ## Documentation for Authorization
146
+
147
+
148
+ ### ApiKeyAuth
149
+
150
+ - **Type**: API key
151
+ - **API key parameter name**: Authorization
152
+ - **Location**: HTTP header
153
+
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ =begin
3
+ #Deliveree SDK
4
+ #With Deliveree API, developers can integrate our on-demand local delivery platform into their applications. The API is designed for developers to check prices, book an immediate or scheduled delivery and follow updates until delivery completion.
5
+ Contact: duke@deliveree.com
6
+ =end
7
+
8
+ $:.push File.expand_path("../lib", __FILE__)
9
+ require "deliveree_client/version"
10
+
11
+ Gem::Specification.new do |s|
12
+ s.name = "deliveree_sdk"
13
+ s.version = Deliveree::VERSION
14
+ s.platform = Gem::Platform::RUBY
15
+ s.authors = ["TMA Team"]
16
+ s.email = ["duke@deliveree.com"]
17
+ s.homepage = "http://deliveree.com"
18
+ s.summary = "Deliveree SDK "
19
+ s.description = "With Deliveree SDK, developers can integrate our on-demand local delivery platform into their applications. The SDK is designed for developers to check prices, book an immediate or scheduled delivery and follow updates until delivery completion"
20
+ s.license = 'MIT'
21
+ s.required_ruby_version = ">= 1.9"
22
+
23
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
24
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
25
+
26
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
27
+
28
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
29
+ s.executables = []
30
+ s.require_paths = ["lib"]
31
+ end
@@ -0,0 +1,153 @@
1
+ # Deliveree::DelivereeApi
2
+
3
+ Method | HTTP request | Description
4
+ ------------- | ------------- | -------------
5
+ [**cancel_booking**](DelivereeApi.md#cancel_booking) | **POST** /deliveries/{id}/cancel |
6
+ [**deliveries_get_quote**](DelivereeApi.md#deliveries_get_quote) | **POST** /deliveries/get_quote |
7
+ [**deliveries_post**](DelivereeApi.md#deliveries_post) | **POST** /deliveries |
8
+
9
+
10
+ # **cancel_booking**
11
+ > cancel_booking(id, opts)
12
+
13
+
14
+ ### Example
15
+ ```ruby
16
+ # load the gem
17
+ require 'deliveree_sdk'
18
+ # setup authorization
19
+ Deliveree.configure do |config|
20
+ # Configure API key authorization: ApiKeyAuth
21
+ config.api_key['Authorization'] = 'YOUR API KEY'
22
+ end
23
+
24
+ api_instance = Deliveree::DelivereeApi.new
25
+
26
+ id = 56 # Integer | ID of delivery
27
+
28
+ opts = {
29
+ accept_language: 'en' # String |
30
+ }
31
+
32
+ begin
33
+ api_instance.cancel_booking(id, opts)
34
+ rescue Deliveree::ApiError => e
35
+ puts "Exception when calling DelivereeApi->cancel_booking: #{e}"
36
+ end
37
+ ```
38
+
39
+ ### Parameters
40
+
41
+ Name | Type | Description | Notes
42
+ ------------- | ------------- | ------------- | -------------
43
+ **id** | **Integer**| ID of delivery |
44
+ **accept_language** | **String**| | [optional] [default to en]
45
+
46
+ ### Return type
47
+
48
+ nil (empty response body)
49
+
50
+ ### Authorization
51
+
52
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
53
+
54
+ ### HTTP request headers
55
+
56
+ - **Content-Type**: application/json
57
+ - **Accept**: application/json
58
+
59
+
60
+
61
+ # **deliveries_get_quote**
62
+ > ResponseWithData deliveries_get_quote(body, opts)
63
+
64
+
65
+
66
+ ### Example
67
+ ```ruby
68
+ # load the gem
69
+ require 'deliveree_sdk'
70
+ # setup authorization
71
+ Deliveree.configure do |config|
72
+ # Configure API key authorization: ApiKeyAuth
73
+ config.api_key['Authorization'] = 'YOUR API KEY'
74
+ end
75
+
76
+ api_instance = Deliveree::DelivereeApi.new
77
+
78
+ body = Deliveree::Quote.new # Quote |
79
+
80
+ opts = {
81
+ accept_language: 'en' # String |
82
+ }
83
+
84
+ begin
85
+ result = api_instance.deliveries_get_quote(body, opts)
86
+ p result
87
+ rescue Deliveree::ApiError => e
88
+ puts "Exception when calling DelivereeApi->deliveries_get_quote: #{e}"
89
+ end
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ Name | Type | Description | Notes
95
+ ------------- | ------------- | ------------- | -------------
96
+ **body** | [**Quote**](Quote.md)| |
97
+ **accept_language** | **String**| | [optional] [default to en]
98
+
99
+ ### HTTP request headers
100
+
101
+ - **Content-Type**: application/json
102
+ - **Accept**: application/json
103
+
104
+
105
+ # **deliveries_post**
106
+ > ResponseDefault deliveries_post(body, opts)
107
+
108
+
109
+ ### Example
110
+ ```ruby
111
+ # load the gem
112
+ require 'deliveree_sdk'
113
+ # setup authorization
114
+ Deliveree.configure do |config|
115
+ # Configure API key authorization: ApiKeyAuth
116
+ config.api_key['Authorization'] = 'YOUR API KEY'
117
+ end
118
+
119
+ api_instance = Deliveree::DelivereeApi.new
120
+
121
+ body = Deliveree::Delivery.new # Delivery |
122
+
123
+ opts = {
124
+ accept_language: 'en' # String |
125
+ }
126
+
127
+ begin
128
+ result = api_instance.deliveries_post(body, opts)
129
+ p result
130
+ rescue Deliveree::ApiError => e
131
+ puts "Exception when calling DelivereeApi->deliveries_post: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ Name | Type | Description | Notes
138
+ ------------- | ------------- | ------------- | -------------
139
+ **body** | [**Delivery**](Delivery.md)| |
140
+ **accept_language** | **String**| | [optional] [default to en]
141
+
142
+
143
+ ### Authorization
144
+
145
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
146
+
147
+ ### HTTP request headers
148
+
149
+ - **Content-Type**: application/json
150
+ - **Accept**: application/json
151
+
152
+
153
+
@@ -0,0 +1,18 @@
1
+ # Deliveree::Delivery
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **vehicle_type_id** | **Integer** | | [required]
7
+ **note** | **String** | | [optional]
8
+ **time_type** | **String** | | [required]
9
+ **pickup_time** | **DateTime** | | [optional]
10
+ **job_order_number** | **String** | | [optional]
11
+ **allow_parking_fees** | **BOOLEAN** | | [optional]
12
+ **allow_tolls_fees** | **BOOLEAN** | | [optional]
13
+ **allow_waiting_time_fees** | **BOOLEAN** | | [optional]
14
+ **fleet_partner_id** | **Integer** | | [optional]
15
+ **container_size** | **String** | | [optional]
16
+ **locations** | [**Array<Location>**](Location.md) | | [required]
17
+
18
+
@@ -0,0 +1,19 @@
1
+ # Deliveree::Location
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **address** | **String** | | [required]
7
+ **latitude** | **Float** | | [required]
8
+ **longitude** | **Float** | | [required]
9
+ **recipient_name** | **String** | | [required]
10
+ **recipient_phone** | **String** | | [required]
11
+ **note** | **String** | | [optional]
12
+ **need_cod** | **BOOLEAN** | | [optional]
13
+ **cod_note** | **String** | | [optional]
14
+ **cod_invoice_fees** | **Float** | | [optional]
15
+ **need_pod** | **BOOLEAN** | | [optional]
16
+ **pod_note** | **String** | | [optional]
17
+ **position_trackings** | [**Array<PositionTracking>**](PositionTracking.md) | | [optional]
18
+
19
+