api_sabeq_ps_v1 0.1.4 → 0.1.6
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.
- checksums.yaml +4 -4
- data/lib/api_sabeq_ps_v1/sabeq_helpers.rb +10 -2
- data/lib/api_sabeq_ps_v1/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a457d19a5cf7927c53d607fb3448c1a733a27497a4cbf89f3858492d301cb38
|
4
|
+
data.tar.gz: 447a74271013db6b63b1682f246fedd0da43ec6598c07f4673c4ee96b089905b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bee15c0d1c21d9074c3d46c0ba2972bab2019feb7a3b0a3c5c701ecfad3350e07967232baa795313cc892e9b70c27a50f5dacab32639f36b3700497ef3f8d0
|
7
|
+
data.tar.gz: 639c40343917248a937d63a22b8bc7b5e8e826a0a40e58b054ddbc098d9d788ec847b9acc0c92c956bb8bab0be2a5487bc4567ead5a9dbe1d9e75769c2983248
|
@@ -52,18 +52,26 @@ module ApiSabeqPsV1
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def sabeq_api_v1_create_parcel(verification_token, name, phone1, phone2, content,
|
55
|
-
payment_amount, area_id, address, delivery_notes)
|
55
|
+
payment_amount, area_id, address, delivery_notes, special_notes)
|
56
56
|
auth_link = SABEQ_URL + "/api/v1/parcels"
|
57
57
|
auth_json = { verification_token: verification_token,
|
58
58
|
name: name, phone1: phone1, phone2: phone2,
|
59
59
|
content: content, payment_amount: payment_amount,
|
60
60
|
area_id: area_id, address: address,
|
61
|
-
delivery_notes: delivery_notes
|
61
|
+
delivery_notes: delivery_notes,
|
62
|
+
special_notes: special_notes }
|
62
63
|
json_response = make_post_request(auth_link, auth_json)
|
63
64
|
|
64
65
|
return json_response
|
65
66
|
end
|
66
67
|
|
68
|
+
def sabeq_api_v1_cancel_parcel(verification_token, parcel_number)
|
69
|
+
auth_link = SABEQ_URL + "/api/v1/parcels/#{parcel_number}/cancel_parcel"
|
70
|
+
auth_json = { verification_token: verification_token }
|
71
|
+
json_response = make_get_request(auth_link, auth_json)
|
72
|
+
return json_response
|
73
|
+
end
|
74
|
+
|
67
75
|
private
|
68
76
|
def make_post_request(url_link, json_content)
|
69
77
|
uri = URI.parse(url_link)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: api_sabeq_ps_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShaimaKaraki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Its a gem for sabeq.ps API helper functionalities
|
14
14
|
email:
|
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
requirements: []
|
43
|
-
rubygems_version: 3.
|
43
|
+
rubygems_version: 3.3.14
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: gem for sabeq.ps API helper functionalities
|