Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

Commit 6991edd

Browse files
authored
Email in Address (#57)
Adds email attribute to address object [ch4815](https://app.clubhouse.io/shipcloud/story/4815)
1 parent cbf6bfc commit 6991edd

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## [Unreleased]
22
### Added
3-
43
- Support shipments with pickup requests as required for [TNT](https://developers.shipcloud.io/carriers/tnt.html).
4+
- Add attr_accessor for `email` to class `Shipcloud::Address` to be able to access the email attribute at the address object.
55

66
### Changed
77

lib/shipcloud/address.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Address < Base
33
include Shipcloud::Operations::Update
44
include Shipcloud::Operations::All
55

6-
attr_accessor :company, :first_name, :last_name, :care_of, :street,
6+
attr_accessor :company, :first_name, :last_name, :care_of, :street, :email,
77
:street_no, :zip_code, :city, :state, :country, :phone
88
attr_reader :id
99

spec/shipcloud/address_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
city: 'Hamburg',
1414
state: 'Hamburg',
1515
country: 'DE',
16-
phone: '040/123456789'
16+
phone: '040/123456789',
17+
1718
}
1819

1920
describe '#initialize' do
@@ -30,6 +31,7 @@
3031
expect(address.state).to eq 'Hamburg'
3132
expect(address.country).to eq 'DE'
3233
expect(address.phone).to eq '040/123456789'
34+
expect(address.email).to eq '[email protected]'
3335
end
3436
end
3537

0 commit comments

Comments
 (0)