• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Invoiced / invoiced-java / #255

02 Feb 2024 11:00PM CUT coverage: 81.958%. Remained the same
#255

push

github

jaredtking
Add publish action

695 of 848 relevant lines covered (81.96%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

54.17
/src/main/java/com/invoiced/entity/Note.java
1
package com.invoiced.entity;
2

3
import com.fasterxml.jackson.annotation.JsonFilter;
4
import com.fasterxml.jackson.annotation.JsonIgnore;
5
import com.fasterxml.jackson.annotation.JsonInclude;
6
import com.fasterxml.jackson.annotation.JsonProperty;
7
import com.invoiced.exception.EntityException;
8

9
@JsonFilter("customFilter")
10
public final class Note extends AbstractEntity<Note> {
11

12
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
13
    @JsonProperty("id")
14
    public Long id;
15

16
    @JsonProperty(value = "object", access = JsonProperty.Access.WRITE_ONLY)
17
    public String object;
18

19
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
20
    @JsonProperty("notes")
21
    public String notes;
22

23
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
24
    @JsonProperty("customer")
25
    public Long customer;
26

27
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
28
    @JsonProperty("user")
29
    public Object user;
30

31
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
32
    @JsonProperty("metadata")
33
    public Object metadata;
34

35
    @JsonProperty(value = "created_at", access = JsonProperty.Access.WRITE_ONLY)
36
    public Long createdAt;
37

38
    @JsonProperty(value = "updated_at", access = JsonProperty.Access.WRITE_ONLY)
39
    public Long updatedAt;
40

41
    public Note(Connection conn) {
42
        super(conn, Note.class);
1✔
43
        this.entityName = "/notes";
1✔
44
    }
1✔
45

46
    Note() {
47
        super(Note.class);
1✔
48
        this.entityName = "/notes";
1✔
49
    }
1✔
50

51
    @Override
52
    @JsonIgnore
53
    protected String getEntityId() {
54
        return String.valueOf(this.id);
1✔
55
    }
56

57
    @Override
58
    @JsonIgnore
59
    protected String[] getCreateExclusions() {
60
        return new String[]{"id", "object", "created_at"};
1✔
61
    }
62

63
    @Override
64
    @JsonIgnore
65
    protected String[] getSaveExclusions() {
66
        return new String[]{"id", "object", "customer", "customer_id", "invoice_id", "created_at"};
×
67
    }
68

69
    @Override
70
    public void create() throws EntityException {
71
        String endpointBase = this.getEndpointBase();
1✔
72
        this.setEndpointBase("");
1✔
73
        super.create();
1✔
74
        this.setEndpointBase(endpointBase);
1✔
75
    }
1✔
76

77
    @Override
78
    public void save() throws EntityException {
79
        String endpointBase = this.getEndpointBase();
×
80
        this.setEndpointBase("");
×
81
        super.save();
×
82
        this.setEndpointBase(endpointBase);
×
83
    }
×
84

85
    @Override
86
    public void delete() throws EntityException {
87
        String endpointBase = this.getEndpointBase();
×
88
        this.setEndpointBase("");
×
89
        super.delete();
×
90
        this.setEndpointBase(endpointBase);
×
91
    }
×
92
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc