Class BookingContract

java.lang.Object
io.trippay.sdk.payment.model.BookingContract

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-04-26T14:25:21.883820559+07:00[Asia/Bangkok]") public class BookingContract extends Object
A booking record is the contract that got created after a successful payment was submitted.
  • Field Details

  • Constructor Details

    • BookingContract

      public BookingContract()
  • Method Details

    • id

      public BookingContract id(String id)
    • getId

      @Nullable public String getId()
      Document UUID
      Returns:
      id
    • setId

      public void setId(String id)
    • createdDate

      public BookingContract createdDate(LocalDateTime createdDate)
    • getCreatedDate

      @Nullable @Valid public LocalDateTime getCreatedDate()
      Datetime this record was first created
      Returns:
      createdDate
    • setCreatedDate

      public void setCreatedDate(LocalDateTime createdDate)
    • lastUpdate

      public BookingContract lastUpdate(LocalDateTime lastUpdate)
    • getLastUpdate

      @Nullable @Valid public LocalDateTime getLastUpdate()
      Datetime this record was last updated
      Returns:
      lastUpdate
    • setLastUpdate

      public void setLastUpdate(LocalDateTime lastUpdate)
    • version

      public BookingContract version(Long version)
    • getVersion

      @Nullable public Long getVersion()
      Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
      Returns:
      version
    • setVersion

      public void setVersion(Long version)
    • ipAddress

      public BookingContract ipAddress(String ipAddress)
    • getIpAddress

      @Nonnull @NotNull public @NotNull String getIpAddress()
      Caller's IP address
      Returns:
      ipAddress
    • setIpAddress

      public void setIpAddress(String ipAddress)
    • traceId

      public BookingContract traceId(String traceId)
    • getTraceId

      @Nonnull @NotNull public @NotNull String getTraceId()
      Way to track which booking contracts were made together
      Returns:
      traceId
    • setTraceId

      public void setTraceId(String traceId)
    • sourceUrl

      public BookingContract sourceUrl(String sourceUrl)
    • getSourceUrl

      @Nonnull @NotNull public @NotNull String getSourceUrl()
      Where did the booking occur
      Returns:
      sourceUrl
    • setSourceUrl

      public void setSourceUrl(String sourceUrl)
    • identifier

      public BookingContract identifier(String identifier)
    • getIdentifier

      @Nonnull @NotNull public @NotNull String getIdentifier()
      Unique identifier used to track the contract.
      Returns:
      identifier
    • setIdentifier

      public void setIdentifier(String identifier)
    • supplierIdentifier

      public BookingContract supplierIdentifier(UUID supplierIdentifier)
    • getSupplierIdentifier

      @Nonnull @NotNull @Valid public @NotNull @Valid UUID getSupplierIdentifier()
      Supplier identifier
      Returns:
      supplierIdentifier
    • setSupplierIdentifier

      public void setSupplierIdentifier(UUID supplierIdentifier)
    • supplierName

      public BookingContract supplierName(String supplierName)
    • getSupplierName

      @Nonnull @NotNull public @NotNull String getSupplierName()
      Supplier name
      Returns:
      supplierName
    • setSupplierName

      public void setSupplierName(String supplierName)
    • displayPriceQuote

      public BookingContract displayPriceQuote(Quote displayPriceQuote)
    • getDisplayPriceQuote

      @Nonnull @NotNull @Valid public @NotNull @Valid Quote getDisplayPriceQuote()
      Get displayPriceQuote
      Returns:
      displayPriceQuote
    • setDisplayPriceQuote

      public void setDisplayPriceQuote(Quote displayPriceQuote)
    • supplierPriceQuote

      public BookingContract supplierPriceQuote(Quote supplierPriceQuote)
    • getSupplierPriceQuote

      @Nonnull @NotNull @Valid public @NotNull @Valid Quote getSupplierPriceQuote()
      Get supplierPriceQuote
      Returns:
      supplierPriceQuote
    • setSupplierPriceQuote

      public void setSupplierPriceQuote(Quote supplierPriceQuote)
    • internalPriceQuote

      public BookingContract internalPriceQuote(Quote internalPriceQuote)
    • getInternalPriceQuote

      @Nonnull @NotNull @Valid public @NotNull @Valid Quote getInternalPriceQuote()
      Get internalPriceQuote
      Returns:
      internalPriceQuote
    • setInternalPriceQuote

      public void setInternalPriceQuote(Quote internalPriceQuote)
    • capturePriceQuote

      public BookingContract capturePriceQuote(Quote capturePriceQuote)
    • getCapturePriceQuote

      @Nonnull @NotNull @Valid public @NotNull @Valid Quote getCapturePriceQuote()
      Get capturePriceQuote
      Returns:
      capturePriceQuote
    • setCapturePriceQuote

      public void setCapturePriceQuote(Quote capturePriceQuote)
    • itemList

      public BookingContract itemList(List<BookingContractItem> itemList)
    • addItemListItem

      public BookingContract addItemListItem(BookingContractItem itemListItem)
    • getItemList

      @Nonnull @NotNull @Valid @Size(min=1, max=2147483647) public @NotNull @Valid @Size(min=1,max=2147483647) List<BookingContractItem> getItemList()
      Holds one booking line item for a specific supplier.
      Returns:
      itemList
    • setItemList

      public void setItemList(List<BookingContractItem> itemList)
    • externalSupplierIdentifier

      public BookingContract externalSupplierIdentifier(String externalSupplierIdentifier)
    • getExternalSupplierIdentifier

      @Nullable public String getExternalSupplierIdentifier()
      Contract creator can choose to geoname this record with her own identifier
      Returns:
      externalSupplierIdentifier
    • setExternalSupplierIdentifier

      public void setExternalSupplierIdentifier(String externalSupplierIdentifier)
    • externalSupplierBookingCode

      public BookingContract externalSupplierBookingCode(String externalSupplierBookingCode)
    • getExternalSupplierBookingCode

      @Nullable public String getExternalSupplierBookingCode()
      External booking code generated by the caller
      Returns:
      externalSupplierBookingCode
    • setExternalSupplierBookingCode

      public void setExternalSupplierBookingCode(String externalSupplierBookingCode)
    • payment

    • getPayment

      @Nonnull @NotNull @Valid public @NotNull @Valid BookingContractPaymentDetails getPayment()
      Get payment
      Returns:
      payment
    • setPayment

      public void setPayment(BookingContractPaymentDetails payment)
    • cancelled

      public BookingContract cancelled(Boolean cancelled)
    • getCancelled

      @Nonnull @NotNull public @NotNull Boolean getCancelled()
      Whether the booking was cancelled.
      Returns:
      cancelled
    • setCancelled

      public void setCancelled(Boolean cancelled)
    • cancelledOn

      public BookingContract cancelledOn(LocalDateTime cancelledOn)
    • getCancelledOn

      @Nullable @Valid public LocalDateTime getCancelledOn()
      When the booking was cancelled.
      Returns:
      cancelledOn
    • setCancelledOn

      public void setCancelledOn(LocalDateTime cancelledOn)
    • canceller

      public BookingContract canceller(BookingContract.CancellerEnum canceller)
    • getCanceller

      @Nullable public BookingContract.CancellerEnum getCanceller()
      Type of entity that cancelled the booking.
      Returns:
      canceller
    • setCanceller

      public void setCanceller(BookingContract.CancellerEnum canceller)
    • cancellationType

      public BookingContract cancellationType(BookingContract.CancellationTypeEnum cancellationType)
    • getCancellationType

      @Nullable public BookingContract.CancellationTypeEnum getCancellationType()
      Reason type.
      Returns:
      cancellationType
    • setCancellationType

      public void setCancellationType(BookingContract.CancellationTypeEnum cancellationType)
    • cancellerUserIdentifier

      public BookingContract cancellerUserIdentifier(String cancellerUserIdentifier)
    • getCancellerUserIdentifier

      @Nullable public String getCancellerUserIdentifier()
      User identifier that cancelled the entity.
      Returns:
      cancellerUserIdentifier
    • setCancellerUserIdentifier

      public void setCancellerUserIdentifier(String cancellerUserIdentifier)
    • cancelReason

      public BookingContract cancelReason(String cancelReason)
    • getCancelReason

      @Nullable public String getCancelReason()
      Reason for cancellation.
      Returns:
      cancelReason
    • setCancelReason

      public void setCancelReason(String cancelReason)
    • fundsAddedToLedger

      public BookingContract fundsAddedToLedger(Boolean fundsAddedToLedger)
    • getFundsAddedToLedger

      @Nullable public Boolean getFundsAddedToLedger()
      Whether the contract has been added to the ledger; rady for payout.
      Returns:
      fundsAddedToLedger
    • setFundsAddedToLedger

      public void setFundsAddedToLedger(Boolean fundsAddedToLedger)
    • fundsProcessed

      public BookingContract fundsProcessed(Boolean fundsProcessed)
    • getFundsProcessed

      @Nullable public Boolean getFundsProcessed()
      Whether a funds transfer request has been created for this booking.
      Returns:
      fundsProcessed
    • setFundsProcessed

      public void setFundsProcessed(Boolean fundsProcessed)
    • refunds

      public BookingContract refunds(List<Refund> refunds)
    • addRefundsItem

      public BookingContract addRefundsItem(Refund refundsItem)
    • getRefunds

      @Nullable @Valid public @Valid List<Refund> getRefunds()
      An optional list of refunds that occurred with this booking. If the refund amount(s) is the same as the total price, the booking also gets cancelled.
      Returns:
      refunds
    • setRefunds

      public void setRefunds(List<Refund> refunds)
    • sourceCurrency

      public BookingContract sourceCurrency(String sourceCurrency)
    • getSourceCurrency

      @Nonnull @NotNull public @NotNull String getSourceCurrency()
      The source currency
      Returns:
      sourceCurrency
    • setSourceCurrency

      public void setSourceCurrency(String sourceCurrency)
    • displayCurrency

      public BookingContract displayCurrency(String displayCurrency)
    • getDisplayCurrency

      @Nonnull @NotNull public @NotNull String getDisplayCurrency()
      The display currency
      Returns:
      displayCurrency
    • setDisplayCurrency

      public void setDisplayCurrency(String displayCurrency)
    • supplierCurrency

      public BookingContract supplierCurrency(String supplierCurrency)
    • getSupplierCurrency

      @Nonnull @NotNull public @NotNull String getSupplierCurrency()
      The supplier currency
      Returns:
      supplierCurrency
    • setSupplierCurrency

      public void setSupplierCurrency(String supplierCurrency)
    • internalCurrency

      public BookingContract internalCurrency(String internalCurrency)
    • getInternalCurrency

      @Nonnull @NotNull public @NotNull String getInternalCurrency()
      The internal currency
      Returns:
      internalCurrency
    • setInternalCurrency

      public void setInternalCurrency(String internalCurrency)
    • captureCurrency

      public BookingContract captureCurrency(String captureCurrency)
    • getCaptureCurrency

      @Nonnull @NotNull public @NotNull String getCaptureCurrency()
      The capture currency
      Returns:
      captureCurrency
    • setCaptureCurrency

      public void setCaptureCurrency(String captureCurrency)
    • sourceAmount

      public BookingContract sourceAmount(Double sourceAmount)
    • getSourceAmount

      @Nonnull @NotNull @DecimalMin("0") public @NotNull @DecimalMin("0") Double getSourceAmount()
      The total initial price as quoted in the original TripPay contract. minimum: 0
      Returns:
      sourceAmount
    • setSourceAmount

      public void setSourceAmount(Double sourceAmount)
    • displayAmount

      public BookingContract displayAmount(Double displayAmount)
    • getDisplayAmount

      @Nonnull @NotNull @DecimalMin("0") public @NotNull @DecimalMin("0") Double getDisplayAmount()
      The total display price. minimum: 0
      Returns:
      displayAmount
    • setDisplayAmount

      public void setDisplayAmount(Double displayAmount)
    • supplierAmount

      public BookingContract supplierAmount(Double supplierAmount)
    • getSupplierAmount

      @Nonnull @NotNull @DecimalMin("0") public @NotNull @DecimalMin("0") Double getSupplierAmount()
      The total supplier price. minimum: 0
      Returns:
      supplierAmount
    • setSupplierAmount

      public void setSupplierAmount(Double supplierAmount)
    • internalAmount

      public BookingContract internalAmount(Double internalAmount)
    • getInternalAmount

      @Nonnull @NotNull @DecimalMin("0") public @NotNull @DecimalMin("0") Double getInternalAmount()
      Get internalAmount minimum: 0
      Returns:
      internalAmount
    • setInternalAmount

      public void setInternalAmount(Double internalAmount)
    • captureAmount

      public BookingContract captureAmount(Double captureAmount)
    • getCaptureAmount

      @Nonnull @NotNull @DecimalMin("0") public @NotNull @DecimalMin("0") Double getCaptureAmount()
      The total capture price. minimum: 0
      Returns:
      captureAmount
    • setCaptureAmount

      public void setCaptureAmount(Double captureAmount)
    • sourceAmountRefundModifier

      public BookingContract sourceAmountRefundModifier(Double sourceAmountRefundModifier)
    • getSourceAmountRefundModifier

      @Nullable @DecimalMin("0") public @DecimalMin("0") Double getSourceAmountRefundModifier()
      The source amount still due after a partial refund occurs. minimum: 0
      Returns:
      sourceAmountRefundModifier
    • setSourceAmountRefundModifier

      public void setSourceAmountRefundModifier(Double sourceAmountRefundModifier)
    • displayAmountRefundModifier

      public BookingContract displayAmountRefundModifier(Double displayAmountRefundModifier)
    • getDisplayAmountRefundModifier

      @Nullable @DecimalMin("0") public @DecimalMin("0") Double getDisplayAmountRefundModifier()
      The display amount still due after a partial refund occurs. minimum: 0
      Returns:
      displayAmountRefundModifier
    • setDisplayAmountRefundModifier

      public void setDisplayAmountRefundModifier(Double displayAmountRefundModifier)
    • supplierAmountRefundModifier

      public BookingContract supplierAmountRefundModifier(Double supplierAmountRefundModifier)
    • getSupplierAmountRefundModifier

      @Nullable @DecimalMin("0") public @DecimalMin("0") Double getSupplierAmountRefundModifier()
      The supplier amount still due after a partial refund occurs. minimum: 0
      Returns:
      supplierAmountRefundModifier
    • setSupplierAmountRefundModifier

      public void setSupplierAmountRefundModifier(Double supplierAmountRefundModifier)
    • internalAmountRefundModifier

      public BookingContract internalAmountRefundModifier(Double internalAmountRefundModifier)
    • getInternalAmountRefundModifier

      @Nullable @DecimalMin("0") public @DecimalMin("0") Double getInternalAmountRefundModifier()
      The internal amount still due after a partial refund occurs. minimum: 0
      Returns:
      internalAmountRefundModifier
    • setInternalAmountRefundModifier

      public void setInternalAmountRefundModifier(Double internalAmountRefundModifier)
    • captureAmountRefundModifier

      public BookingContract captureAmountRefundModifier(Double captureAmountRefundModifier)
    • getCaptureAmountRefundModifier

      @Nullable @DecimalMin("0") public @DecimalMin("0") Double getCaptureAmountRefundModifier()
      The capture amount still due after a partial refund occurs. minimum: 0
      Returns:
      captureAmountRefundModifier
    • setCaptureAmountRefundModifier

      public void setCaptureAmountRefundModifier(Double captureAmountRefundModifier)
    • netCaptureAmount

      public BookingContract netCaptureAmount(Double netCaptureAmount)
    • getNetCaptureAmount

      @Nullable public Double getNetCaptureAmount()
      Get netCaptureAmount
      Returns:
      netCaptureAmount
    • setNetCaptureAmount

      public void setNetCaptureAmount(Double netCaptureAmount)
    • cancellableByTraveler

      public BookingContract cancellableByTraveler(Boolean cancellableByTraveler)
    • getCancellableByTraveler

      @Nullable public Boolean getCancellableByTraveler()
      Whether the booking can still be cancelled completely by the traveller.
      Returns:
      cancellableByTraveler
    • setCancellableByTraveler

      public void setCancellableByTraveler(Boolean cancellableByTraveler)
    • cancellableBySupplier

      public BookingContract cancellableBySupplier(Boolean cancellableBySupplier)
    • getCancellableBySupplier

      @Nullable public Boolean getCancellableBySupplier()
      Whether the booking can still be cancelled completely by the supplier.
      Returns:
      cancellableBySupplier
    • setCancellableBySupplier

      public void setCancellableBySupplier(Boolean cancellableBySupplier)
    • netSupplierAmount

      public BookingContract netSupplierAmount(Double netSupplierAmount)
    • getNetSupplierAmount

      @Nullable public Double getNetSupplierAmount()
      Get netSupplierAmount
      Returns:
      netSupplierAmount
    • setNetSupplierAmount

      public void setNetSupplierAmount(Double netSupplierAmount)
    • cancellableWithNoCharges

      public BookingContract cancellableWithNoCharges(Boolean cancellableWithNoCharges)
    • getCancellableWithNoCharges

      @Nullable public Boolean getCancellableWithNoCharges()
      Whether the cancellation comes at no cost to the traveler.
      Returns:
      cancellableWithNoCharges
    • setCancellableWithNoCharges

      public void setCancellableWithNoCharges(Boolean cancellableWithNoCharges)
    • cancellableWithPotentialCharges

      public BookingContract cancellableWithPotentialCharges(Boolean cancellableWithPotentialCharges)
    • getCancellableWithPotentialCharges

      @Nullable public Boolean getCancellableWithPotentialCharges()
      Whether a cancellation comes with partial charges. I.e. Only some of the items in contract are not fully refundable.
      Returns:
      cancellableWithPotentialCharges
    • setCancellableWithPotentialCharges

      public void setCancellableWithPotentialCharges(Boolean cancellableWithPotentialCharges)
    • lodging

      public BookingContract lodging(BookingContractItem lodging)
    • getLodging

      @Nullable @Valid public @Valid BookingContractItem getLodging()
      Get lodging
      Returns:
      lodging
    • setLodging

      public void setLodging(BookingContractItem lodging)
    • totalTokensEarned

      public BookingContract totalTokensEarned(Long totalTokensEarned)
    • getTotalTokensEarned

      @Nullable public Long getTotalTokensEarned()
      Total amount of tokens minted on this contract.
      Returns:
      totalTokensEarned
    • setTotalTokensEarned

      public void setTotalTokensEarned(Long totalTokensEarned)
    • lodgingItinerary

      public BookingContract lodgingItinerary(Itinerary lodgingItinerary)
    • getLodgingItinerary

      @Nullable @Valid public @Valid Itinerary getLodgingItinerary()
      Get lodgingItinerary
      Returns:
      lodgingItinerary
    • setLodgingItinerary

      public void setLodgingItinerary(Itinerary lodgingItinerary)
    • totalFundsGroupedByBeneficiary

      public BookingContract totalFundsGroupedByBeneficiary(List<Beneficiary> totalFundsGroupedByBeneficiary)
    • addTotalFundsGroupedByBeneficiaryItem

      public BookingContract addTotalFundsGroupedByBeneficiaryItem(Beneficiary totalFundsGroupedByBeneficiaryItem)
    • getTotalFundsGroupedByBeneficiary

      @Nullable @Valid public @Valid List<Beneficiary> getTotalFundsGroupedByBeneficiary()
      Get totalFundsGroupedByBeneficiary
      Returns:
      totalFundsGroupedByBeneficiary
    • setTotalFundsGroupedByBeneficiary

      public void setTotalFundsGroupedByBeneficiary(List<Beneficiary> totalFundsGroupedByBeneficiary)
    • netSourceAmount

      public BookingContract netSourceAmount(Double netSourceAmount)
    • getNetSourceAmount

      @Nullable public Double getNetSourceAmount()
      Get netSourceAmount
      Returns:
      netSourceAmount
    • setNetSourceAmount

      public void setNetSourceAmount(Double netSourceAmount)
    • netDisplayAmount

      public BookingContract netDisplayAmount(Double netDisplayAmount)
    • getNetDisplayAmount

      @Nullable public Double getNetDisplayAmount()
      Get netDisplayAmount
      Returns:
      netDisplayAmount
    • setNetDisplayAmount

      public void setNetDisplayAmount(Double netDisplayAmount)
    • netInternalAmount

      public BookingContract netInternalAmount(Double netInternalAmount)
    • getNetInternalAmount

      @Nullable public Double getNetInternalAmount()
      Get netInternalAmount
      Returns:
      netInternalAmount
    • setNetInternalAmount

      public void setNetInternalAmount(Double netInternalAmount)
    • refundable

      public BookingContract refundable(Boolean refundable)
    • getRefundable

      @Nullable public Boolean getRefundable()
      Get refundable
      Returns:
      refundable
    • setRefundable

      public void setRefundable(Boolean refundable)
    • refunded

      public BookingContract refunded(Boolean refunded)
    • getRefunded

      @Nullable public Boolean getRefunded()
      Get refunded
      Returns:
      refunded
    • setRefunded

      public void setRefunded(Boolean refunded)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object