sendcloud-ruby 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 925c78de85ca4fb2cf19a3c3f3c405bd75317b99
4
- data.tar.gz: 6ac99e7ad7e5afbbfd070fedb88df7e67548352b
2
+ SHA256:
3
+ metadata.gz: 7db98652451bed9b8e5fc4a551d1ff3516dc35ab874f6613faee84e22b4e18b2
4
+ data.tar.gz: f148403eb51645e9f1141a1389ecfdce499e6fd23f597bd351d9452ff54f38c4
5
5
  SHA512:
6
- metadata.gz: f05aa4716beacaaf2918fd93b2aa02d45c1b69d7e3ff2553a766d9cadfcc1e77fec8479928a2d3036c4010a6bd4d9d16b30f3a71201ea22bd91c0d5b9e671541
7
- data.tar.gz: 3edc1714714bf6477ff289078e74075a99a084068c47eade006a159f5e89163ae00f8b81c5d16d1bc464222f170353f6af0af84936f3bfe43cd1d68594948413
6
+ metadata.gz: 80f922bdaf0f719107157eac852a755c81edc838359c09b9b8b6461f0d5784869c61e34fe30eb494f3602126fd14ba0dbd946defd5b53a3d0e5411c204c34be0
7
+ data.tar.gz: b2a73709efa916c4d84b860635f7d4830de1cf76cf6a30997776bbc78f9a2fa0ef61cac868efa84bab47d9a87da18c55c4cc7a33fef4dc82a1a276ae603879bb
data/README.md CHANGED
@@ -1,13 +1,6 @@
1
1
  # Sendcloud
2
2
 
