Skip to content

Commit c827ed5

Browse files
Add more properties to the Order class.
1 parent 13ca5e8 commit c827ed5

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.storakle.shopify</groupId>
88
<artifactId>shopify-api-java-wrapper</artifactId>
9-
<version>0.1.0</version>
9+
<version>0.1.1</version>
1010
<build>
1111
<sourceDirectory>src/main/java</sourceDirectory>
1212
<plugins>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.storakle.shopify.domain;
2+
3+
public enum FinancialStatus
4+
{
5+
authorized,
6+
pending,
7+
paid,
8+
refunded,
9+
voided
10+
}

src/main/java/com/storakle/shopify/domain/JsonConstants.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ public final class JsonConstants
4848
public static final String ORDERS = "orders";
4949

5050
public static final String TOTAL_PRICE = "total_price";
51+
public static final String DISCOUNT = "total_discounts";
5152
public static final String FINANCIAL_STATUS = "financial_status";
5253
public static final String CUSTOMER = "customer";
5354
public static final String LINE_ITEMS = "line_items";
5455
public static final String VARIANT_TITLE = "variant_title";
5556
public static final String NAME = "name";
5657
public static final String QUANTITY = "quantity";
58+
public static final String BILLING_ADDRESS = "billing_address";
59+
public static final String SHIPPING_ADDRESS = "shipping_address";
5760

5861
// Webhook
5962
public static final String WEBHOOK = "webhook";

src/main/java/com/storakle/shopify/domain/Order.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,21 @@ public class Order
2020
@JsonProperty(value = JsonConstants.TOTAL_PRICE)
2121
private BigDecimal totalPrice;
2222

23+
@JsonProperty(value = JsonConstants.DISCOUNT)
24+
private BigDecimal discount;
25+
2326
@JsonProperty(value = JsonConstants.FINANCIAL_STATUS)
24-
private String financialStatus;
27+
private FinancialStatus financialStatus;
2528

2629
@JsonProperty(value = JsonConstants.CUSTOMER)
2730
private Customer customer;
2831

32+
@JsonProperty(value = JsonConstants.BILLING_ADDRESS)
33+
private Address billingAddress;
34+
35+
@JsonProperty(value = JsonConstants.SHIPPING_ADDRESS)
36+
private Address shippingAddress;
37+
2938
@JsonProperty(value = JsonConstants.LINE_ITEMS)
3039
private List<LineItem> lineItems;
3140

0 commit comments

Comments
 (0)