Skip to content
This repository was archived by the owner on Jul 10, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3440291
Merge branch 'hotfix/r0.3.3'
duergner Oct 5, 2015
93c6eb0
Merge branch 'release/r0.4.0'
duergner Oct 7, 2015
932151e
Merge branch 'release/r0.5.0'
duergner Oct 16, 2015
6184155
Adding model classes for Address
dipteewarudkar Mar 1, 2016
c7751ef
Fixing GetAddressesResponse structure
dipteewarudkar Mar 2, 2016
e981024
Fixing build warnings
dipteewarudkar Mar 2, 2016
d76ea5e
Fixing update address to http PUT request
dipteewarudkar Mar 2, 2016
d0b45de
Adding wrapper for zalando Api for
dipteewarudkar Mar 2, 2016
ac1bc49
Fixing :
dipteewarudkar Mar 2, 2016
54433f6
Formatting fixes
dipteewarudkar Mar 2, 2016
db78cb1
Changing response of read(customer_no) in addressService to
dipteewarudkar Mar 2, 2016
687364b
Fixing build javadoc errors
dipteewarudkar Mar 2, 2016
ec24c2e
Fixing some more javadoc build error
dipteewarudkar Mar 2, 2016
ac317e4
1)Changing Currency to enum
dipteewarudkar Mar 3, 2016
3a5c64f
Adding service for getting access token and some other small changes
dipteewarudkar Mar 3, 2016
bbf107c
Some changes to removing CreateOrderRequest and using the common Order
dipteewarudkar Mar 4, 2016
8ec5e8c
Using Abstract Service from internal package and handling Exceptions
dipteewarudkar Mar 7, 2016
c1065e9
Some changes needed while integrating with live zalando Apis
dipteewarudkar Mar 11, 2016
137c156
Changing StringEntity to ByteEntity to save special characters such as
dipteewarudkar Mar 17, 2016
29aeff2
Fixing javadoc build errors
dipteewarudkar Mar 17, 2016
64bbfc2
Fixing some more javadoc build errors
dipteewarudkar Mar 17, 2016
818e898
Changing StringEntity to ByteArrayEntity
dipteewarudkar Mar 17, 2016
f4d33da
Implemented Review comments
dipteewarudkar Mar 17, 2016
44c5cce
Implementing review comments , removing content-type setting
dipteewarudkar Mar 17, 2016
9cd8e0e
Some bug fix came up while integration.
dipteewarudkar Apr 5, 2016
8c94a6d
Removing /customers/customer_number/ from urls
dipteewarudkar Apr 27, 2016
ed7383f
Should bump the version to correct snapshot one
duergner Apr 29, 2016
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gradle.properties
*.iws
.classpath
.settings
.project
.project
/bin/
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ apply plugin: 'signing'

group = 'io.sprucehill'
archivesBaseName = 'zalando-java-api-wrapper'
version = '0.5.0'
version = '0.6.0-SNAPSHOT'
description = 'A Java API client for the Zalando REST API'

processResources {
Expand Down Expand Up @@ -76,7 +76,7 @@ uploadArchives {
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: hasProperty('ossrhUsername')?ossrhUsername:'', password: hasProperty('ossrhPassword')?ossrhPassword:'')
authentication(userName: this.hasProperty('ossrhUsername')?ossrhUsername:'', password: this.hasProperty('ossrhPassword')?ossrhPassword:'')
}

pom.project {
Expand Down
121 changes: 121 additions & 0 deletions src/main/java/io/sprucehill/zalando/api/nativecart/model/Address.java
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;
}
}
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;
}
}
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;

@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 src/main/java/io/sprucehill/zalando/api/nativecart/model/Cart.java
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;
}
}
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
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;
}
}
Loading