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

Email in Address #57

Merged
merged 2 commits into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## [Unreleased]
### Added

- Support shipments with pickup requests as required for [TNT](https://developers.shipcloud.io/carriers/tnt.html).
- Add attr_accessor for `email` to class `Shipcloud::Address` to be able to access the email attribute at the address object.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion lib/shipcloud/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Address < Base
include Shipcloud::Operations::Update
include Shipcloud::Operations::All

attr_accessor :company, :first_name, :last_name, :care_of, :street,
attr_accessor :company, :first_name, :last_name, :care_of, :street, :email,
:street_no, :zip_code, :city, :state, :country, :phone
attr_reader :id

Expand Down
4 changes: 3 additions & 1 deletion spec/shipcloud/address_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
city: 'Hamburg',
state: 'Hamburg',
country: 'DE',
phone: '040/123456789'
phone: '040/123456789',
email: 'max@mustermail.com',
}

describe '#initialize' do
Expand All @@ -30,6 +31,7 @@
expect(address.state).to eq 'Hamburg'
expect(address.country).to eq 'DE'
expect(address.phone).to eq '040/123456789'
expect(address.email).to eq 'max@mustermail.com'
end
end

Expand Down