newgistics 2.4.0 → 2.4.1

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
2
  SHA1:
3
- metadata.gz: b9c1f08cf89a001dd497f70997128e207d4fccc3
4
- data.tar.gz: ffbf57d283b076a5fdfcd2b3859deb6e77260c48
3
+ metadata.gz: 501fd75a15918e4343b08c54703c624ed3321b26
4
+ data.tar.gz: 16007118503adb0b95b51d8591d159feefd77448
5
5
  SHA512:
6
- metadata.gz: ef9f20d382e4e78ffecadf41c99fd618a4c23cf9976b2b08b34c7b87fd5f27da0dc7b21b9a908a75c5737a17ca09752a9254defeb2df7bf7e3c9d152fa394ae5
7
- data.tar.gz: b79656c7ab47c26c4ddb5401f8e67d5bda8fca6ddf6a2780f48e69190b4ab6ca3641d0794128c61ecadf6db22348e79149f0ca3e3e024c0533d25f05e4bc91c5
6
+ metadata.gz: a5f51b558789523c672cd74c024d1d0097cc0b8fa74fdb915d3077f252729021ce5534b9ed29e77a79de1a513fcbeaf157393ee5d8e33d5a721fa4b3691f035d
7
+ data.tar.gz: b660bffc2914034cbaa7fb14260e0f36ecacb2e5b27bc7904ae0da56ce5c9c0b971d9b4c0e9dbbff9c006c7adaaceb6639f55214ae898b3071259c851fa47249
@@ -34,25 +34,30 @@ module Newgistics
34
34
 
35
35
  def shipment_address_update_xml(xml)
36
36
  xml.updateShipment(shipment_address_update_attributes) do
37
- xml.FirstName shipment_address_update.first_name
38
- xml.LastName shipment_address_update.last_name
39
- xml.Company shipment_address_update.company
40
- xml.Address1 shipment_address_update.address1
41
- xml.Address2 shipment_address_update.address2
42
- xml.City shipment_address_update.city
43
- xml.State shipment_address_update.state
44
- xml.PostalCode shipment_address_update.postal_code
45
- xml.Country shipment_address_update.country
46
- xml.Email shipment_address_update.email
47
- xml.Phone shipment_address_update.phone
48
- xml.Fax shipment_address_update.fax
49
- xml.IsResidential shipment_address_update.is_residential
50
- xml.Status shipment_address_update.status
51
- xml.StatusNotes shipment_address_update.status_notes
52
- xml.ShipMethod shipment_address_update.ship_method
37
+ xml_field(xml, 'FirstName', :first_name)
38
+ xml_field(xml, 'LastName', :last_name)
39
+ xml_field(xml, 'Company', :company)
40
+ xml_field(xml, 'Address1', :address1)
41
+ xml_field(xml, 'Address2', :address2)
42
+ xml_field(xml, 'City', :city)
43
+ xml_field(xml, 'State', :state)
44
+ xml_field(xml, 'PostalCode', :postal_code)
45
+ xml_field(xml, 'Country', :country)
46
+ xml_field(xml, 'Email', :email)
47
+ xml_field(xml, 'Phone', :phone)
48
+ xml_field(xml, 'Fax', :fax)
49
+ xml_field(xml, 'IsResidential', :is_residential)
50
+ xml_field(xml, 'Status', :status)
51
+ xml_field(xml, 'StatusNotes', :status_notes)
52
+ xml_field(xml, 'ShipMethod', :ship_method)
53
53
  end
54
54
  end
55
55
 
56
+ def xml_field(xml, xml_node, attribute_name)
57
+ value = shipment_address_update.send(attribute_name)
58
+ xml.send(xml_node, value) unless value.nil?
59
+ end
60
+
56
61
  def api_key
57
62
  Newgistics.configuration.api_key
58
63
  end
@@ -1,3 +1,3 @@
1
1
  module Newgistics
2
- VERSION = "2.4.0".freeze
2
+ VERSION = "2.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newgistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Martinez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-29 00:00:00.000000000 Z
12
+ date: 2019-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: virtus