This repository has been archived by the owner on May 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish submitDeliveryDetails callback
- Loading branch information
Showing
7 changed files
with
73 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
transaction-impl/src/main/java/com/example/auction/transaction/impl/TransactionMappers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.example.auction.transaction.impl; | ||
|
||
import com.example.auction.transaction.api.DeliveryInfo; | ||
|
||
public class TransactionMappers { | ||
|
||
public static DeliveryInfo toApi(DeliveryData data) { | ||
return new DeliveryInfo( | ||
data.getAddressLine1(), | ||
data.getAddressLine2(), | ||
data.getCity(), | ||
data.getState(), | ||
data.getPostalCode(), | ||
data.getCountry() | ||
); | ||
} | ||
|
||
public static DeliveryData fromApi(DeliveryInfo data) { | ||
return new DeliveryData( | ||
data.getAddressLine1(), | ||
data.getAddressLine2(), | ||
data.getCity(), | ||
data.getState(), | ||
data.getPostalCode(), | ||
data.getCountry() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters