This repository was archived by the owner on Jul 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/4 #6
Open
dipteewarudkar
wants to merge
24
commits into
master
Choose a base branch
from
feature/4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/4 #6
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6184155
Adding model classes for Address
dipteewarudkar c7751ef
Fixing GetAddressesResponse structure
dipteewarudkar e981024
Fixing build warnings
dipteewarudkar d76ea5e
Fixing update address to http PUT request
dipteewarudkar d0b45de
Adding wrapper for zalando Api for
dipteewarudkar ac1bc49
Fixing :
dipteewarudkar 54433f6
Formatting fixes
dipteewarudkar db78cb1
Changing response of read(customer_no) in addressService to
dipteewarudkar 687364b
Fixing build javadoc errors
dipteewarudkar ec24c2e
Fixing some more javadoc build error
dipteewarudkar ac317e4
1)Changing Currency to enum
dipteewarudkar 3a5c64f
Adding service for getting access token and some other small changes
dipteewarudkar bbf107c
Some changes to removing CreateOrderRequest and using the common Order
dipteewarudkar 8ec5e8c
Using Abstract Service from internal package and handling Exceptions
dipteewarudkar c1065e9
Some changes needed while integrating with live zalando Apis
dipteewarudkar 137c156
Changing StringEntity to ByteEntity to save special characters such as
dipteewarudkar 29aeff2
Fixing javadoc build errors
dipteewarudkar 64bbfc2
Fixing some more javadoc build errors
dipteewarudkar 818e898
Changing StringEntity to ByteArrayEntity
dipteewarudkar f4d33da
Implemented Review comments
dipteewarudkar 44c5cce
Implementing review comments , removing content-type setting
dipteewarudkar 9cd8e0e
Some bug fix came up while integration.
dipteewarudkar 8c94a6d
Removing /customers/customer_number/ from urls
dipteewarudkar ed7383f
Should bump the version to correct snapshot one
duergner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ gradle.properties | |
| *.iws | ||
| .classpath | ||
| .settings | ||
| .project | ||
| .project | ||
| /bin/ | ||
This file contains hidden or 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
121 changes: 121 additions & 0 deletions
121
src/main/java/io/sprucehill/zalando/api/nativecart/model/Address.java
This file contains hidden or 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,121 @@ | ||
| package io.sprucehill.zalando.api.nativecart.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import io.sprucehill.zalando.api.model.Base; | ||
|
|
||
| /** | ||
| * | ||
| * @author dipteewarudkar | ||
| * | ||
| */ | ||
| public class Address extends Base { | ||
|
|
||
| @JsonProperty | ||
| private String id; | ||
|
|
||
| @JsonProperty(value="customer_number") | ||
| private String customerNumber; | ||
|
|
||
| @JsonProperty | ||
| private String gender; | ||
|
|
||
| @JsonProperty(value="first_name") | ||
| private String firstName; | ||
|
|
||
| @JsonProperty(value="last_name") | ||
| private String lastName; | ||
|
|
||
| @JsonProperty | ||
| private String street; | ||
|
|
||
| @JsonProperty | ||
| private String additional; | ||
|
|
||
| @JsonProperty | ||
| private String zip; | ||
|
|
||
| @JsonProperty | ||
| private String city; | ||
|
|
||
| @JsonProperty(value="country_code") | ||
| private String countryCode; | ||
|
|
||
| @JsonProperty(value="pack_station") | ||
| private Boolean packStation; | ||
|
|
||
| @JsonProperty(value="default_billing") | ||
| private Boolean defaultBilling; | ||
|
|
||
| @JsonProperty(value="default_shipping") | ||
| private Boolean defaultShipping; | ||
|
|
||
| public Address(){} | ||
|
|
||
| public Address(String id, String customerNumber, String gender, String firstName, String lastName, String street,String additional, String zip, String city, String countryCode, Boolean packStation,Boolean defaultBilling, Boolean defaultShipping) { | ||
| this.id=id; | ||
| this.customerNumber=customerNumber; | ||
| this.gender=gender; | ||
| this.firstName=firstName; | ||
| this.lastName=lastName; | ||
| this.street=street; | ||
| this.additional=additional; | ||
| this.city=city; | ||
| this.countryCode=countryCode; | ||
| this.packStation=packStation; | ||
| this.defaultBilling=defaultBilling; | ||
| this.defaultShipping=defaultShipping; | ||
| this.zip = zip; | ||
| } | ||
|
|
||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public String getCustomerNumber() { | ||
| return customerNumber; | ||
| } | ||
|
|
||
| public String getGender() { | ||
| return gender; | ||
| } | ||
|
|
||
| public String getFirstName() { | ||
| return firstName; | ||
| } | ||
|
|
||
| public String getLastName() { | ||
| return lastName; | ||
| } | ||
|
|
||
| public String getStreet() { | ||
| return street; | ||
| } | ||
|
|
||
| public String getAdditional() { | ||
| return additional; | ||
| } | ||
|
|
||
| public String getZip() { | ||
| return zip; | ||
| } | ||
|
|
||
| public String getCity() { | ||
| return city; | ||
| } | ||
|
|
||
| public String getCountryCode() { | ||
| return countryCode; | ||
| } | ||
|
|
||
| public Boolean getPackStation() { | ||
| return packStation; | ||
| } | ||
|
|
||
| public Boolean getDefaultBilling() { | ||
| return defaultBilling; | ||
| } | ||
|
|
||
| public Boolean getDefaultShipping() { | ||
| return defaultShipping; | ||
| } | ||
| } | ||
24 changes: 24 additions & 0 deletions
24
src/main/java/io/sprucehill/zalando/api/nativecart/model/AddressCheckRequest.java
This file contains hidden or 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,24 @@ | ||
| package io.sprucehill.zalando.api.nativecart.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| import io.sprucehill.zalando.api.model.Base; | ||
|
|
||
| /** | ||
| * | ||
| * @author dipteewarudkar | ||
| * | ||
| */ | ||
| public class AddressCheckRequest extends Base { | ||
|
|
||
| @JsonProperty | ||
| private Address address; | ||
|
|
||
| public Address getAddress() { | ||
| return address; | ||
| } | ||
|
|
||
| public void setAddress(Address address) { | ||
| this.address = address; | ||
| } | ||
| } |
56 changes: 56 additions & 0 deletions
56
src/main/java/io/sprucehill/zalando/api/nativecart/model/AddressCheckResponse.java
This file contains hidden or 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,56 @@ | ||
| package io.sprucehill.zalando.api.nativecart.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import io.sprucehill.zalando.api.model.Base; | ||
|
|
||
| /** | ||
| * | ||
| * @author dipteewarudkar | ||
| * | ||
| */ | ||
| public class AddressCheckResponse extends Base { | ||
|
|
||
| @JsonProperty | ||
| private String status; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use @JsonProperty annotation for fields that are mapped from JSON |
||
|
|
||
| @JsonProperty | ||
| private Boolean blacklisted; | ||
|
|
||
| @JsonProperty | ||
| private Address address; | ||
|
|
||
| @JsonProperty(value="normalized_address") | ||
| private Address normalizedAddress; | ||
|
|
||
| public String getStatus() { | ||
| return status; | ||
| } | ||
|
|
||
| public void setStatus(String status) { | ||
| this.status = status; | ||
| } | ||
|
|
||
| public Boolean getBlacklisted() { | ||
| return blacklisted; | ||
| } | ||
|
|
||
| public void setBlacklisted(Boolean blacklisted) { | ||
| this.blacklisted = blacklisted; | ||
| } | ||
|
|
||
| public Address getAddress() { | ||
| return address; | ||
| } | ||
|
|
||
| public void setAddress(Address address) { | ||
| this.address = address; | ||
| } | ||
|
|
||
| public Address getNormalizedAddress() { | ||
| return normalizedAddress; | ||
| } | ||
|
|
||
| public void setNormalizedAddress(Address normalizedAddress) { | ||
| this.normalizedAddress = normalizedAddress; | ||
| } | ||
| } | ||
84 changes: 84 additions & 0 deletions
84
src/main/java/io/sprucehill/zalando/api/nativecart/model/Cart.java
This file contains hidden or 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,84 @@ | ||
| package io.sprucehill.zalando.api.nativecart.model; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import io.sprucehill.zalando.api.model.Base; | ||
|
|
||
| /** | ||
| * | ||
| * @author dipteewarudkar | ||
| * | ||
| */ | ||
| public class Cart extends Base { | ||
|
|
||
| @JsonProperty | ||
| private String id; | ||
|
|
||
| @JsonProperty(value="sales_channel") | ||
| private String appDomainId; | ||
|
|
||
| @JsonProperty | ||
| private List<Items> items = new ArrayList<Items>(); | ||
|
|
||
| @JsonProperty(value="items_out_of_stock") | ||
| private List<String> itemsOutOfStock = new ArrayList<String>(); | ||
|
|
||
| @JsonProperty | ||
| private Delivery delivery; | ||
|
|
||
| @JsonProperty | ||
| private Money grossTotal; | ||
|
|
||
| @JsonProperty | ||
| private Money taxTotal; | ||
|
|
||
| @JsonProperty(value="cart_url") | ||
| private String cartUrl; | ||
|
|
||
| public Cart() {} | ||
|
|
||
| public Cart(String id,String appDomainId ,List<Items> items,List<String> itemsOutOfStock,Delivery delivery, | ||
| Money grossTotal,Money taxTotal,String cartUrl){ | ||
| this.id =id; | ||
| this.appDomainId=appDomainId; | ||
| this.items =items; | ||
| this.itemsOutOfStock =itemsOutOfStock; | ||
| this.delivery =delivery; | ||
| this.grossTotal =grossTotal; | ||
| this.taxTotal= taxTotal; | ||
| this.cartUrl=cartUrl; | ||
| } | ||
|
|
||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public String getAppDomainId() { | ||
| return appDomainId; | ||
| } | ||
|
|
||
| public List<Items> getItems() { | ||
| return items; | ||
| } | ||
|
|
||
| public List<String> getItemsOutOfStock() { | ||
| return itemsOutOfStock; | ||
| } | ||
|
|
||
| public Delivery getDelivery() { | ||
| return delivery; | ||
| } | ||
|
|
||
| public Money getGrossTotal() { | ||
| return grossTotal; | ||
| } | ||
|
|
||
| public Money getTaxTotal() { | ||
| return taxTotal; | ||
| } | ||
|
|
||
| public String getCartUrl() { | ||
| return cartUrl; | ||
| } | ||
| } |
81 changes: 81 additions & 0 deletions
81
src/main/java/io/sprucehill/zalando/api/nativecart/model/Checkout.java
This file contains hidden or 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,81 @@ | ||
| package io.sprucehill.zalando.api.nativecart.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import io.sprucehill.zalando.api.model.Base; | ||
|
|
||
| /** | ||
| * | ||
| * @author dipteewarudkar | ||
| * | ||
| */ | ||
| public class Checkout extends Base { | ||
|
|
||
| @JsonProperty | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use blank lines between properties |
||
| private String id; | ||
|
|
||
| @JsonProperty(value="customer_number") | ||
| private String customerNumber; | ||
|
|
||
| @JsonProperty(value="cart_id") | ||
| private String cartId; | ||
|
|
||
| @JsonProperty(value="billing_address_id") | ||
| private String billingAddressId; | ||
|
|
||
| @JsonProperty(value="shipping_address_id") | ||
| private String shippingAddressId; | ||
|
|
||
| @JsonProperty | ||
| private Delivery delivery; | ||
|
|
||
| @JsonProperty | ||
| private Payment payment; | ||
|
|
||
| public Checkout() {} | ||
|
|
||
| public Checkout(String id,String customerNumber,String cartId, String billingAddressId,String shippingAddressId,Delivery delivery,Payment payment){ | ||
| this.id=id; | ||
| this.customerNumber=customerNumber; | ||
| this.cartId=cartId; | ||
| this.billingAddressId=billingAddressId; | ||
| this.shippingAddressId=shippingAddressId; | ||
| this.delivery=delivery; | ||
| this.payment=payment; | ||
| } | ||
|
|
||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public String getCustomerNumber() { | ||
| return customerNumber; | ||
| } | ||
|
|
||
| public String getCartId() { | ||
| return cartId; | ||
| } | ||
|
|
||
| public String getBillingAddressId() { | ||
| return billingAddressId; | ||
| } | ||
|
|
||
| public String getShippingAddressId() { | ||
| return shippingAddressId; | ||
| } | ||
|
|
||
| public void setBillingAddressId(String billingAddressId) { | ||
| this.billingAddressId = billingAddressId; | ||
| } | ||
|
|
||
| public void setShippingAddressId(String shippingAddressId) { | ||
| this.shippingAddressId = shippingAddressId; | ||
| } | ||
|
|
||
| public Delivery getDelivery() { | ||
| return delivery; | ||
| } | ||
|
|
||
| public Payment getPayment() { | ||
| return payment; | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use empty lines between the single properties