dhl_ecommerce_api 0.1.4 → 0.1.5

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: 1388319c008e06746aeb7d276f0b57db7896d1a66a522bb39e25ac279b55a043
4
- data.tar.gz: d141678736707aa599600ccf93f81c21496956a84e11fec8aba91d8494e06b5c
3
+ metadata.gz: e03ab10a63b305e1b945187a967a676fb6723ecaf11dc2ed3b913f39d6aec46e
4
+ data.tar.gz: 892480ae678747fff07c1bcf18855ba8ec96a01b9c6e5dbe31ca10975eedd7a7
5
5
  SHA512:
6
- metadata.gz: c13239a61eaef088ca3f64f08b49fb0902bc007c895202d316b2254b5d74b09a2c8ffdeab9c11a431b32c4e5d941191159cd5d1f4948d22c3588d8510ab205b1
7
- data.tar.gz: 63df0e80ac58c48396f6dc2048536b278ffd78d0ee1d12fc0fde22bb4575bcad4cf1358a8218759d0af554ccf0d7619c16128e56b7bef65732d26fa817576cec
6
+ metadata.gz: 25393870b5b0ab687d847cac0581537949988e9e71e296ae7686bf23edaa324482787939b9e2f22e155abc3a58b8ab212d1940de7fd78e7515b099461430ca5d
7
+ data.tar.gz: 7616a892d236831382ef549c8b1d713dc4c5ac8b03f2f3b119386e09510bd36b7502349ed14c00d37b828ea2651c2c266bb88bdad3bec0981bbe5884736f5044
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dhl_ecommerce_api (0.1.1)
4
+ dhl_ecommerce_api (0.1.4)
5
5
  activeresource (>= 4.1.0, < 6.0.0)
6
6
 
7
7
  GEM
@@ -25,53 +25,53 @@ module DHLEcommerceAPI
25
25
  end
26
26
  end
27
27
 
28
- # shipment_with_pickup_params = {
29
- # "handoverMethod": 2,
30
- # "pickupDateTime": DateTime.now.to_s,
31
- # "pickupAddress": {
32
- # "companyName": "Pickup From Company",
33
- # "name": "Pickup From Name",
34
- # "address1": "Holistic Pharmacy PostCo, 55, Jalan Landak",
35
- # "address2": "",
36
- # "address3": "",
37
- # "city": " Kuala Lumpur",
38
- # "state": " Kuala Lumpur",
39
- # "postCode": "55100",
40
- # "country": "MY",
41
- # "phone": "0169822645",
42
- # "email": "erwhey@postco.co"
43
- # },
44
- # "shipmentItems": [
45
- # {
46
- # "shipmentID": "MYPTC0087",
47
- # "packageDesc": "Laptop Sleeve",
48
- # "totalWeight": 500,
49
- # "totalWeightUOM": "G",
50
- # "dimensionUOM": "CM",
51
- # "height": nil,
52
- # "length": nil,
53
- # "width": nil,
54
- # "productCode": "PDO",
55
- # "codValue": nil,
56
- # "insuranceValue": nil,
57
- # "totalValue": 300,
58
- # "currency": "MYR",
59
- # "remarks": nil,
60
- # "isRoutingInfoRequired": "Y",
61
- # "consigneeAddress": {
62
- # "companyName": "Sleeve Company",
63
- # "name": "Sleeve Sdn Bhd",
64
- # "address1": "No. 3, Jalan Bangsar, Kampung Haji Abdullah Hukum",
65
- # "address2": nil,
66
- # "address3": nil,
67
- # "city": "Kuala Lumpur",
68
- # "state": "Kuala Lumpur",
69
- # "district": nil,
70
- # "country": "MY",
71
- # "postCode": "59200",
72
- # "phone": "0169822645",
73
- # "email": nil
74
- # }
75
- # },
76
- # ]
77
- # }
28
+ shipment_with_pickup_params = {
29
+ "handoverMethod": 2,
30
+ "pickupDateTime": DateTime.now.to_s,
31
+ "pickupAddress": {
32
+ "companyName": "Pickup From Company",
33
+ "name": "Pickup From Name",
34
+ "address1": "Holistic Pharmacy PostCo, 55, Jalan Landak",
35
+ "address2": "",
36
+ "address3": "",
37
+ "city": " Kuala Lumpur",
38
+ "state": " Kuala Lumpur",
39
+ "postCode": "55100",
40
+ "country": "MY",
41
+ "phone": "0169822645",
42
+ "email": "erwhey@postco.co"
43
+ },
44
+ "shipmentItems": [
45
+ {
46
+ "shipmentID": "MYPTC0087",
47
+ "packageDesc": "Laptop Sleeve",
48
+ "totalWeight": 500,
49
+ "totalWeightUOM": "G",
50
+ "dimensionUOM": "CM",
51
+ "height": nil,
52
+ "length": nil,
53
+ "width": nil,
54
+ "productCode": "PDO",
55
+ "codValue": nil,
56
+ "insuranceValue": nil,
57
+ "totalValue": 300,
58
+ "currency": "MYR",
59
+ "remarks": nil,
60
+ "isRoutingInfoRequired": "Y",
61
+ "consigneeAddress": {
62
+ "companyName": "Sleeve Company",
63
+ "name": "Sleeve Sdn Bhd",
64
+ "address1": "No. 3, Jalan Bangsar, Kampung Haji Abdullah Hukum",
65
+ "address2": nil,
66
+ "address3": nil,
67
+ "city": "Kuala Lumpur",
68
+ "state": "Kuala Lumpur",
69
+ "district": nil,
70
+ "country": "MY",
71
+ "postCode": "59200",
72
+ "phone": "0169822645",
73
+ "email": nil
74
+ }
75
+ },
76
+ ]
77
+ }
@@ -1,46 +1,52 @@
1
- module DHLEcommerceAPI
2
- # Component item
3
- class Shipment::ShipmentItem < Base
4
- # add some validations?
5
- DEFAULT_ATTRIBUTES = {
6
- shipment_id: nil,
7
- package_desc: "",
8
- total_weight: nil,
9
- total_weight_uom: "G",
10
- dimension_uom: "CM",
11
- height: nil,
12
- length: nil,
13
- width: nil,
14
- product_code: "PDO",
15
- cod_value: nil,
16
- insurance_value: nil,
17
- total_value: 300,
18
- currency: "MYR",
19
- remarks: nil,
20
- is_routing_info_required: "Y",
21
- consignee_address: {
22
- company_name: "",
23
- name: "",
24
- address1: "",
25
- address2: nil,
26
- address3: nil,
27
- city: "",
28
- state: "",
29
- district: nil,
30
- country: "MY",
31
- post_code: "",
32
- phone: "",
33
- email: nil
34
- }
35
- }
1
+ # module DHLEcommerceAPI
2
+ # # Component item
3
+ # class Shipment::ShipmentItem < Base
4
+ # # add some validations?
5
+ # DEFAULT_ATTRIBUTES = {
6
+ # shipment_id: nil,
7
+ # package_desc: "",
8
+ # total_weight: nil,
9
+ # total_weight_uom: "G",
10
+ # dimension_uom: "CM",
11
+ # height: nil,
12
+ # length: nil,
13
+ # width: nil,
14
+ # product_code: "PDO",
15
+ # cod_value: nil,
16
+ # insurance_value: nil,
17
+ # total_value: 300,
18
+ # currency: "MYR",
19
+ # remarks: nil,
20
+ # is_routing_info_required: "Y",
21
+ # consignee_address: {
22
+ # company_name: "",
23
+ # name: "",
24
+ # address1: "",
25
+ # address2: nil,
26
+ # address3: nil,
27
+ # city: "",
28
+ # state: "",
29
+ # district: nil,
30
+ # country: "MY",
31
+ # post_code: "",
32
+ # phone: "",
33
+ # email: nil
34
+ # }
35
+ # }
36
36
 
37
- def initialize(attributes = {}, persisted = false)
38
- status = attributes["response_status"]
39
- if status.present? && status["code"] != "200"
40
- error_messages = status["message_details"].map{|err| err["message_detail"]}
41
- handle_errors(status["code"], error_messages)
42
- end
43
- super
44
- end
45
- end
46
- end
37
+ # def initialize(attributes = {}, persisted = false)
38
+ # status = attributes["response_status"]
39
+ # if status.present? && status["code"] != "200"
40
+ # error_messages = status["message_details"].map{|err| err["message_detail"]}
41
+ # handle_errors(status["code"], error_messages)
42
+ # end
43
+ # super
44
+ # end
45
+
46
+ # def to_json(options = {})
47
+ # attributes.as_json
48
+ # .deep_transform_keys { |k| k.to_s.camelize(:lower) }
49
+ # .to_json(include_root_in_json ? { root: self.class.element_name }.merge(options) : options)
50
+ # end
51
+ # end
52
+ # end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DHLEcommerceAPI
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -14,7 +14,7 @@ module DHLEcommerceAPI
14
14
  require "dhl_ecommerce_api/resources/shipment"
15
15
  require "dhl_ecommerce_api/resources/shipment/pickup"
16
16
  require "dhl_ecommerce_api/resources/shipment/dropoff"
17
- require "dhl_ecommerce_api/resources/shipment/shipment_item"
17
+ # require "dhl_ecommerce_api/resources/shipment/shipment_item"
18
18
 
19
19
  require "dhl_ecommerce_api/resources/pickup"
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl_ecommerce_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Er Whey