Record Class Invoice

java.lang.Object
java.lang.Record
kr.paysync.sdk.invoice.Invoice
Record Components:
id - 주문 ID (ivc_...)
number - 워크스페이스 안의 주문번호 (1001부터)
status - 주문 상태
customer - 구매자
amount - 입금받을 금액(원)
paidAmount - 실제로 입금된 금액. 결제 완료 전에는 null입니다.
amountDiff - 입금 금액에서 주문 금액을 뺀 값
bankAccountIds - 입금받을 계좌 ID. 비어 있으면 워크스페이스의 모든 계좌로 받습니다.
cashReceipt - 결제 완료 때 발급할 현금영수증 정보
metadata - 주문을 만들 때 넣은 키-값
source - 주문을 만든 경로
createdBy - 주문을 만든 주체
cafe24 - 카페24 주문이면 카페24 주문 정보
guideUrl - 구매자에게 보여 줄 입금 안내 페이지 주소
guideEmailSentAt - 입금 안내 메일을 마지막으로 보낸 시각
createdAt - 만든 시각
updatedAt - 마지막으로 바뀐 시각
expiresAt - 입금 기한. null이면 기한이 없습니다.
paidAt - 결제 완료 시각
paidTrigger - 결제 완료 경로
paidBy - 결제 완료로 바꾼 주체
matchedTransactionId - 매칭된 입금 ID (trx_...)
canceledAt - 취소 시각
cancelReason - 취소 사유
canceledBy - 취소한 주체
expiredAt - 만료된 시각
reopenedAt - 매칭이 해제돼 다시 열린 시각
history - 주문 기록. 단건 조회에서만 옵니다.