3
- ***WORK IN PROGRESS***
4
-
5
- [![wercker status](https://app.wercker.com/status/03866f33222cc05a0e18eb2aac723f5c/m "wercker status")](https://app.wercker.com/project/bykey/03866f33222cc05a0e18eb2aac723f5c)
6
- [![Gem Version](https://badge.fury.io/rb/sendcloud.svg)](http://badge.fury.io/rb/sendcloud)
7
- [![Code Climate](https://codeclimate.com/github/pero-ict-solutions/sendcloud/badges/gpa.svg)](https://codeclimate.com/github/pero-ict-solutions/sendcloud)
8
- [![Test Coverage](https://codeclimate.com/github/pero-ict-solutions/sendcloud/badges/coverage.svg)](https://codeclimate.com/github/pero-ict-solutions/sendcloud)
9
-
10
- Documentation on [RubyDoc](http://www.rubydoc.info/github/pero-ict-solutions/sendcloud/master)
3
+ [![Gem Version](https://badge.fury.io/rb/sendcloud-ruby.svg)](https://badge.fury.io/rb/sendcloud-ruby)
11
4
 
12
5
  Ruby API Client for the [SendCloud](https://www.sendcloud.nl) delivery platform.
13
6
 
@@ -28,11 +21,11 @@ Or install it yourself as:
28
21
 
29
22
  ## Contributing
30
23
 
31
- 1. Fork it ( http://github.com/pero-ict-solutions/sendcloud/fork )
24
+ 1. Fork it ( http://github.com/peterberkenbosch/sendcloud/fork )
32
25
  2. Create your feature branch (`git checkout -b my-new-feature`)
33
26
  3. Commit your changes (`git commit -am 'Add some feature'`)
34
27
  4. Push to the branch (`git push origin my-new-feature`)
35
28
  5. Create new Pull Request
36
29
 
37
30
 
38
- Copyright (c) 2014-2015 PeRo ICT Solutions
31
+ Copyright (c) 2014-2018 Peter Berkenbosch Consultancy
@@ -13,8 +13,7 @@ module Sendcloud
13
13
  country: shipment_address.country,
14
14
  shipment: shipment,
15
15
  requestShipment: false
16
- }.merge(method_params).
17
- merge(telephone: '', email: '', data: [])
16
+ }.merge(method_params)
18
17
  }.to_json,
19
18
  basic_auth: auth,
20
19
  headers: {'Content-Type' => 'application/json'}
@@ -58,4 +57,4 @@ module Sendcloud
58
57
  end
59
58
  end
60
59
  end
61
- end
60
+ end
@@ -1,3 +1,3 @@
1
1
  module Sendcloud
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,6 +1,3 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
3
-
4
1
  require 'sendcloud'
5
2
  require 'pry'
6
3
  require 'vcr'
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"name":"Rob van den Heuvel","address":"Torenallee","city":"Eindhoven","postal_code":"5617BC","country":"NL","shipment":{"id":1},"requestShipment":false,"telephone":"","email":"","data":[]}}'
@@ -38,11 +38,11 @@ http_interactions:
38
38
  string: '{"parcel":{"id":388185,"name":"Rob van den Heuvel","company_name":null,"address":"Torenallee ","address_divided":{"street":"Torenallee","house_number":null},"city":"Eindhoven","postal_code":"5617BC","telephone":"","email":"","date_created":"27-01-2015
39
39
  13:38:05","reference":"","data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
40
40
  Nederland (PostNL)","options":[]}}}'
41
- http_version:
41
+ http_version:
42
42
  recorded_at: Tue, 27 Jan 2015 12:38:05 GMT
43
43
  - request:
44
44
  method: put
45
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
45
+ uri: https://panel.sendcloud.nl/api/v2/parcels
46
46
  body:
47
47
  encoding: UTF-8
48
48
  string: '{"parcel":{"id":388185,"requestShipment":true}}'
@@ -79,6 +79,6 @@ http_interactions:
79
79
  13:38:05","reference":"","tracking_number":"3SYZXG106077438","label":{"normal_printer":["https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388185?start_from=0&hash=c5bcb9dafccc0d1d5cfafdf677bd45085d35ff9f","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388185?start_from=1&hash=c5bcb9dafccc0d1d5cfafdf677bd45085d35ff9f","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388185?start_from=2&hash=c5bcb9dafccc0d1d5cfafdf677bd45085d35ff9f","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388185?start_from=3&hash=c5bcb9dafccc0d1d5cfafdf677bd45085d35ff9f"],"label_printer":"https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/label_printer\/388185?hash=c5bcb9dafccc0d1d5cfafdf677bd45085d35ff9f"},"status":{"id":0,"message":"Gereed
80
80
  voor verzending","history":null},"data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
81
81
  Nederland (PostNL)","options":[]}}}'
82
- http_version:
82
+ http_version:
83
83
  recorded_at: Tue, 27 Jan 2015 12:38:06 GMT
84
84
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"id":123456,"requestShipment":true}}'
@@ -35,6 +35,6 @@ http_interactions:
35
35
  encoding: UTF-8
36
36
  string: '{"error":{"code":404,"request":"api\/v2\/parcels","message":"Parcel
37
37
  is not found with ID: 123456"}}'
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Tue, 27 Jan 2015 12:38:07 GMT
40
40
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"name":"Rob van den Heuvel","address":"Torenallee","city":"Eindhoven","postal_code":"5617BC","country":"NL","shipment":{"id":1},"requestShipment":false,"telephone":"","email":"","data":[]}}'
@@ -38,6 +38,6 @@ http_interactions:
38
38
  string: '{"parcel":{"id":388186,"name":"Rob van den Heuvel","company_name":null,"address":"Torenallee ","address_divided":{"street":"Torenallee","house_number":null},"city":"Eindhoven","postal_code":"5617BC","telephone":"","email":"","date_created":"27-01-2015
39
39
  13:38:07","reference":"","data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
40
40
  Nederland (PostNL)","options":[]}}}'
41
- http_version:
41
+ http_version:
42
42
  recorded_at: Tue, 27 Jan 2015 12:38:07 GMT
43
43
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"name":"Rob van den Heuvel","address":"Torenallee","city":"Eindhoven","postal_code":"5617BC","country":"NL","shipment":{"id":1},"requestShipment":false,"telephone":"","email":"","data":[]}}'
@@ -38,11 +38,11 @@ http_interactions:
38
38
  string: '{"parcel":{"id":388819,"name":"Rob van den Heuvel","company_name":null,"address":"Torenallee ","address_divided":{"street":"Torenallee","house_number":null},"city":"Eindhoven","postal_code":"5617BC","telephone":"","email":"","date_created":"27-01-2015
39
39
  16:20:18","reference":"","data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
40
40
  Nederland (PostNL)","options":[]}}}'
41
- http_version:
41
+ http_version:
42
42
  recorded_at: Tue, 27 Jan 2015 15:20:18 GMT
43
43
  - request:
44
44
  method: put
45
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
45
+ uri: https://panel.sendcloud.nl/api/v2/parcels
46
46
  body:
47
47
  encoding: UTF-8
48
48
  string: '{"parcel":{"id":388819,"requestShipment":true}}'
@@ -79,11 +79,11 @@ http_interactions:
79
79
  16:20:18","reference":"","tracking_number":"3SYZXG160644522","label":{"normal_printer":["https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=0&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=1&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=2&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=3&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93"],"label_printer":"https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/label_printer\/388819?hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93"},"status":{"id":0,"message":"Gereed
80
80
  voor verzending","history":null},"data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
81
81
  Nederland (PostNL)","options":[]}}}'
82
- http_version:
82
+ http_version:
83
83
  recorded_at: Tue, 27 Jan 2015 15:20:19 GMT
84
84
  - request:
85
85
  method: get
86
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/labels/388819
86
+ uri: https://panel.sendcloud.nl/api/v2/labels/388819
87
87
  body:
88
88
  encoding: US-ASCII
89
89
  string: ''
@@ -117,6 +117,6 @@ http_interactions:
117
117
  body:
118
118
  encoding: UTF-8
119
119
  string: '{"label":{"normal_printer":["https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=0&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=1&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=2&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93","https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/normal_printer\/388819?start_from=3&hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93"],"label_printer":"https:\/\/panel.sendcloud.nl\/api\/v2\/labels\/label_printer\/388819?hash=1607b3abc9ccdc09ab0e963bea21d32fb51d2f93"}}'
120
- http_version:
120
+ http_version:
121
121
  recorded_at: Tue, 27 Jan 2015 15:20:19 GMT
122
122
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/labels/123456
5
+ uri: https://panel.sendcloud.nl/api/v2/labels/123456
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -35,6 +35,6 @@ http_interactions:
35
35
  encoding: UTF-8
36
36
  string: '{"error":{"code":404,"request":"api\/v2\/labels\/123456","message":"Cannot
37
37
  find parcel with given Parcel ID (123456)"}}'
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Tue, 27 Jan 2015 15:20:09 GMT
40
40
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels/123456
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels/123456
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -33,6 +33,6 @@ http_interactions:
33
33
  encoding: UTF-8
34
34
  string: '{"error":{"code":404,"request":"api\/v2\/parcels\/123456","message":"You
35
35
  aren''t authorized to get this parcel"}}'
36
- http_version:
36
+ http_version:
37
37
  recorded_at: Tue, 27 Jan 2015 14:56:45 GMT
38
38
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"name":"Rob van den Heuvel","address":"Torenallee","city":"Eindhoven","postal_code":"5617BC","country":"NL","shipment":{"id":1},"requestShipment":false,"telephone":"","email":"","data":[]}}'
@@ -38,11 +38,11 @@ http_interactions:
38
38
  string: '{"parcel":{"id":388312,"name":"Rob van den Heuvel","company_name":null,"address":"Torenallee ","address_divided":{"street":"Torenallee","house_number":null},"city":"Eindhoven","postal_code":"5617BC","telephone":"","email":"","date_created":"27-01-2015
39
39
  14:21:27","reference":"","data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
40
40
  Nederland (PostNL)","options":[]}}}'
41
- http_version:
41
+ http_version:
42
42
  recorded_at: Tue, 27 Jan 2015 13:21:27 GMT
43
43
  - request:
44
44
  method: get
45
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels/388312
45
+ uri: https://panel.sendcloud.nl/api/v2/parcels/388312
46
46
  body:
47
47
  encoding: US-ASCII
48
48
  string: ''
@@ -76,6 +76,6 @@ http_interactions:
76
76
  string: '{"parcel":{"id":388312,"name":"Rob van den Heuvel","company_name":null,"address":"Torenallee ","address_divided":{"street":"Torenallee","house_number":null},"city":"Eindhoven","postal_code":"5617BC","telephone":"","email":"","date_created":"27-01-2015
77
77
  14:21:27","reference":"","data":[],"country":{"iso_3":"NLD","iso_2":"NL","name":"Nederland"},"shipment":{"id":1,"name":"Pakket
78
78
  Nederland (PostNL)","options":[]}}}'
79
- http_version:
79
+ http_version:
80
80
  recorded_at: Tue, 27 Jan 2015 13:21:27 GMT
81
81
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/shipping_methods/1
5
+ uri: https://panel.sendcloud.nl/api/v2/shipping_methods/1
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -41,6 +41,6 @@ http_interactions:
41
41
  encoding: UTF-8
42
42
  string: '{"shipping_method":{"id":1,"name":"Pakket Nederland (PostNL)","countries":[{"id":2,"iso_3":"NLD","iso_2":"NL","name":"Nederland","price":5.8}],"price":5.8,"options":[],"combinations":[{"id":1,"name":"Normaal
43
43
  pakket"}]}}'
44
- http_version:
44
+ http_version:
45
45
  recorded_at: Fri, 23 Jan 2015 09:51:08 GMT
46
46
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://key:secret@panel.sendcloud.nl/api/v2/shipping_methods
5
+ uri: https://panel.sendcloud.nl/api/v2/shipping_methods
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://key:secret@panel.sendcloud.nl/api/v2/shipping_methods/99
5
+ uri: https://panel.sendcloud.nl/api/v2/shipping_methods/99
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://D74gAPTNto4N28N:Yb6m0YVBXtWm2zTdk@panel.sendcloud.nl/api/v2/parcels
5
+ uri: https://panel.sendcloud.nl/api/v2/parcels
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"parcel":{"name":null,"address":"Torenallee","city":"Eindhoven","postal_code":"5617BC","country":"NL","shipment":{"id":1},"requestShipment":false,"telephone":"","email":"","data":[]}}'
@@ -35,6 +35,6 @@ http_interactions:
35
35
  encoding: UTF-8
36
36
  string: '{"error":{"code":300,"request":"api\/v2\/parcels","message":"Name is
37
37
  required"}}'
38
- http_version:
38
+ http_version:
39
39
  recorded_at: Tue, 27 Jan 2015 12:38:07 GMT
40
40
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendcloud-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Berkenbosch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2018-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.2.2
181
+ rubygems_version: 2.7.6
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: ruby client for the sendcloud api
@@ -198,4 +198,3 @@ test_files:
198
198
  - spec/vcr_cassettes/get_shipping_methods.yml
199
199
  - spec/vcr_cassettes/get_wrong_shipping_method.yml
200
200
  - spec/vcr_cassettes/wrong_create_parcel_without_name.yml
201
- has_rdoc: