/* * Copyright (C) 2023 Expedia, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { Payment } from './Payment' import { TravelProduct } from './TravelProduct' import { Traveler } from './Traveler' import { TravelProductMapper } from './TravelProductMapper' import { TravelerMapper } from './TravelerMapper' import { PaymentMapper } from './PaymentMapper' import { JsonObject, JsonProperty } from 'typescript-json-serializer' @JsonObject({ constructorParams: [{}] }) export class TransactionDetails { /** * Unique identifier assigned to the order by the partner. `order_id` is specific to the partner namespace. */ @JsonProperty({ name: 'order_id' }) orderId: string /** * Status of the order: * `IN_PROGRESS` is used when order has not processed fully. For example, inventory has not yet been reserved, or payment has not yet been settled. * `COMPLETED` is used when an order has been processed fully. For example, inventory has been reserved, and the payment has been settled. */ @JsonProperty({ name: 'current_order_status' }) currentOrderStatus: TransactionDetailsCurrentOrderStatusEnum /** * Type of order. Possible `order_types`. `CREATE` - Initial type of a brand new order. `CHANGE` - If a `OrderPurchaseScreenRequest` has already been submitted for the initial booking with `order_type = CREATE`, but has now been modified and partner wishes to resubmit for Fraud screening then the `order_type = CHANGE`. Examples of changes that are supported are changes made to `check-in/checkout dates` or `price of a TravelProduct`. */ @JsonProperty({ name: 'order_type' }) orderType: TransactionDetailsOrderTypeEnum @JsonProperty({ name: 'travel_products', type: (property) => TravelProductMapper.getType(property), }) travelProducts: Array /** * Individuals who are part of the travel party for the order. At minimum there must be at least `1` traveler. */ @JsonProperty({ name: 'travelers', type: (property) => TravelerMapper.getType(property), }) travelers: Array /** * List of the form(s) of payment being used to purchase the order. One or more forms of payment can be used within an order. Information gathered will be specific to the form of payment. */ @JsonProperty({ name: 'payments', type: (property) => PaymentMapper.getType(property), }) payments?: Array public constructor(transactionDetails: TransactionDetailsProperties) { this.orderId = transactionDetails.orderId this.currentOrderStatus = transactionDetails.currentOrderStatus this.orderType = transactionDetails.orderType this.travelProducts = transactionDetails.travelProducts this.travelers = transactionDetails.travelers this.payments = transactionDetails.payments } } export type TransactionDetailsCurrentOrderStatusEnum = | 'IN_PROGRESS' | 'COMPLETED' export type TransactionDetailsOrderTypeEnum = 'CREATE' | 'CHANGE' export interface TransactionDetailsProperties { orderId: string currentOrderStatus: TransactionDetailsCurrentOrderStatusEnum orderType: TransactionDetailsOrderTypeEnum travelProducts: Array travelers: Array payments?: Array }