public record Invoice(String id, long number, InvoiceStatus status, Invoice.Customer customer, long amount, @Nullable Long paidAmount, @Nullable Long amountDiff, List<String> bankAccountIds, @Nullable Invoice.CashReceiptInfo cashReceipt, Map<String,String> metadata, InvoiceSource source, Actor createdBy, @Nullable Invoice.Cafe24 cafe24, String guideUrl, @Nullable Instant guideEmailSentAt, Instant createdAt, @Nullable Instant updatedAt, @Nullable Instant expiresAt, @Nullable Instant paidAt, @Nullable PaidTrigger paidTrigger, @Nullable Actor paidBy, @Nullable String matchedTransactionId, @Nullable Instant canceledAt, @Nullable String cancelReason, @Nullable Actor canceledBy, @Nullable Instant expiredAt, @Nullable Instant reopenedAt, @Nullable List<Invoice.History> history) extends Record
주문입니다.
  • Constructor Details

    • Invoice

      public Invoice(String id, long number, InvoiceStatus status, Invoice.Customer customer, long amount, @Nullable Long paidAmount, @Nullable Long amountDiff, List<String> bankAccountIds, @Nullable Invoice.CashReceiptInfo cashReceipt, Map<String,String> metadata, InvoiceSource source, Actor createdBy, @Nullable Invoice.Cafe24 cafe24, String guideUrl, @Nullable Instant guideEmailSentAt, Instant createdAt, @Nullable Instant updatedAt, @Nullable Instant expiresAt, @Nullable Instant paidAt, @Nullable PaidTrigger paidTrigger, @Nullable Actor paidBy, @Nullable String matchedTransactionId, @Nullable Instant canceledAt, @Nullable String cancelReason, @Nullable Actor canceledBy, @Nullable Instant expiredAt, @Nullable Instant reopenedAt, @Nullable List<Invoice.History> history)
      Creates an instance of a Invoice record class.
      Parameters:
      id - the value for the id record component
      number - the value for the number record component
      status - the value for the status record component
      customer - the value for the customer record component
      amount - the value for the amount record component
      paidAmount - the value for the paidAmount record component
      amountDiff - the value for the amountDiff record component
      bankAccountIds - the value for the bankAccountIds record component
      cashReceipt - the value for the cashReceipt record component
      metadata - the value for the metadata record component
      source - the value for the source record component
      createdBy - the value for the createdBy record component
      cafe24 - the value for the cafe24 record component
      guideUrl - the value for the guideUrl record component
      guideEmailSentAt - the value for the guideEmailSentAt record component
      createdAt - the value for the createdAt record component
      updatedAt - the value for the updatedAt record component
      expiresAt - the value for the expiresAt record component
      paidAt - the value for the paidAt record component
      paidTrigger - the value for the paidTrigger record component
      paidBy - the value for the paidBy record component
      matchedTransactionId - the value for the matchedTransactionId record component
      canceledAt - the value for the canceledAt record component
      cancelReason - the value for the cancelReason record component
      canceledBy - the value for the canceledBy record component
      expiredAt - the value for the expiredAt record component
      reopenedAt - the value for the reopenedAt record component
      history - the value for the history record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • number

      public long number()
      Returns the value of the number record component.
      Returns:
      the value of the number record component
    • status

      public InvoiceStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • customer

      public Invoice.Customer customer()
      Returns the value of the customer record component.
      Returns:
      the value of the customer record component
    • amount

      public long amount()
      Returns the value of the amount record component.
      Returns:
      the value of the amount record component
    • paidAmount

      public @Nullable Long paidAmount()
      Returns the value of the paidAmount record component.
      Returns:
      the value of the paidAmount record component
    • amountDiff

      public @Nullable Long amountDiff()
      Returns the value of the amountDiff record component.
      Returns:
      the value of the amountDiff record component
    • bankAccountIds

      public List<String> bankAccountIds()
      Returns the value of the bankAccountIds record component.
      Returns:
      the value of the bankAccountIds record component
    • cashReceipt

      public @Nullable Invoice.CashReceiptInfo cashReceipt()
      Returns the value of the cashReceipt record component.
      Returns:
      the value of the cashReceipt record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component
    • source

      public InvoiceSource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • createdBy

      public Actor createdBy()
      Returns the value of the createdBy record component.
      Returns:
      the value of the createdBy record component
    • cafe24

      public @Nullable Invoice.Cafe24 cafe24()
      Returns the value of the cafe24 record component.
      Returns:
      the value of the cafe24 record component
    • guideUrl

      public String guideUrl()
      Returns the value of the guideUrl record component.
      Returns:
      the value of the guideUrl record component
    • guideEmailSentAt

      public @Nullable Instant guideEmailSentAt()
      Returns the value of the guideEmailSentAt record component.
      Returns:
      the value of the guideEmailSentAt record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • updatedAt

      public @Nullable Instant updatedAt()
      Returns the value of the updatedAt record component.
      Returns:
      the value of the updatedAt record component
    • expiresAt

      public @Nullable Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component
    • paidAt

      public @Nullable Instant paidAt()
      Returns the value of the paidAt record component.
      Returns:
      the value of the paidAt record component
    • paidTrigger

      public @Nullable PaidTrigger paidTrigger()
      Returns the value of the paidTrigger record component.
      Returns:
      the value of the paidTrigger record component
    • paidBy

      public @Nullable Actor paidBy()
      Returns the value of the paidBy record component.
      Returns:
      the value of the paidBy record component
    • matchedTransactionId

      public @Nullable String matchedTransactionId()
      Returns the value of the matchedTransactionId record component.
      Returns:
      the value of the matchedTransactionId record component
    • canceledAt

      public @Nullable Instant canceledAt()
      Returns the value of the canceledAt record component.
      Returns:
      the value of the canceledAt record component
    • cancelReason

      public @Nullable String cancelReason()
      Returns the value of the cancelReason record component.
      Returns:
      the value of the cancelReason record component
    • canceledBy

      public @Nullable Actor canceledBy()
      Returns the value of the canceledBy record component.
      Returns:
      the value of the canceledBy record component
    • expiredAt

      public @Nullable Instant expiredAt()
      Returns the value of the expiredAt record component.
      Returns:
      the value of the expiredAt record component
    • reopenedAt

      public @Nullable Instant reopenedAt()
      Returns the value of the reopenedAt record component.
      Returns:
      the value of the reopenedAt record component
    • history

      public @Nullable List<Invoice.History> history()
      Returns the value of the history record component.
      Returns:
      the value of the history record component