shiprocket_api 0.5.1 → 0.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: daaeb47a98dc3ffd00727499089bb409b69e4675b2bde2cf4b8af03f47f88529
4
- data.tar.gz: 3da69f20d46ae87a86442a104a1bbc7738996fe2b42fdd5a0a79dd80c550879f
3
+ metadata.gz: 0e2099d36382354538968648afc2e8803446cff0c7b8e45ba739066d576c7e59
4
+ data.tar.gz: 836dff95ffdace4c4650495506593d9726260a07dacd30ddddd9bbbe4d2b0151
5
5
  SHA512:
6
- metadata.gz: 8af0d4efaff52ee451c2ffe961e266400d680e755f871b63204bef4a4034a7d5fa2f324124264b720511a4424fa02d31ef57fdb0e145bc5b35bfe872ee53452f
7
- data.tar.gz: 863d695ae42750b80296109f1a6fa07165ec718557e997c84929e0fc147dd0aeba422802799fc0ae006eeed77d63a54bb3c40dbd723eefa04df12bf1c1d8640f
6
+ metadata.gz: 1f974cf47379525e08bf71b026e698aefe2df9ff9478436cfd6a08cba6c9974264c5fbd5bcd15e42764ff4ca6f4a8134403abb79b197b49055be51d2f7e18f83
7
+ data.tar.gz: 30514bb25e577afa0c6cc85edc50c82856f287ccf67fb54806e26f05d17d151e456e64daea33d45d7b2db11a0391cc0a18e8d1a17ba0e17900c47d30e21fa454
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shiprocket_api (0.4.4)
4
+ shiprocket_api (0.5.1)
5
5
  activeresource (~> 5.0)
6
6
  http
7
7
 
@@ -37,16 +37,16 @@ module ShiprocketAPI
37
37
  height: '',
38
38
  weight: ''
39
39
  }
40
- end
41
40
 
42
- def generate_awb(courier_id:)
43
- return false unless attributes['shipment_id'] && shipment_id != 0
41
+ def generate_awb(courier_id:)
42
+ return false unless attributes['shipment_id'] && shipment_id != 0
44
43
 
45
- self.awb = ::ShiprocketAPI::Awb.new(
46
- shipment_id: shipment_id,
47
- courier_id: courier_id,
48
- is_return: 0
49
- )
50
- awb.save
44
+ self.awb = ::ShiprocketAPI::Awb.new(
45
+ shipment_id: shipment_id,
46
+ courier_id: courier_id,
47
+ is_return: 0
48
+ )
49
+ awb.save
50
+ end
51
51
  end
52
52
  end
@@ -5,6 +5,8 @@ module ShiprocketAPI
5
5
  self.prefix += '/orders/create/return'
6
6
  self.element_name = ''
7
7
 
8
+ has_many :order_items, class_name: 'ShiprocketAPI::OrderItem'
9
+
8
10
  DEFAULT_ATTRS = {
9
11
  order_id: '',
10
12
  order_date: '',
@@ -1,17 +1,19 @@
1
- module Shared
2
- module OrderHelper
3
- def generate_label
4
- return false unless attributes['shipment_id'] && shipment_id != 0
1
+ module ShiprocketAPI
2
+ module Shared
3
+ module OrderHelper
4
+ def generate_label
5
+ return false unless attributes['shipment_id'] && shipment_id != 0
5
6
 
6
- self.label = ::ShiprocketAPI::Label.new(shipment_id: [shipment_id])
7
- label.save
8
- end
7
+ self.label = ::ShiprocketAPI::Label.new(shipment_id: [shipment_id])
8
+ label.save
9
+ end
9
10
 
10
- def create_pickup
11
- return false unless attributes['shipment_id'] && shipment_id != 0
11
+ def create_pickup
12
+ return false unless attributes['shipment_id'] && shipment_id != 0
12
13
 
13
- self.pickup = ::ShiprocketAPI::Pickup.new(shipment_id: [shipment_id])
14
- pickup.save
14
+ self.pickup = ::ShiprocketAPI::Pickup.new(shipment_id: [shipment_id])
15
+ pickup.save
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -1,3 +1,3 @@
1
1
  module ShiprocketAPI
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiprocket_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Chong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-15 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource