/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.0-slava * User agent: apibuilder app.apibuilder.io/hbc/api-fraud/0.0.0-slava/http4s_0_20 */ package com.hbc.api.fraud.v0.models { /** * Envelope data */ final case class AdditionalData( inAuthId: _root_.java.util.UUID ) /** * General address model */ final case class Address( name: String, streetLineOne: String, streetLineTwo: _root_.scala.Option[String] = None, city: String, state: String, zip: String, country: String ) /** * A customer's complete credit card information * * @param expiryDate MM-YY that the credit card expires * @param authCode CVV code on the back of the card * @param avsResponse Address Verification System response, Codes are available here: * https://www.chasepaymentech.com/address_verification_service.html */ final case class CreditCard( nameOnCard: String, billingAddress: com.hbc.api.fraud.v0.models.Address, cardType: String, cardNumber: String, authorizedAmount: BigDecimal, fullAmount: BigDecimal, expiryDate: String, authCode: String, responseCode: Int, merchantId: _root_.scala.Option[Int] = None, registerNumber: _root_.scala.Option[String] = None, transactionNumber: String, avsResponse: String ) /** * Customer model */ final case class Customer( customerType: com.hbc.api.fraud.v0.models.CustomerType, accountId: String, creationDate: _root_.java.time.LocalDate, firstName: String, lastName: String, emailAddress: String ) /** * Response model to OMS containing the transaction they've sent and the decision * we've made * * @param createdDate Date this record was first created within the database */ final case class DBRecord( transactionId: String, lastModifiedDate: _root_.scala.Option[_root_.java.time.LocalDate] = None, createdDate: _root_.scala.Option[_root_.java.time.LocalDate] = None, transaction: com.hbc.api.fraud.v0.models.Transaction, decision: com.hbc.api.fraud.v0.models.Decision ) /** * Defines decision information */ final case class Decision( transactionId: String, recommendationCode: com.hbc.api.fraud.v0.models.RecommendationCode, crossReference: _root_.scala.Option[_root_.java.util.UUID] = None, rulesTripped: _root_.scala.Option[String] = None, totalScore: Int, remarks: _root_.scala.Option[String] = None ) /** * Error response model * * @param message Error description message * @param error Error code */ final case class Error( message: String, error: String ) /** * Single item * * @param svsNumber Product style number (parent number) * @param skuNumber HBC internally generated number for items (alias SKN) * @param upcNumber The number on the barcode that could be used across different retailers * @param classNumber Signifies business category of an item (pants, tops, shirts, etc.) * @param price Price of single item * @param extendedPrice Total price of all items ordered */ final case class Item( svsNumber: Int, skuNumber: Int, upcNumber: _root_.scala.Option[Int] = None, classNumber: _root_.scala.Option[Int] = None, color: _root_.scala.Option[String] = None, size: _root_.scala.Option[String] = None, currentStatus: String, department: Int, signOnDelivery: _root_.scala.Option[String] = None, giftWrapped: _root_.scala.Option[Boolean] = None, costAmount: _root_.scala.Option[BigDecimal] = None, marginAmount: _root_.scala.Option[BigDecimal] = None, description: String, price: BigDecimal, extendedPrice: BigDecimal, quantity: Int, groupNumber: Int, shippingAddress: com.hbc.api.fraud.v0.models.Address, shippingMethod: String, shippingCountry: String ) /** * Promotion model * * @param promotionAmount Dollar amount discounted by the promotion */ final case class Promo( promotionCode: String, promotionAmount: BigDecimal ) /** * Defines data expected to come in from OMS describing a transaction * * @param source Order source (web, store, etc) * @param additionalData Additional `envelope` data sent through our system to f-s, should include * InAuthId */ final case class Transaction( orderId: String, groupId: String, orderTotal: BigDecimal, shippingCost: BigDecimal, currencyCode: String, storeNumber: Int, salesRep: _root_.scala.Option[String] = None, lastModifiedDate: _root_.scala.Option[_root_.java.time.LocalDate] = None, banner: com.hbc.api.fraud.v0.models.Banner, creditCard: com.hbc.api.fraud.v0.models.CreditCard, promos: _root_.scala.Option[Seq[com.hbc.api.fraud.v0.models.Promo]] = None, items: Seq[com.hbc.api.fraud.v0.models.Item], ipAddress: _root_.scala.Option[String] = None, source: String, customer: com.hbc.api.fraud.v0.models.Customer, additionalData: _root_.scala.Option[com.hbc.api.fraud.v0.models.AdditionalData] = None ) /** * Our lovely store chains */ sealed trait Banner extends _root_.scala.Product with _root_.scala.Serializable object Banner { case object Lat extends Banner { override def toString = "lat" } case object S5a extends Banner { override def toString = "s5a" } case object O5a extends Banner { override def toString = "o5a" } case object Bay extends Banner { override def toString = "bay" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends Banner /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[Banner] = scala.List(Lat, S5a, O5a, Bay) private val byName: Map[String, Banner] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): Banner = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[Banner] = byName.get(value.toLowerCase) } /** * Possible types of customers */ sealed trait CustomerType extends _root_.scala.Product with _root_.scala.Serializable object CustomerType { case object Guest extends CustomerType { override def toString = "guest" } case object Registered extends CustomerType { override def toString = "registered" } case object Employee extends CustomerType { override def toString = "employee" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends CustomerType /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[CustomerType] = scala.List(Guest, Registered, Employee) private val byName: Map[String, CustomerType] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): CustomerType = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[CustomerType] = byName.get(value.toLowerCase) } /** * Enum describing the possible responses */ sealed trait RecommendationCode extends _root_.scala.Product with _root_.scala.Serializable object RecommendationCode { case object Reject extends RecommendationCode { override def toString = "reject" } case object Review extends RecommendationCode { override def toString = "review" } case object Accept extends RecommendationCode { override def toString = "accept" } /** * UNDEFINED captures values that are sent either in error or * that were added by the server after this library was * generated. We want to make it easy and obvious to users of * this library to handle this case gracefully. * * We use all CAPS for the variable name to avoid collisions * with the camel cased values above. */ final case class UNDEFINED(override val toString: String) extends RecommendationCode /** * all returns a list of all the valid, known values. We use * lower case to avoid collisions with the camel cased values * above. */ val all: scala.List[RecommendationCode] = scala.List(Reject, Review, Accept) private val byName: Map[String, RecommendationCode] = all.map(x => x.toString.toLowerCase -> x).toMap def apply(value: String): RecommendationCode = fromString(value).getOrElse(UNDEFINED(value)) def fromString(value: String): _root_.scala.Option[RecommendationCode] = byName.get(value.toLowerCase) } }