• 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

70.0
/src/main/java/com/invoiced/entity/PaymentSource.java
1
package com.invoiced.entity;
2

3
import com.fasterxml.jackson.annotation.*;
4

5
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "object")
6
@JsonSubTypes({
7
  @JsonSubTypes.Type(value = Card.class, name = "card"),
8
  @JsonSubTypes.Type(value = BankAccount.class, name = "bank_account")
9
})
10
public class PaymentSource extends AbstractEntity {
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_EMPTY)
20
  @JsonProperty("gateway")
21
  public String gateway;
22

23
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
24
  @JsonProperty("gateway_id")
25
  public String gatewayId;
26

27
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
28
  @JsonProperty("gateway_customer")
29
  public String gatewayCustomer;
30

31
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
32
  @JsonProperty("chargeable")
33
  public Boolean chargeable;
34

35
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
36
  @JsonProperty("'failure_reason'")
37
  public String failureReason;
38

39
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
40
  @JsonProperty("receipt_email")
41
  public String receiptEmail;
42

43
  @JsonProperty(value = "created_at", access = JsonProperty.Access.WRITE_ONLY)
44
  public Long createdAt;
45

46
  @JsonProperty(value = "updated_at", access = JsonProperty.Access.WRITE_ONLY)
47
  public Long updatedAt;
48

49
  PaymentSource(Connection conn) {
50
    super(conn, PaymentSource.class);
1✔
51
    this.entityName = "/payment_sources";
1✔
52
  }
1✔
53

54
  PaymentSource() {
55
    super(PaymentSource.class);
1✔
56
    this.entityName = "/payment_sources";
1✔
57
  }
1✔
58

59
  @Override
60
  protected boolean hasCRUD() {
61
    return false;
×
62
  }
63

64
  @Override
65
  @JsonIgnore
66
  protected String getEntityId() {
67
    return String.valueOf(this.id);
1✔
68
  }
69

70
  @Override
71
  @JsonIgnore
72
  protected String[] getCreateExclusions() {
73
    return new String[] {};
×
74
  }
75

76
  @Override
77
  @JsonIgnore
78
  protected String[] getSaveExclusions() {
79
    return new String[] {};
×
80
  }
81
}
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