Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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