-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
4,307 additions
and
46 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
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,127 @@ | ||
package com.invoiced.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.invoiced.exception.EntityException; | ||
|
||
public class CatalogItem extends AbstractEntity<CatalogItem> { | ||
|
||
public CatalogItem(Connection conn) { | ||
super(conn, CatalogItem.class); | ||
} | ||
|
||
CatalogItem() { | ||
super(CatalogItem.class); | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected boolean hasCRUD() { | ||
return true; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected boolean idIsString() { | ||
return true; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected String getEntityIdString() { | ||
return this.id; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected boolean hasList() { | ||
return true; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected long getEntityId() throws EntityException { | ||
throw new EntityException(new Throwable()); | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected String getEntityName() { | ||
return "catalog_items"; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected boolean isSubEntity() { | ||
return false; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected void setParentID(long parentID) { | ||
|
||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
protected long getParentID() { | ||
return -1; | ||
} | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("id") | ||
public String id; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("object") | ||
public String object; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("name") | ||
public String name; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("currency") | ||
public String currency; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("unit_cost") | ||
public Long unitCost; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("description") | ||
public String description; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("type") | ||
public String type; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("taxable") | ||
public Boolean taxable; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("taxes") | ||
public Tax[] taxes; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("avalara_tax_code") | ||
public String avalaraTaxCode; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("gl_account") | ||
public String glAccount; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("discountable") | ||
public Boolean discountable; | ||
|
||
@JsonProperty(value = "created_at", access = JsonProperty.Access.WRITE_ONLY) | ||
public long createdAt; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("metadata") | ||
public Object metadata; | ||
|
||
} |
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,56 @@ | ||
package com.invoiced.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ChargeRequest extends AbstractItem { | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("customer") | ||
public long customer; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("method") | ||
public long method; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("currency") | ||
public String currency; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("amount") | ||
public long amount; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("invoiced_token") | ||
public String invoicedToken; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("gateway_token") | ||
public String gatewayToken; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("payment_source_type") | ||
public String paymentSourceType; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("payment_source_id") | ||
public Long paymentSourceId; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("vault_method") | ||
public Boolean vaultMethod; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("make_default") | ||
public Boolean makeDefault; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
@JsonProperty("receipt_email") | ||
public String receiptEmail; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("splits") | ||
public ChargeSplit[] splits; | ||
|
||
} |
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,20 @@ | ||
package com.invoiced.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ChargeSplit extends AbstractItem { | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("type") | ||
public String type; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("invoice") | ||
public long invoice; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_DEFAULT) | ||
@JsonProperty("amount") | ||
public long amount; | ||
|
||
} |
Oops, something went wrong.