Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Commit 8a1c0aa

Browse files
committed
feat(models): make memberId field on pickup point optional
Closes #119
1 parent 3ce884d commit 8a1c0aa

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/models/__tests__/address_model_test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ test('Addresses should be initialized from JSON object', t => {
1313
country_code: 'DE',
1414
pickup_point: {
1515
name: 'PACKSTATION',
16-
id: '802',
17-
member_id: '45685217'
16+
id: '802'
1817
}
1918

2019
};
@@ -30,8 +29,6 @@ test('Addresses should be initialized from JSON object', t => {
3029
t.is(address.countryCode, 'DE');
3130
t.is(address.pickupPoint.name, 'PACKSTATION');
3231
t.is(address.pickupPoint.id, '802');
33-
t.is(address.pickupPoint.memberId, '45685217');
34-
3532
});
3633

3734
test('Checkout addresses should be initialized from JSON object', t => {

src/models/address_models.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import createModel from './base_model';
99
const PickupPoint = createModel({
1010
name: { key: 'name', type: 'string' },
1111
id: { key: 'id', type: 'string' },
12-
memberId: { key: 'member_id', type: 'string' }
12+
memberId: { key: 'member_id', type: 'string', optional: true }
1313
});
1414

1515
/**

0 commit comments

Comments
 (0)