diff --git a/src/main/java/com/shopify/model/AbstractModel.java b/src/main/java/com/shopify/model/AbstractModel.java new file mode 100644 index 00000000..851103b2 --- /dev/null +++ b/src/main/java/com/shopify/model/AbstractModel.java @@ -0,0 +1,17 @@ +package com.shopify.model; + +import javax.xml.bind.annotation.XmlElement; + +public abstract class AbstractModel { + + @XmlElement(name = "admin_graphql_api_id") + private String adminGraphqlApiId; + + public String getAdminGraphqlApiId() { + return adminGraphqlApiId; + } + + public void setAdminGraphqlApiId(final String adminGraphqlApiId) { + this.adminGraphqlApiId = adminGraphqlApiId; + } +} diff --git a/src/main/java/com/shopify/model/Duty.java b/src/main/java/com/shopify/model/Duty.java new file mode 100644 index 00000000..1f232eab --- /dev/null +++ b/src/main/java/com/shopify/model/Duty.java @@ -0,0 +1,75 @@ +package com.shopify.model; + +import com.shopify.model.price.Money; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class Duty extends AbstractModel { + + private String id; + @XmlElement(name = "tax_lines") + private List taxLines; + @XmlElement(name = "shop_money") + private Money shopMoney; + @XmlElement(name = "presentment_money") + private Money presentmentMoney; + @XmlElement(name = "country_code_of_origin") + private String countryCodeOfOrigin; + @XmlElement(name = "harmonized_system_code") + private String harmonizedSystemCode; + + public String getId() { + return id; + } + + public void setId(final String id) { + this.id = id; + } + + public List getTaxLines() { + return taxLines; + } + + public void setTaxLines(final List taxLines) { + this.taxLines = taxLines; + } + + public Money getShopMoney() { + return shopMoney; + } + + public void setShopMoney(final Money shopMoney) { + this.shopMoney = shopMoney; + } + + public Money getPresentmentMoney() { + return presentmentMoney; + } + + public void setPresentmentMoney(final Money presentmentMoney) { + this.presentmentMoney = presentmentMoney; + } + + public String getCountryCodeOfOrigin() { + return countryCodeOfOrigin; + } + + public void setCountryCodeOfOrigin(final String countryCodeOfOrigin) { + this.countryCodeOfOrigin = countryCodeOfOrigin; + } + + public String getHarmonizedSystemCode() { + return harmonizedSystemCode; + } + + public void setHarmonizedSystemCode(final String harmonizedSystemCode) { + this.harmonizedSystemCode = harmonizedSystemCode; + } +} + diff --git a/src/main/java/com/shopify/model/Image.java b/src/main/java/com/shopify/model/Image.java index 5e135532..ffff3e4a 100644 --- a/src/main/java/com/shopify/model/Image.java +++ b/src/main/java/com/shopify/model/Image.java @@ -1,19 +1,19 @@ package com.shopify.model; -import java.util.LinkedList; -import java.util.List; +import com.shopify.model.adapters.DateTimeAdapter; +import com.shopify.model.adapters.EscapedStringAdapter; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import com.shopify.model.adapters.EscapedStringAdapter; +import java.util.LinkedList; +import java.util.List; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class Image { +public class Image extends AbstractModel { private String id; @XmlElement(name = "product_id") @@ -26,6 +26,15 @@ public class Image { @XmlElement(name = "variant_ids") private List variantIds = new LinkedList<>(); private List metafields = new LinkedList<>(); + @XmlElement(name = "created_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) + private String createdAt; + @XmlElement(name = "updated_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) + private String updated_at; + private String alt; + private Long width; + private Long height; public String getId() { return id; @@ -83,4 +92,43 @@ public void setMetafields(List metafields) { this.metafields = metafields; } + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(final String createdAt) { + this.createdAt = createdAt; + } + + public String getUpdated_at() { + return updated_at; + } + + public void setUpdated_at(final String updated_at) { + this.updated_at = updated_at; + } + + public String getAlt() { + return alt; + } + + public void setAlt(final String alt) { + this.alt = alt; + } + + public Long getWidth() { + return width; + } + + public void setWidth(final Long width) { + this.width = width; + } + + public Long getHeight() { + return height; + } + + public void setHeight(final Long height) { + this.height = height; + } } diff --git a/src/main/java/com/shopify/model/PaymentDetails.java b/src/main/java/com/shopify/model/PaymentDetails.java new file mode 100644 index 00000000..06e3cf9a --- /dev/null +++ b/src/main/java/com/shopify/model/PaymentDetails.java @@ -0,0 +1,102 @@ +package com.shopify.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class PaymentDetails { + + @XmlElement(name = "credit_card_bin") + private String creditCardBin; + @XmlElement(name = "avs_result_code") + private String avsResultCode; + @XmlElement(name = "cvv_result_code") + private String cvvResultCode; + @XmlElement(name = "credit_card_number") + private String creditCardNumber; + @XmlElement(name = "credit_card_company") + private String creditCardCompany; + @XmlElement(name = "credit_card_name") + private String creditCardName; + @XmlElement(name = "credit_card_wallet") + private String creditCardWallet; + @XmlElement(name = "credit_card_expiration_month") + private String creditCardExpirationMonth; + @XmlElement(name = "credit_card_expiration_year") + private String creditCardExpirationYear; + + public String getCreditCardBin() { + return creditCardBin; + } + + public void setCreditCardBin(final String creditCardBin) { + this.creditCardBin = creditCardBin; + } + + public String getAvsResultCode() { + return avsResultCode; + } + + public void setAvsResultCode(final String avsResultCode) { + this.avsResultCode = avsResultCode; + } + + public String getCvvResultCode() { + return cvvResultCode; + } + + public void setCvvResultCode(final String cvvResultCode) { + this.cvvResultCode = cvvResultCode; + } + + public String getCreditCardNumber() { + return creditCardNumber; + } + + public void setCreditCardNumber(final String creditCardNumber) { + this.creditCardNumber = creditCardNumber; + } + + public String getCreditCardCompany() { + return creditCardCompany; + } + + public void setCreditCardCompany(final String creditCardCompany) { + this.creditCardCompany = creditCardCompany; + } + + public String getCreditCardName() { + return creditCardName; + } + + public void setCreditCardName(final String creditCardName) { + this.creditCardName = creditCardName; + } + + public String getCreditCardWallet() { + return creditCardWallet; + } + + public void setCreditCardWallet(final String creditCardWallet) { + this.creditCardWallet = creditCardWallet; + } + + public String getCreditCardExpirationMonth() { + return creditCardExpirationMonth; + } + + public void setCreditCardExpirationMonth(final String creditCardExpirationMonth) { + this.creditCardExpirationMonth = creditCardExpirationMonth; + } + + public String getCreditCardExpirationYear() { + return creditCardExpirationYear; + } + + public void setCreditCardExpirationYear(final String creditCardExpirationYear) { + this.creditCardExpirationYear = creditCardExpirationYear; + } +} diff --git a/src/main/java/com/shopify/model/Property.java b/src/main/java/com/shopify/model/Property.java new file mode 100644 index 00000000..98dd382d --- /dev/null +++ b/src/main/java/com/shopify/model/Property.java @@ -0,0 +1,28 @@ +package com.shopify.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class Property { + private String name; + private String value; + + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(final String value) { + this.value = value; + } +} diff --git a/src/main/java/com/shopify/model/SMSMarketingConsent.java b/src/main/java/com/shopify/model/SMSMarketingConsent.java new file mode 100644 index 00000000..08368f45 --- /dev/null +++ b/src/main/java/com/shopify/model/SMSMarketingConsent.java @@ -0,0 +1,32 @@ +package com.shopify.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class SMSMarketingConsent { + + @XmlElement(name = "marketing_state") + private String marketingState; + @XmlElement(name = "marketing_opt_in_level") + private String marketingOptInLevel; + + public String getMarketingState() { + return marketingState; + } + + public void setMarketingState(final String marketingState) { + this.marketingState = marketingState; + } + + public String getMarketingOptInLevel() { + return marketingOptInLevel; + } + + public void setMarketingOptInLevel(final String marketingOptInLevel) { + this.marketingOptInLevel = marketingOptInLevel; + } +} diff --git a/src/main/java/com/shopify/model/Shop.java b/src/main/java/com/shopify/model/Shop.java index 1f7e7c32..b6126926 100644 --- a/src/main/java/com/shopify/model/Shop.java +++ b/src/main/java/com/shopify/model/Shop.java @@ -1,12 +1,16 @@ package com.shopify.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement +@JsonIgnoreProperties(ignoreUnknown = true) public class Shop { private String id; private String name; + private String email; public String getId() { return id; @@ -24,4 +28,11 @@ public void setName(String name) { this.name = name; } + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } } diff --git a/src/main/java/com/shopify/model/ShopifyAddress.java b/src/main/java/com/shopify/model/ShopifyAddress.java index 044ebc7e..e34e38cc 100644 --- a/src/main/java/com/shopify/model/ShopifyAddress.java +++ b/src/main/java/com/shopify/model/ShopifyAddress.java @@ -1,16 +1,17 @@ package com.shopify.model; -import java.math.BigDecimal; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import java.math.BigDecimal; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class ShopifyAddress { + private Long id; + private Long customer_id; @XmlElement(name = "first_name") private String firstName; @XmlElement(name = "last_name") @@ -27,9 +28,29 @@ public class ShopifyAddress { private String provinceCode; @XmlElement(name = "country_code") private String countryCode; + @XmlElement(name = "country_name") + private String countryName; private String phone; private BigDecimal latitude; private BigDecimal longitude; + @XmlElement(name = "default") + private Boolean addressDefault; + + public Long getId() { + return id; + } + + public void setId(final Long id) { + this.id = id; + } + + public Long getCustomer_id() { + return customer_id; + } + + public void setCustomer_id(final Long customer_id) { + this.customer_id = customer_id; + } public String getFirstName() { return firstName; @@ -127,6 +148,14 @@ public void setCountryCode(final String countryCode) { this.countryCode = countryCode; } + public String getCountryName() { + return countryName; + } + + public void setCountryName(final String countryName) { + this.countryName = countryName; + } + public String getPhone() { return phone; } @@ -151,4 +180,11 @@ public void setLongitude(final BigDecimal longitude) { this.longitude = longitude; } + public Boolean getAddressDefault() { + return addressDefault; + } + + public void setAddressDefault(final Boolean addressDefault) { + this.addressDefault = addressDefault; + } } diff --git a/src/main/java/com/shopify/model/ShopifyCustomer.java b/src/main/java/com/shopify/model/ShopifyCustomer.java index 7951d292..013058e2 100644 --- a/src/main/java/com/shopify/model/ShopifyCustomer.java +++ b/src/main/java/com/shopify/model/ShopifyCustomer.java @@ -1,25 +1,30 @@ package com.shopify.model; -import java.math.BigDecimal; +import com.shopify.model.adapters.DateTimeAdapter; +import com.shopify.model.adapters.TagsAdapter; +import org.joda.time.DateTime; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import org.joda.time.DateTime; - -import com.shopify.model.adapters.DateTimeAdapter; +import java.math.BigDecimal; +import java.util.HashSet; +import java.util.List; +import java.util.Set; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class ShopifyCustomer { +public class ShopifyCustomer extends AbstractModel { private String id; private String email; @XmlElement(name = "accepts_marketing") private boolean acceptsMarketing; + @XmlElement(name = "accepts_marketing_updated_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) + private DateTime acceptsMarketingUpdatedAt; @XmlElement(name = "created_at") @XmlJavaTypeAdapter(DateTimeAdapter.class) private DateTime createdAt; @@ -37,6 +42,29 @@ public class ShopifyCustomer { @XmlElement(name = "total_spent") private BigDecimal totalSpent; private String note; + @XmlElement(name = "last_order_id") + private String lastOrderId; + @XmlElement(name = "verified_email") + private Boolean verifiedEmail; + @XmlElement(name = "multipass_identifier") + private String multipass_identifier; + @XmlElement(name = "tax_exempt") + private Boolean taxExempt; + @XmlJavaTypeAdapter(TagsAdapter.class) + @XmlElement(name = "tags") + private Set tags = new HashSet<>(); + @XmlElement(name = "last_order_name") + private String lastOrderName; + private String currency; + @XmlElement(name = "marketing_opt_in_level") + private String marketingOptInLevel; + @XmlElement(name = "tax_exemptions") + private List taxExemptions; + @XmlElement(name = "sms_marketing_consent") + private SMSMarketingConsent smsMarketingConsent; + @XmlElement(name = "default_address") + private ShopifyAddress defaultAddress; + private List addresses; public String getId() { return id; @@ -62,6 +90,14 @@ public void setAcceptsMarketing(boolean acceptsMarketing) { this.acceptsMarketing = acceptsMarketing; } + public DateTime getAcceptsMarketingUpdatedAt() { + return acceptsMarketingUpdatedAt; + } + + public void setAcceptsMarketingUpdatedAt(final DateTime acceptsMarketingUpdatedAt) { + this.acceptsMarketingUpdatedAt = acceptsMarketingUpdatedAt; + } + public DateTime getCreatedAt() { return createdAt; } @@ -134,4 +170,99 @@ public void setNote(String note) { this.note = note; } + public String getLastOrderId() { + return lastOrderId; + } + + public void setLastOrderId(final String lastOrderId) { + this.lastOrderId = lastOrderId; + } + + public Boolean getVerifiedEmail() { + return verifiedEmail; + } + + public void setVerifiedEmail(final Boolean verifiedEmail) { + this.verifiedEmail = verifiedEmail; + } + + public String getMultipass_identifier() { + return multipass_identifier; + } + + public void setMultipass_identifier(final String multipass_identifier) { + this.multipass_identifier = multipass_identifier; + } + + public Boolean getTaxExempt() { + return taxExempt; + } + + public void setTaxExempt(final Boolean taxExempt) { + this.taxExempt = taxExempt; + } + + public Set getTags() { + return tags; + } + + public void setTags(final Set tags) { + this.tags = tags; + } + + public String getLastOrderName() { + return lastOrderName; + } + + public void setLastOrderName(final String lastOrderName) { + this.lastOrderName = lastOrderName; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(final String currency) { + this.currency = currency; + } + + public String getMarketingOptInLevel() { + return marketingOptInLevel; + } + + public void setMarketingOptInLevel(final String marketingOptInLevel) { + this.marketingOptInLevel = marketingOptInLevel; + } + + public List getTaxExemptions() { + return taxExemptions; + } + + public void setTaxExemptions(final List taxExemptions) { + this.taxExemptions = taxExemptions; + } + + public SMSMarketingConsent getSmsMarketingConsent() { + return smsMarketingConsent; + } + + public void setSmsMarketingConsent(final SMSMarketingConsent smsMarketingConsent) { + this.smsMarketingConsent = smsMarketingConsent; + } + + public ShopifyAddress getDefaultAddress() { + return defaultAddress; + } + + public void setDefaultAddress(final ShopifyAddress defaultAddress) { + this.defaultAddress = defaultAddress; + } + + public List getAddresses() { + return addresses; + } + + public void setAddresses(final List addresses) { + this.addresses = addresses; + } } diff --git a/src/main/java/com/shopify/model/ShopifyFulfillment.java b/src/main/java/com/shopify/model/ShopifyFulfillment.java index ae68a983..518af449 100644 --- a/src/main/java/com/shopify/model/ShopifyFulfillment.java +++ b/src/main/java/com/shopify/model/ShopifyFulfillment.java @@ -1,21 +1,19 @@ package com.shopify.model; -import java.util.LinkedList; -import java.util.List; +import com.shopify.model.adapters.DateTimeAdapter; +import org.joda.time.DateTime; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import org.joda.time.DateTime; - -import com.shopify.model.adapters.DateTimeAdapter; +import java.util.LinkedList; +import java.util.List; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class ShopifyFulfillment { +public class ShopifyFulfillment extends AbstractModel { public enum Status { diff --git a/src/main/java/com/shopify/model/ShopifyLineItem.java b/src/main/java/com/shopify/model/ShopifyLineItem.java index 18ae438c..32709727 100644 --- a/src/main/java/com/shopify/model/ShopifyLineItem.java +++ b/src/main/java/com/shopify/model/ShopifyLineItem.java @@ -1,17 +1,19 @@ package com.shopify.model; -import java.math.BigDecimal; -import java.util.LinkedList; -import java.util.List; +import com.shopify.model.discount.DiscountAllocation; +import com.shopify.model.price.PriceSet; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import java.math.BigDecimal; +import java.util.LinkedList; +import java.util.List; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class ShopifyLineItem { +public class ShopifyLineItem extends AbstractModel { private String id; @XmlElement(name = "variant_id") @@ -44,6 +46,26 @@ public class ShopifyLineItem { private String fulfillmentService; @XmlElement(name = "tax_lines") private List taxLines = new LinkedList<>(); + @XmlElement(name = "origin_location") + private ShopifyAddress originLocation; + @XmlElement(name = "price_set") + private PriceSet priceSet; + @XmlElement(name = "discounted_price") + private BigDecimal discountedPrice; + @XmlElement(name = "discounted_price_set") + private PriceSet discountedPriceSet; + @XmlElement(name = "carrier_identifier") + private String carrierIdentifier; + @XmlElement(name = "requested_fulfillment_service_id") + private String requestedFulfillmentServiceId; + @XmlElement(name = "product_exists") + private Boolean productExists; + private List properties; + @XmlElement(name = "total_discount_set") + private PriceSet totalDiscountSet; + private List duties; + @XmlElement(name = "discount_allocations") + private List discountAllocations; public String getId() { return id; @@ -205,4 +227,91 @@ public void setTaxLines(final List taxLines) { this.taxLines = taxLines; } + public ShopifyAddress getOriginLocation() { + return originLocation; + } + + public void setOriginLocation(final ShopifyAddress originLocation) { + this.originLocation = originLocation; + } + + public PriceSet getPriceSet() { + return priceSet; + } + + public void setPriceSet(final PriceSet priceSet) { + this.priceSet = priceSet; + } + + public BigDecimal getDiscountedPrice() { + return discountedPrice; + } + + public void setDiscountedPrice(final BigDecimal discountedPrice) { + this.discountedPrice = discountedPrice; + } + + public PriceSet getDiscountedPriceSet() { + return discountedPriceSet; + } + + public void setDiscountedPriceSet(final PriceSet discountedPriceSet) { + this.discountedPriceSet = discountedPriceSet; + } + + public String getCarrierIdentifier() { + return carrierIdentifier; + } + + public void setCarrierIdentifier(final String carrierIdentifier) { + this.carrierIdentifier = carrierIdentifier; + } + + public String getRequestedFulfillmentServiceId() { + return requestedFulfillmentServiceId; + } + + public void setRequestedFulfillmentServiceId(final String requestedFulfillmentServiceId) { + this.requestedFulfillmentServiceId = requestedFulfillmentServiceId; + } + + public Boolean getProductExists() { + return productExists; + } + + public void setProductExists(final Boolean productExists) { + this.productExists = productExists; + } + + public List getProperties() { + return properties; + } + + public void setProperties(final List properties) { + this.properties = properties; + } + + public PriceSet getTotalDiscountSet() { + return totalDiscountSet; + } + + public void setTotalDiscountSet(final PriceSet totalDiscountSet) { + this.totalDiscountSet = totalDiscountSet; + } + + public List getDuties() { + return duties; + } + + public void setDuties(final List duties) { + this.duties = duties; + } + + public List getDiscountAllocations() { + return discountAllocations; + } + + public void setDiscountAllocations(final List discountAllocations) { + this.discountAllocations = discountAllocations; + } } diff --git a/src/main/java/com/shopify/model/ShopifyOrder.java b/src/main/java/com/shopify/model/ShopifyOrder.java index ef92ad49..ab5ad053 100644 --- a/src/main/java/com/shopify/model/ShopifyOrder.java +++ b/src/main/java/com/shopify/model/ShopifyOrder.java @@ -1,24 +1,27 @@ package com.shopify.model; -import java.math.BigDecimal; -import java.util.Currency; -import java.util.LinkedList; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.shopify.model.adapters.CurrencyAdapter; +import com.shopify.model.adapters.DateTimeAdapter; +import com.shopify.model.discount.DiscountApplication; +import com.shopify.model.discount.DiscountCode; +import com.shopify.model.price.PriceSet; +import org.joda.time.DateTime; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import org.joda.time.DateTime; - -import com.shopify.model.adapters.CurrencyAdapter; -import com.shopify.model.adapters.DateTimeAdapter; +import java.math.BigDecimal; +import java.util.Currency; +import java.util.LinkedList; +import java.util.List; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class ShopifyOrder { +@JsonIgnoreProperties({"client_details", "payment_terms"}) +public class ShopifyOrder extends AbstractModel { private String id; private String email; @@ -103,10 +106,83 @@ public class ShopifyOrder { private List noteAttributes = new LinkedList<>(); private List refunds = new LinkedList<>(); private List metafields = new LinkedList<>(); - + @XmlElement(name = "app_id") + private Long appId; + @XmlElement(name = "checkout_id") + private Long checkoutId; + @XmlElement(name = "checkout_token") + private String checkoutToken; + private Boolean confirmed; + @XmlElement(name = "contact_email") + private String contactEmail; + @XmlElement(name = "landing_site_ref") + private String landingSiteRef; + @XmlElement(name = "current_subtotal_price") + private BigDecimal currentSubtotalPrice; + @XmlElement(name = "current_subtotal_price_set") + private PriceSet currentSubtotalPriceSet; + @XmlElement(name = "current_total_discounts") + private BigDecimal currentTotalDiscounts; + @XmlElement(name = "current_total_duties_set") + private PriceSet currentTotalDutiesSet; + @XmlElement(name = "current_total_discounts_set") + private PriceSet currentTotalDiscountsSet; + @XmlElement(name = "current_total_price") + private BigDecimal currentTotalPrice; + @XmlElement(name = "current_total_price_set") + private PriceSet currentTotalPriceSet; + @XmlElement(name = "current_total_tax") + private BigDecimal currentTotalTax; + @XmlElement(name = "current_total_tax_set") + private PriceSet currentTotalTaxSet; + @XmlElement(name = "customer_locale") + private String customerLocale; + @XmlElement(name = "device_id") + private String deviceId; + @XmlElement(name = "discount_codes") + private List discountCodes; + @XmlElement(name = "estimated_taxes") + private Boolean estimatedTaxes; + private String gateway; + @XmlElement(name = "original_total_duties_set") + private PriceSet originalTotalDutiesSet; + @XmlElement(name = "payment_gateway_names") + private List paymentGatewayNames; + private String phone; + @XmlElement(name = "presentment_currency") + private String presentmentCurrency; + @XmlElement(name = "reference") + private String reference; + @XmlElement(name = "source_identifier") + private String sourceIdentifier; + @XmlElement(name = "source_url") + private String sourceUrl; + @XmlElement(name = "subtotal_price_set") + private PriceSet subtotalPriceSet; + private Boolean test; + @XmlElement(name = "total_discounts_set") + private PriceSet totalDiscountsSet; + @XmlElement(name = "total_line_items_price_set") + private PriceSet totalLineItemsPriceSet; + @XmlElement(name = "total_outstanding") + private BigDecimal totalOutstanding; public String getId() { return id; } + @XmlElement(name = "total_price_set") + private PriceSet totalPriceSet; + @XmlElement(name = "total_price_usd") + private BigDecimal totalPriceUsd; + @XmlElement(name = "total_shipping_price_set") + private PriceSet totalShippingPriceSet; + @XmlElement(name = "total_tax_set") + private PriceSet totalTaxSet; + @XmlElement(name = "total_tip_received") + private BigDecimal totalTipReceived; + @XmlElement(name = "discount_applications") + private List discountApplications; + @XmlElement(name = "payment_details") + private PaymentDetails paymentDetails; public void setId(final String id) { this.id = id; @@ -455,4 +531,316 @@ public List getRefunds() { public void setRefunds(final List refunds) { this.refunds = refunds; } + + public Long getAppId() { + return appId; + } + + public void setAppId(final Long appId) { + this.appId = appId; + } + + public Long getCheckoutId() { + return checkoutId; + } + + public void setCheckoutId(final Long checkoutId) { + this.checkoutId = checkoutId; + } + + public String getCheckoutToken() { + return checkoutToken; + } + + public void setCheckoutToken(final String checkoutToken) { + this.checkoutToken = checkoutToken; + } + + public Boolean getConfirmed() { + return confirmed; + } + + public void setConfirmed(final Boolean confirmed) { + this.confirmed = confirmed; + } + + public String getContactEmail() { + return contactEmail; + } + + public void setContactEmail(final String contactEmail) { + this.contactEmail = contactEmail; + } + + public String getLandingSiteRef() { + return landingSiteRef; + } + + public void setLandingSiteRef(final String landingSiteRef) { + this.landingSiteRef = landingSiteRef; + } + + public BigDecimal getCurrentSubtotalPrice() { + return currentSubtotalPrice; + } + + public void setCurrentSubtotalPrice(final BigDecimal currentSubtotalPrice) { + this.currentSubtotalPrice = currentSubtotalPrice; + } + + public PriceSet getCurrentSubtotalPriceSet() { + return currentSubtotalPriceSet; + } + + public void setCurrentSubtotalPriceSet(final PriceSet currentSubtotalPriceSet) { + this.currentSubtotalPriceSet = currentSubtotalPriceSet; + } + + public BigDecimal getCurrentTotalDiscounts() { + return currentTotalDiscounts; + } + + public void setCurrentTotalDiscounts(final BigDecimal currentTotalDiscounts) { + this.currentTotalDiscounts = currentTotalDiscounts; + } + + public PriceSet getCurrentTotalDiscountsSet() { + return currentTotalDiscountsSet; + } + + public void setCurrentTotalDiscountsSet(final PriceSet currentTotalDiscountsSet) { + this.currentTotalDiscountsSet = currentTotalDiscountsSet; + } + + public PriceSet getCurrentTotalDutiesSet() { + return currentTotalDutiesSet; + } + + public void setCurrentTotalDutiesSet(final PriceSet currentTotalDutiesSet) { + this.currentTotalDutiesSet = currentTotalDutiesSet; + } + + public BigDecimal getCurrentTotalPrice() { + return currentTotalPrice; + } + + public void setCurrentTotalPrice(final BigDecimal currentTotalPrice) { + this.currentTotalPrice = currentTotalPrice; + } + + public PriceSet getCurrentTotalPriceSet() { + return currentTotalPriceSet; + } + + public void setCurrentTotalPriceSet(final PriceSet currentTotalPriceSet) { + this.currentTotalPriceSet = currentTotalPriceSet; + } + + public BigDecimal getCurrentTotalTax() { + return currentTotalTax; + } + + public void setCurrentTotalTax(final BigDecimal currentTotalTax) { + this.currentTotalTax = currentTotalTax; + } + + public PriceSet getCurrentTotalTaxSet() { + return currentTotalTaxSet; + } + + public void setCurrentTotalTaxSet(final PriceSet currentTotalTaxSet) { + this.currentTotalTaxSet = currentTotalTaxSet; + } + + public String getCustomerLocale() { + return customerLocale; + } + + public void setCustomerLocale(final String customerLocale) { + this.customerLocale = customerLocale; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(final String deviceId) { + this.deviceId = deviceId; + } + + public List getDiscountCodes() { + return discountCodes; + } + + public void setDiscountCodes(final List discountCodes) { + this.discountCodes = discountCodes; + } + + public Boolean getEstimatedTaxes() { + return estimatedTaxes; + } + + public void setEstimatedTaxes(final Boolean estimatedTaxes) { + this.estimatedTaxes = estimatedTaxes; + } + + public String getGateway() { + return gateway; + } + + public void setGateway(final String gateway) { + this.gateway = gateway; + } + + public PriceSet getOriginalTotalDutiesSet() { + return originalTotalDutiesSet; + } + + public void setOriginalTotalDutiesSet(final PriceSet originalTotalDutiesSet) { + this.originalTotalDutiesSet = originalTotalDutiesSet; + } + + public List getPaymentGatewayNames() { + return paymentGatewayNames; + } + + public void setPaymentGatewayNames(final List paymentGatewayNames) { + this.paymentGatewayNames = paymentGatewayNames; + } + + public String getPhone() { + return phone; + } + + public void setPhone(final String phone) { + this.phone = phone; + } + + public String getPresentmentCurrency() { + return presentmentCurrency; + } + + public void setPresentmentCurrency(final String presentmentCurrency) { + this.presentmentCurrency = presentmentCurrency; + } + + public String getReference() { + return reference; + } + + public void setReference(final String reference) { + this.reference = reference; + } + + public String getSourceIdentifier() { + return sourceIdentifier; + } + + public void setSourceIdentifier(final String sourceIdentifier) { + this.sourceIdentifier = sourceIdentifier; + } + + public String getSourceUrl() { + return sourceUrl; + } + + public void setSourceUrl(final String sourceUrl) { + this.sourceUrl = sourceUrl; + } + + public PriceSet getSubtotalPriceSet() { + return subtotalPriceSet; + } + + public void setSubtotalPriceSet(final PriceSet subtotalPriceSet) { + this.subtotalPriceSet = subtotalPriceSet; + } + + public Boolean getTest() { + return test; + } + + public void setTest(final Boolean test) { + this.test = test; + } + + public PriceSet getTotalDiscountsSet() { + return totalDiscountsSet; + } + + public void setTotalDiscountsSet(final PriceSet totalDiscountsSet) { + this.totalDiscountsSet = totalDiscountsSet; + } + + public PriceSet getTotalLineItemsPriceSet() { + return totalLineItemsPriceSet; + } + + public void setTotalLineItemsPriceSet(final PriceSet totalLineItemsPriceSet) { + this.totalLineItemsPriceSet = totalLineItemsPriceSet; + } + + public BigDecimal getTotalOutstanding() { + return totalOutstanding; + } + + public void setTotalOutstanding(final BigDecimal totalOutstanding) { + this.totalOutstanding = totalOutstanding; + } + + public PriceSet getTotalPriceSet() { + return totalPriceSet; + } + + public void setTotalPriceSet(final PriceSet totalPriceSet) { + this.totalPriceSet = totalPriceSet; + } + + public BigDecimal getTotalPriceUsd() { + return totalPriceUsd; + } + + public void setTotalPriceUsd(final BigDecimal totalPriceUsd) { + this.totalPriceUsd = totalPriceUsd; + } + + public PriceSet getTotalShippingPriceSet() { + return totalShippingPriceSet; + } + + public void setTotalShippingPriceSet(final PriceSet totalShippingPriceSet) { + this.totalShippingPriceSet = totalShippingPriceSet; + } + + public PriceSet getTotalTaxSet() { + return totalTaxSet; + } + + public void setTotalTaxSet(final PriceSet totalTaxSet) { + this.totalTaxSet = totalTaxSet; + } + + public BigDecimal getTotalTipReceived() { + return totalTipReceived; + } + + public void setTotalTipReceived(final BigDecimal totalTipReceived) { + this.totalTipReceived = totalTipReceived; + } + + public List getDiscountApplications() { + return discountApplications; + } + + public void setDiscountApplications(final List discountApplications) { + this.discountApplications = discountApplications; + } + + public PaymentDetails getPaymentDetails() { + return paymentDetails; + } + + public void setPaymentDetails(final PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + } } diff --git a/src/main/java/com/shopify/model/ShopifyProduct.java b/src/main/java/com/shopify/model/ShopifyProduct.java index a026395c..9fe396a5 100644 --- a/src/main/java/com/shopify/model/ShopifyProduct.java +++ b/src/main/java/com/shopify/model/ShopifyProduct.java @@ -1,26 +1,21 @@ package com.shopify.model; -import java.util.Comparator; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; +import com.shopify.model.adapters.DateTimeAdapter; +import com.shopify.model.adapters.EscapedStringAdapter; +import com.shopify.model.adapters.TagsAdapter; +import org.apache.commons.lang3.StringUtils; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -import org.apache.commons.lang3.StringUtils; - -import com.shopify.model.adapters.EscapedStringAdapter; -import com.shopify.model.adapters.TagsAdapter; +import java.util.*; +import java.util.stream.Collectors; @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) -public class ShopifyProduct { +public class ShopifyProduct extends AbstractModel { private String id; @XmlJavaTypeAdapter(EscapedStringAdapter.class) @@ -44,14 +39,27 @@ public class ShopifyProduct { private Image image; private List variants = new LinkedList<>(); @XmlElement(name = "published_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) private String publishedAt; + @XmlElement(name = "created_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) + private String createdAt; + @XmlElement(name = "updated_at") + @XmlJavaTypeAdapter(DateTimeAdapter.class) + private String updatedAt; private Boolean published; + private String handle; + @XmlElement(name = "template_suffix") + private String templateSuffix; + private String status; + @XmlElement(name = "published_scope") + private String publishedScope; public String getId() { return id; } - public void setId(String id) { + public void setId(final String id) { this.id = id; } @@ -59,7 +67,7 @@ public String getTitle() { return title; } - public void setTitle(String title) { + public void setTitle(final String title) { this.title = title; } @@ -67,7 +75,7 @@ public String getProductType() { return productType; } - public void setProductType(String productType) { + public void setProductType(final String productType) { this.productType = productType; } @@ -75,7 +83,7 @@ public String getBodyHtml() { return bodyHtml; } - public void setBodyHtml(String bodyHtml) { + public void setBodyHtml(final String bodyHtml) { this.bodyHtml = bodyHtml; } @@ -83,7 +91,7 @@ public String getVendor() { return vendor; } - public void setVendor(String vendor) { + public void setVendor(final String vendor) { this.vendor = vendor; } @@ -91,7 +99,7 @@ public Set getTags() { return tags; } - public void setTags(Set tags) { + public void setTags(final Set tags) { this.tags = tags; } @@ -99,7 +107,7 @@ public List