From aa74cf4332fac55046121590a19ca875e280f831 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Sat, 6 Jun 2026 08:16:37 +0200 Subject: [PATCH] test(corpus): add remaining acme catalog fixtures Add the remaining sanitized ACME catalog modules for multi-file corpus coverage. --- .../financial-institution-management/spec.yml | 25 + .../inventory/schemas/capEventReason.yml | 8 + .../inventory/schemas/capType.yml | 11 + .../inventory/schemas/capTypeWrapper.yml | 6 + .../schemas/demandSubAccountInventoryCap.yml | 122 + ...demandSubAccountInventoryCapCreateData.yml | 27 + .../demandSubAccountInventoryCapEvent.yml | 31 + ...demandSubAccountInventoryCapUpdateData.yml | 18 + .../schemas/staticOfferInventoryCap.yml | 72 + .../staticOfferInventoryCapCreateData.yml | 27 + .../schemas/staticOfferInventoryCapEvent.yml | 25 + .../schemas/staticOfferInventoryCapStatus.yml | 12 + .../staticOfferInventoryCapUpdateData.yml | 17 + .../inventory/schemas/versionDiff.yml | 22 + .../acme/birch-catalog/inventory/spec.yml | 535 ++++ .../lead/examples/creditCardLead.yml | 48 + .../lead/examples/leadRequestJson.yml | 113 + .../birch-catalog/lead/examples/loanLead.yml | 67 + .../lead/examples/savingsLead.yml | 27 + .../lead/parameters/universityName.yml | 8 + .../lead/responses/invalidLead.yml | 11 + .../lead/responses/invalidLeadUuid.yml | 9 + .../lead/responses/leadCreated.yml | 7 + .../lead/responses/leadFound.yml | 5 + .../lead/schemas/bankAccountType.yml | 6 + .../lead/schemas/bestTimeToCall.yml | 6 + .../lead/schemas/cardBenefits.yml | 152 ++ .../lead/schemas/cardPurposes.yml | 12 + .../lead/schemas/citizenshipStatus.yml | 7 + .../birch-catalog/lead/schemas/clientTags.yml | 12 + .../lead/schemas/coApplicantInformation.yml | 28 + .../lead/schemas/creditCardInformation.yml | 9 + .../lead/schemas/creditInformation.yml | 9 + .../schemas/deduplicationConfiguration.yml | 49 + .../lead/schemas/educationInformation.yml | 46 + .../lead/schemas/educationLevel.yml | 13 + .../lead/schemas/employmentInformation.yml | 34 + .../lead/schemas/employmentPayFrequency.yml | 7 + .../lead/schemas/employmentStatus.yml | 10 + .../lead/schemas/financialInformation.yml | 42 + .../birch-catalog/lead/schemas/gender.yml | 6 + .../lead/schemas/graduateDegreeType.yml | 30 + .../lead/schemas/healthInformation.yml | 12 + .../birch-catalog/lead/schemas/idType.yml | 5 + .../schemas/identificationInformation.yml | 11 + .../lead/schemas/leadActionResponse.yml | 38 + .../lead/schemas/leadActionType.yml | 19 + .../lead/schemas/leadRequestJson.yml | 69 + .../lead/schemas/leadResponseJson.yml | 87 + .../lead/schemas/leadResponseWrapper.yml | 20 + .../birch-catalog/lead/schemas/leadUuid.yml | 8 + .../lead/schemas/legalInformation.yml | 15 + .../lead/schemas/lifeInsuranceInformation.yml | 21 + .../lead/schemas/loanInformation.yml | 7 + .../lead/schemas/mortgageInformation.yml | 78 + .../lead/schemas/mortgageType.yml | 5 + .../schemas/newDeduplicationConfiguration.yml | 19 + .../lead/schemas/occupancyType.yml | 6 + .../lead/schemas/personalInformation.yml | 69 + .../schemas/personalReferenceInformation.yml | 15 + .../schemas/personalReferenceRelationType.yml | 10 + .../lead/schemas/productSubType.yml | 28 + .../lead/schemas/productType.yml | 10 + .../lead/schemas/propertySearchStatus.yml | 5 + .../lead/schemas/propertyStatus.yml | 6 + .../lead/schemas/propertyType.yml | 8 + .../lead/schemas/providedCreditRating.yml | 8 + .../lead/schemas/purchaseStatus.yml | 7 + .../birch-catalog/lead/schemas/purpose.yml | 32 + .../lead/schemas/refinanceLoanInformation.yml | 31 + .../lead/schemas/refinanceLoanType.yml | 4 + .../lead/schemas/refinanceType.yml | 5 + .../lead/schemas/rejectReason.yml | 11 + .../lead/schemas/savingsInformation.yml | 6 + .../lead/schemas/sessionInformation.yml | 7 + .../birch-catalog/lead/schemas/university.yml | 21 + .../Fixtures/acme/birch-catalog/lead/spec.yml | 650 +++++ .../ledger/schemas/accountAdjustment.yml | 48 + .../schemas/accountAdjustmentCreateData.yml | 20 + .../ledger/schemas/adjustmentReason.yml | 13 + .../ledger/schemas/billingCycle.yml | 54 + .../ledger/schemas/billingCycleCreateData.yml | 31 + .../ledger/schemas/billingCycleUpdateData.yml | 9 + .../ledger/schemas/ledgerItem.yml | 75 + .../ledger/schemas/ledgerItemAdjustment.yml | 37 + .../ledger/schemas/ledgerItemCreateData.yml | 14 + .../ledger/schemas/ledgerItemCsvData.yml | 39 + .../ledger/schemas/ledgerItemDetail.yml | 45 + .../ledger/schemas/ledgerItemReason.yml | 5 + .../schemas/ledgerItemReconciliation.yml | 39 + .../ledgerItemReconciliationCreateData.yml | 19 + .../ledger/schemas/ledgerItemRecreateData.yml | 8 + .../schemas/ledgerItemRegenerationBatch.yml | 27 + .../ledgerItemRegenerationBatchCreateData.yml | 12 + .../ledger/schemas/ledgerItemType.yml | 6 + .../ledger/schemas/payableSummary.yml | 61 + .../ledger/schemas/receivableSummary.yml | 55 + .../ledger/schemas/reconciliationType.yml | 8 + .../birch-catalog/ledger/schemas/termUnit.yml | 7 + .../acme/birch-catalog/ledger/spec.yml | 1280 ++++++++++ .../examples/lifeInsuranceLead.yml | 91 + .../life-insurance/examples/questionList.yml | 63 + .../life-insurance/schemas/answer.yml | 17 + .../life-insurance/schemas/answerOption.yml | 9 + .../schemas/followupQuestion.yml | 13 + .../schemas/lifeInsuranceLead.yml | 14 + .../life-insurance/schemas/question.yml | 51 + .../life-insurance/schemas/questionGroup.yml | 6 + .../life-insurance/schemas/questionList.yml | 19 + .../life-insurance/schemas/questionType.yml | 14 + .../birch-catalog/life-insurance/spec.yml | 141 + .../examples/creditCardRateTable.yml | 95 + .../originator/examples/loanRateTable.yml | 88 + .../originator/examples/mockRateTable.yml | 6 + .../examples/mockRateTableStaticOffer.yml | 6 + .../originator/examples/rateTablePublic.yml | 232 ++ .../originator/examples/savingsRateTable.yml | 80 + .../examples/supplyDemandInclusion.yml | 14 + .../examples/supplyDemandInclusionCreate.yml | 8 + .../examples/supplyDemandInclusionDelete.yml | 6 + .../originator/schemas/adjustmentType.yml | 5 + .../originator/schemas/annualIncomeRange.yml | 8 + .../originator/schemas/aprType.yml | 5 + .../originator/schemas/cardType.yml | 6 + .../originator/schemas/compoundingMethod.yml | 10 + .../originator/schemas/creditCardBenefit.yml | 8 + .../originator/schemas/creditCardFee.yml | 15 + .../originator/schemas/creditCardOffer.yml | 9 + .../schemas/creditCardOfferDetails.yml | 141 + .../schemas/creditCardOfferRecord.yml | 147 ++ .../schemas/creditCardOtherBonus.yml | 11 + .../originator/schemas/dbOffer.yml | 24 + .../originator/schemas/demandApiFilter.yml | 8 + .../originator/schemas/demandPartner.yml | 24 + .../originator/schemas/introOfferType.yml | 5 + .../approvalBiasedRuleCombinator.yml | 11 + .../schemas/leadFilterRules/leadAttribute.yml | 30 + .../leadFilterRules/leadAttributeBoolean.yml | 3 + .../leadFilterRules/leadAttributeNumeric.yml | 25 + .../leadFilterRules/leadAttributeString.yml | 6 + .../leadFilterRules/leadFilterRule.yml | 7 + .../rejectIfBooleanMatches.yml | 25 + .../leadFilterRules/rejectIfGreaterThan.yml | 25 + .../schemas/leadFilterRules/rejectIfInSet.yml | 28 + .../leadFilterRules/rejectIfLessThan.yml | 25 + .../leadFilterRules/rejectIfNotInSet.yml | 28 + .../rejectionBiasedRuleCombinator.yml | 11 + .../schemas/lifeInsuranceOfferDetails.yml | 36 + .../schemas/lifeInsuranceOfferRecord.yml | 46 + .../schemas/lineOfCreditOfferRecord.yml | 79 + .../originator/schemas/loanAmountRange.yml | 8 + .../originator/schemas/loanOfferPublic.yml | 98 + .../originator/schemas/loanOfferRecord.yml | 107 + .../originator/schemas/mockRateTable.yml | 13 + .../schemas/mockRateTableStaticOffer.yml | 15 + .../originator/schemas/mortgageLoanType.yml | 7 + .../originator/schemas/mortgageOffer.yml | 9 + .../schemas/mortgageOfferDetails.yml | 28 + .../schemas/mortgageOfferRecord.yml | 30 + .../originator/schemas/offer.yml | 26 + .../originator/schemas/offerDeactivation.yml | 41 + .../schemas/offerDeactivationCreateData.yml | 15 + .../originator/schemas/offerDetailsRecord.yml | 7 + .../originator/schemas/offerRecord.yml | 38 + .../originator/schemas/offerRule.yml | 72 + .../originator/schemas/offerRuleReason.yml | 8 + .../originator/schemas/offerRuleRecord.yml | 72 + .../originator/schemas/offerRuleWriteData.yml | 48 + .../originator/schemas/offerVersionRecord.yml | 51 + .../originator/schemas/originator.yml | 21 + .../originator/schemas/originatorImage.yml | 6 + .../originator/schemas/packageType.yml | 6 + .../originator/schemas/payoutCeiling.yml | 49 + .../originator/schemas/pendingResponse.yml | 11 + .../originator/schemas/preSelectRule.yml | 27 + .../schemas/preSelectRuleFilter.yml | 24 + .../schemas/preSelectRuleFilterKey.yml | 7 + .../schemas/preSelectRuleSummary.yml | 51 + .../schemas/pricingControlSummary.yml | 60 + .../originator/schemas/rateTable.yml | 77 + .../originator/schemas/rateTablePublic.yml | 57 + .../originator/schemas/rateTableRecord.yml | 27 + .../schemas/rateTableRecordCreateData.yml | 17 + .../schemas/ruleDemandApiFilter.yml | 15 + .../schemas/ruleDemandApiFilterCreateData.yml | 17 + .../originator/schemas/savingsOffer.yml | 9 + .../schemas/savingsOfferDetails.yml | 38 + .../originator/schemas/savingsOfferRecord.yml | 48 + .../originator/schemas/specialOfferPublic.yml | 22 + .../originator/schemas/specialOfferRecord.yml | 49 + .../originator/schemas/staticOffer.yml | 60 + .../schemas/supplyDemandInclusion.yml | 58 + .../schemas/supplyDemandInclusionCreate.yml | 24 + .../schemas/supplyDemandInclusionDelete.yml | 14 + .../originator/schemas/termUnit.yml | 8 + .../acme/birch-catalog/originator/spec.yml | 2262 +++++++++++++++++ .../schemas/activePartnerFeature.yml | 42 + .../activePartnerFeatureCreateData.yml | 14 + .../schemas/activePartnerFeatureSortBy.yml | 5 + .../schemas/availableDemandPartner.yml | 54 + .../schemas/featuredDemandPartner.yml | 54 + .../schemas/featuredDemandPartnersCreate.yml | 13 + .../schemas/featuredFinancialInstitution.yml | 24 + .../schemas/lifeInsuranceCarrierDetail.yml | 29 + .../lifeInsurancePolicyDeliveryMethod.yml | 6 + .../schemas/lifeInsurancePolicyDetail.yml | 25 + .../partner-data/schemas/partnerFeature.yml | 3 + .../acme/birch-catalog/partner-data/spec.yml | 379 +++ .../partner-page/examples/partnerPageV8.yml | 38 + .../partner-page/examples/versionV7.yml | 253 ++ .../partner-page/examples/versionV8.yml | 267 ++ .../partner-page/parameters/partnerKey.yml | 7 + .../partner-page/parameters/uuid.yml | 7 + .../partner-page/responses/400.yml | 8 + .../partner-page/responses/401.yml | 8 + .../partner-page/responses/404.yml | 8 + .../partner-page/responses/500.yml | 8 + .../partner-page/schemas/aloomaMap.yml | 13 + .../partner-page/schemas/error.yml | 6 + .../partner-page/schemas/page.yml | 8 + .../partner-page/schemas/partnerKey.yml | 38 + .../schemas/partnerPageTemplateV7.yml | 179 ++ .../schemas/partnerPageTemplateV8.yml | 193 ++ .../schemas/partnerPageTemplateV8All.yml | 6 + .../partner-page/schemas/template.yml | 48 + .../schemas/templateCreateData.yml | 29 + .../partner-page/schemas/templateType.yml | 5 + .../partner-page/schemas/version.yml | 17 + .../acme/birch-catalog/partner-page/spec.yml | 729 ++++++ .../supply-analytics/parameters/endDate.yml | 6 + .../parameters/groupingKey.yml | 5 + .../supply-analytics/parameters/startDate.yml | 6 + .../parameters/subAccountId.yml | 6 + .../schemas/creditCardFunnelSummary.yml | 56 + .../schemas/creditCardPayoutSummary.yml | 21 + .../schemas/lifeInsuranceFunnelSummary.yml | 37 + .../schemas/lifeInsurancePayoutSummary.yml | 13 + .../schemas/loanFunnelSummary.yml | 37 + .../schemas/loanPayoutSummary.yml | 13 + .../schemas/savingsFunnelSummary.yml | 40 + .../schemas/savingsPayoutSummary.yml | 21 + .../schemas/summaryGroupBy.yml | 5 + .../birch-catalog/supply-analytics/spec.yml | 317 +++ .../createTransUnionSupplierConfiguration.yml | 5 + .../schemas/errors/badRequest.yml | 10 + .../schemas/errors/internalServerError.yml | 10 + .../schemas/errors/invalidRequestJson.yml | 12 + .../schemas/errors/notFound.yml | 7 + .../transUnionSupplierConfiguration.yml | 51 + .../schemas/transunion/comp.yml | 40 + .../schemas/transunion/creditSummary.yml | 29 + .../transunion/creditSummaryCounts.yml | 42 + .../schemas/transunion/mismatch.yml | 27 + .../schemas/transunion/vscore.yml | 27 + .../schemas/transunionProfile.yml | 69 + .../schemas/transunionRequest.yml | 47 + .../birch-catalog/third-party-data/spec.yml | 292 +++ .../ui-event/request-bodies/offerDisplay.yml | 4 + .../ui-event/request-bodies/sessionInit.yml | 4 + .../responses/invalidOfferDisplay.yml | 18 + .../ui-event/responses/invalidSessionInit.yml | 21 + .../responses/offerDisplayCreated.yml | 5 + .../ui-event/responses/sessionInitCreated.yml | 5 + .../ui-event/schemas/newSessionInit.yml | 8 + .../ui-event/schemas/offerDisplay.yml | 35 + .../ui-event/schemas/sessionInit.yml | 23 + .../acme/birch-catalog/ui-event/spec.yml | 225 ++ .../birch-catalog/user-experience/spec.yml | 2003 +++++++++++++++ 268 files changed, 16662 insertions(+) create mode 100644 Tests/Fixtures/acme/birch-catalog/financial-institution-management/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/capEventReason.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/capType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/capTypeWrapper.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCap.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapEvent.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapUpdateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCap.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapEvent.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapUpdateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/schemas/versionDiff.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/inventory/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/examples/creditCardLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/examples/leadRequestJson.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/examples/loanLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/examples/savingsLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/parameters/universityName.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLeadUuid.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/responses/leadCreated.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/responses/leadFound.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/bankAccountType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/bestTimeToCall.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/cardBenefits.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/cardPurposes.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/citizenshipStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/clientTags.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/coApplicantInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/creditCardInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/creditInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/deduplicationConfiguration.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/educationInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/educationLevel.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentPayFrequency.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/financialInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/gender.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/graduateDegreeType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/healthInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/idType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/identificationInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionResponse.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadRequestJson.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseJson.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseWrapper.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/leadUuid.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/legalInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/lifeInsuranceInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/loanInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/newDeduplicationConfiguration.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/occupancyType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/personalInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceRelationType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/productSubType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/productType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/propertySearchStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/providedCreditRating.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/purchaseStatus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/purpose.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/rejectReason.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/savingsInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/sessionInformation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/schemas/university.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/lead/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustment.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustmentCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/adjustmentReason.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycle.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleUpdateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItem.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemAdjustment.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCsvData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemDetail.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReason.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliationCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRecreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatch.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatchCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/payableSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/receivableSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/reconciliationType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/schemas/termUnit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ledger/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/examples/lifeInsuranceLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/examples/questionList.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answerOption.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/followupQuestion.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/lifeInsuranceLead.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/question.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionGroup.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionList.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/life-insurance/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/creditCardRateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/loanRateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTableStaticOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/rateTablePublic.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/savingsRateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusion.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionCreate.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionDelete.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/adjustmentType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/annualIncomeRange.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/aprType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/cardType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/compoundingMethod.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardBenefit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardFee.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferDetails.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOtherBonus.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/dbOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/demandApiFilter.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/demandPartner.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/introOfferType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/approvalBiasedRuleCombinator.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttribute.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeBoolean.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeNumeric.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeString.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadFilterRule.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfBooleanMatches.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfGreaterThan.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfInSet.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfLessThan.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfNotInSet.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectionBiasedRuleCombinator.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferDetails.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/lineOfCreditOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/loanAmountRange.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferPublic.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTableStaticOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageLoanType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferDetails.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivation.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivationCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDetailsRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRule.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleReason.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleWriteData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/offerVersionRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/originator.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/originatorImage.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/packageType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/payoutCeiling.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/pendingResponse.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRule.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilter.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilterKey.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/pricingControlSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTable.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTablePublic.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecordCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilter.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilterCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferDetails.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferPublic.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferRecord.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/staticOffer.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusion.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionCreate.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionDelete.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/schemas/termUnit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/originator/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeature.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureSortBy.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/availableDemandPartner.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartner.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartnersCreate.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredFinancialInstitution.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsuranceCarrierDetail.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDeliveryMethod.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDetail.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/schemas/partnerFeature.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-data/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/examples/partnerPageV8.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV7.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV8.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/parameters/partnerKey.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/parameters/uuid.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/responses/400.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/responses/401.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/responses/404.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/responses/500.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/aloomaMap.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/error.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/page.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerKey.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV7.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8All.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/template.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateCreateData.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateType.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/schemas/version.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/partner-page/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/endDate.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/groupingKey.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/startDate.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/subAccountId.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardFunnelSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardPayoutSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsuranceFunnelSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsurancePayoutSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanFunnelSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanPayoutSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsFunnelSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsPayoutSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/summaryGroupBy.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/supply-analytics/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/request-bodies/createTransUnionSupplierConfiguration.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/badRequest.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/internalServerError.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/invalidRequestJson.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/notFound.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transUnionSupplierConfiguration.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/comp.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummary.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummaryCounts.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/mismatch.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/vscore.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionProfile.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionRequest.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/third-party-data/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/offerDisplay.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/sessionInit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidOfferDisplay.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidSessionInit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/responses/offerDisplayCreated.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/responses/sessionInitCreated.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/schemas/newSessionInit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/schemas/offerDisplay.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/schemas/sessionInit.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/ui-event/spec.yml create mode 100644 Tests/Fixtures/acme/birch-catalog/user-experience/spec.yml diff --git a/Tests/Fixtures/acme/birch-catalog/financial-institution-management/spec.yml b/Tests/Fixtures/acme/birch-catalog/financial-institution-management/spec.yml new file mode 100644 index 0000000..53e4e58 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/financial-institution-management/spec.yml @@ -0,0 +1,25 @@ +openapi: 3.0.3 +info: + title: Financial Institution Management API + version: 0.1.0 +servers: + - url: 'https://api.example.com' +security: + - default: [] +components: + securitySchemes: + default: + type: http + scheme: bearer +tags: + - name: Temp +paths: + /temps: + get: + description: Temporary endpoint to make lint pass + operationId: temp + tags: + - Temp + responses: + '200': + description: temp diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capEventReason.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capEventReason.yml new file mode 100644 index 0000000..09f5277 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capEventReason.yml @@ -0,0 +1,8 @@ +type: string +enum: + - LeadCapHit + - DemandSubAccountClickCapHit + - BudgetCapHit + - ClickCapHit +description: | + The reason for which this demand sub account or static offer inventory cap event was created. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capType.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capType.yml new file mode 100644 index 0000000..7f37629 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capType.yml @@ -0,0 +1,11 @@ +type: string +enum: + - BudgetCap + - ClickCap + - DemandSubAccountClickCap + - LeadCap +description: | + The type of the inventory cap. + + For demand sub account caps, the values `DemandSubAccoutClickCap` and `LeadCap` are + allowed. For static offer caps, the values `ClickCap` and `BudgetCap` are allowed. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capTypeWrapper.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capTypeWrapper.yml new file mode 100644 index 0000000..55345be --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/capTypeWrapper.yml @@ -0,0 +1,6 @@ +type: object +required: + - type +properties: + type: + $ref: ./capType.yml diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCap.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCap.yml new file mode 100644 index 0000000..05e8aa9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCap.yml @@ -0,0 +1,122 @@ +type: object +required: + - id + - version + - demandSubAccountId + - capType + - demandSubAccountInventoryCapEvents + - startDate + - endDate + - createdAt + - createdByUuid + - updatedAt + - updatedByUuid +properties: + id: + type: integer + format: int64 + description: | + A unique, internal identifier for this resource. + version: + type: integer + format: int32 + description: | + Version number for the cap. + demandSubAccountId: + type: integer + format: int64 + description: | + ID of the demand sub-account that corresponds to the cap. + capType: + $ref: ./capTypeWrapper.yml + leadCapAmount: + type: integer + format: int64 + description: | + Amount of allowable lead attributions allowed for the cap. + + If non-null, `clickCapAmount` and `budgetCapAmount` must be null. + currentAttributedLeads: + type: integer + format: int64 + description: | + Current number of leads attributed to the cap within the given time window. + clickCapAmount: + type: integer + format: int64 + description: | + Amount of allowable click attributions allowed for the cap. + + If non-null, `leadCapAmount` and `budgetCapAmount` must be null. + currentAttributedClicks: + type: integer + format: int64 + description: | + Current number of clicks attributed to the cap within the given time window. + budgetCapAmount: + type: number + format: float + description: | + Amount of allowable revenue attribution allowed for the cap. + + If non-null, `clickCapAmount` and `leadCapAmount` must be null. + currentAttributedRevenue: + type: number + format: float + description: | + Current amount of revenue attributed to the cap within the given time window. + lastCalculatedAt: + type: string + format: date-time + description: | + Last time attributed `currentAttributedClicks`, `currentAttributedLeads`, and + `currentAttributedRevenue` were calculated. + demandSubAccountInventoryCapEvents: + type: array + items: + $ref: ./demandSubAccountInventoryCapEvent.yml + description: | + List containing events that represent when a cap was exhausted. + + For caps that have naturally expired because their end date has reached, + we do not create a cap event. + startDate: + type: string + format: date + description: | + The start date for the window in which the cap should have been in force. + endDate: + type: string + format: date + description: | + The end date for the window in which the cap should have been in force. + createdAt: + type: string + format: date-time + description: | + When the resource was created. + createdByUuid: + type: string + format: uuid + description: | + The UUID of the access token that was used to create this resource. + updatedAt: + type: string + format: date-time + description: | + When the resource was updated. + updatedByUuid: + type: string + format: uuid + description: | + The UUID of the access token that was used to update this resource. + deletedAt: + type: string + format: date-time + description: | + When the resource was deleted. + deletedByUuid: + type: string + format: uuid + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapCreateData.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapCreateData.yml new file mode 100644 index 0000000..7f0c098 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapCreateData.yml @@ -0,0 +1,27 @@ +type: object +required: + - demandSubAccountId + - capType + - startDate + - endDate +properties: + demandSubAccountId: + type: integer + format: int64 + capType: + $ref: ./capType.yml + leadCapAmount: + type: integer + format: int64 + clickCapAmount: + type: integer + format: int64 + budgetCapAmount: + type: number + format: double + startDate: + type: string + format: date + endDate: + type: string + format: date diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapEvent.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapEvent.yml new file mode 100644 index 0000000..579e9c0 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapEvent.yml @@ -0,0 +1,31 @@ +type: object +required: + - id + - demandSubAccountInventoryCapId + - capEventReason + - createdAt +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + demandSubAccountInventoryCapId: + type: integer + format: int64 + readOnly: true + description: | + The id of the demand sub account inventory cap corresponding to the event record. + capEventReason: + type: string + $ref: ./capEventReason.yml + readOnly: true + description: | + The reason why this inventory cap event was created. + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapUpdateData.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapUpdateData.yml new file mode 100644 index 0000000..794491c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/demandSubAccountInventoryCapUpdateData.yml @@ -0,0 +1,18 @@ +type: object +required: + - leadCapAmount + - clickCapAmount + - budgetCapAmount + - startDate + - endDate +properties: + leadCapAmount: + type: string + clickCapAmount: + type: string + budgetCapAmount: + type: string + startDate: + type: string + endDate: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCap.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCap.yml new file mode 100644 index 0000000..e6a8c2b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCap.yml @@ -0,0 +1,72 @@ +type: object +required: + - id + - version + - subAccountId + - staticOfferId + - capType + - staticOfferInventoryCapEvents + - startDate + - endDate + - createdAt + - createdByUuid + - updatedAt + - updatedByUuid +properties: + id: + type: integer + format: int64 + version: + type: integer + format: int32 + subAccountId: + type: integer + format: int64 + staticOfferId: + type: integer + format: int64 + capType: + $ref: ./capTypeWrapper.yml + budgetCapAmount: + type: number + format: double + currentAttributedRevenue: + type: number + format: double + clickCapAmount: + type: integer + format: int64 + currentAttributedClicks: + type: integer + format: int64 + lastCalculatedAt: + type: string + format: date-time + staticOfferInventoryCapEvents: + type: array + items: + $ref: ./staticOfferInventoryCapEvent.yml + startDate: + type: string + format: date + endDate: + type: string + format: date + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + updatedAt: + type: string + format: date-time + updatedByUuid: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedByUuid: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapCreateData.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapCreateData.yml new file mode 100644 index 0000000..d738f14 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapCreateData.yml @@ -0,0 +1,27 @@ +type: object +required: + - staticOfferId + - subAccountId + - startDate + - endDate +properties: + staticOfferId: + type: integer + format: int64 + subAccountId: + type: integer + format: int64 + capType: + $ref: ./capType.yml + budgetCapAmount: + type: integer + format: int64 + clickCapAmount: + type: integer + format: int64 + startDate: + type: string + format: date + endDate: + type: string + format: date diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapEvent.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapEvent.yml new file mode 100644 index 0000000..caaf72d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapEvent.yml @@ -0,0 +1,25 @@ +type: object +required: + - id + - staticOfferInventoryCapId + - capEventReason + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + staticOfferInventoryCapId: + type: integer + format: int64 + capEventReason: + $ref: ./capEventReason.yml + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapStatus.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapStatus.yml new file mode 100644 index 0000000..6ddf483 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapStatus.yml @@ -0,0 +1,12 @@ +type: object +required: + - eventType + - capType + - createdEvent +properties: + eventType: + type: string + capType: + $ref: ./capType.yml + createdEvent: + $ref: ./staticOfferInventoryCapEvent.yml diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapUpdateData.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapUpdateData.yml new file mode 100644 index 0000000..c18c05a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/staticOfferInventoryCapUpdateData.yml @@ -0,0 +1,17 @@ +type: object +required: + - startDate + - endDate +properties: + budgetCapAmount: + type: integer + format: int64 + clickCapAmount: + type: integer + format: int64 + startDate: + type: string + format: date + endDate: + type: string + format: date diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/schemas/versionDiff.yml b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/versionDiff.yml new file mode 100644 index 0000000..3386aa3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/schemas/versionDiff.yml @@ -0,0 +1,22 @@ +type: object +required: + - jsonPatch + - createdAt + - createdByUuid +properties: + jsonPatch: + type: array + items: + type: string + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. + createdByUuid: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to create this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/inventory/spec.yml b/Tests/Fixtures/acme/birch-catalog/inventory/spec.yml new file mode 100644 index 0000000..8084107 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/inventory/spec.yml @@ -0,0 +1,535 @@ +openapi: 3.0.3 +info: + title: inventory + description: Manages inventory caps + version: 1.3.0 + contact: + name: Finance Chapter + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/inventory' + description: Prod + - url: 'https://dev-api.example.com/inventory' + description: Dev +components: + x-lint-skip: + - inline-schema-is-scalar + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'inventory:read': Allows read access to inventory endpoints + 'inventory:write': Allows write access to inventory endpoints + schemas: + ApiError: + $ref: ../core/schemas/apiError.yml + CapEventReason: + $ref: ./schemas/capEventReason.yml + CapType: + $ref: ./schemas/capType.yml + CapTypeWrapper: + $ref: ./schemas/capTypeWrapper.yml + DemandSubAccountInventoryCap: + $ref: ./schemas/demandSubAccountInventoryCap.yml + DemandSubAccountInventoryCapEvent: + $ref: ./schemas/demandSubAccountInventoryCapEvent.yml + DemandSubAccountInventoryCapCreateData: + $ref: ./schemas/demandSubAccountInventoryCapCreateData.yml + DemandSubAccountInventoryCapUpdateData: + $ref: ./schemas/demandSubAccountInventoryCapUpdateData.yml + ProductType: + $ref: ../core/schemas/productType.yml + StaticOfferInventoryCap: + $ref: ./schemas/staticOfferInventoryCap.yml + StaticOfferInventoryCapUpdateData: + $ref: ./schemas/staticOfferInventoryCapUpdateData.yml + StaticOfferInventoryCapCreateData: + $ref: ./schemas/staticOfferInventoryCapCreateData.yml + StaticOfferInventoryCapStatus: + $ref: ./schemas/staticOfferInventoryCapStatus.yml + StaticOfferInventoryCapEvent: + $ref: ./schemas/staticOfferInventoryCapEvent.yml + VersionDiff: + $ref: ./schemas/versionDiff.yml +tags: + - name: Demand Sub-Account Inventory Cap + description: >- + Inventory caps set against demand sub-accounts. A means to control the + amount of traffic going towards a specific demand sub-account + - name: Static Offer Inventory Cap + description: >- + Inventory caps set against static offers. Represents a static offer that + Partner Solutions does not want to have too high of an attributed revenue + or attributed clicks +paths: + /staticOfferInventoryCaps: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get static offer inventory caps + description: >- + Return a list of StaticOfferInventoryCaps, filtered by search criteria + provided in the URL + operationId: getStaticOfferInventoryCaps + tags: + - Static Offer Inventory Cap + security: + - oauth: + - 'inventory:read' + parameters: + - name: id + in: query + description: A comma separated list of StaticOfferInventoryCap ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + style: form + required: false + deprecated: false + allowEmptyValue: true + - name: staticOfferId + in: query + description: A comma separated list of StaticOffer ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + style: form + required: false + deprecated: false + allowEmptyValue: true + - name: subAccountId + in: query + description: A comma separated list of SubAccount ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + required: false + deprecated: false + allowEmptyValue: true + - name: capType + in: query + schema: + type: array + items: + $ref: ./schemas/capType.yml + - name: productType + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ProductType' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StaticOfferInventoryCap' + '400': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiError' + post: + summary: Create a static offer inventory cap + description: create a static offer inventory cap + operationId: createStaticOfferInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Static Offer Inventory Cap + requestBody: + content: + application/json: + schema: + $ref: ./schemas/staticOfferInventoryCapCreateData.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/StaticOfferInventoryCap' + '400': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '/staticOfferInventoryCaps/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a static offer inventory cap + description: Delete a static offer inventory cap + operationId: deleteStaticOfferInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Static Offer Inventory Cap + responses: + '204': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/StaticOfferInventoryCap' + '404': + description: Unknown ID + put: + summary: Update a static offer inventory cap + description: Update a static offer inventory cap + operationId: updateStaticOfferInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Static Offer Inventory Cap + requestBody: + content: + application/json: + schema: + $ref: ./schemas/staticOfferInventoryCapUpdateData.yml + responses: + '204': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/StaticOfferInventoryCap' + '400': + description: Invalid request + get: + summary: Get a static offer inventory cap + description: Get a static offer inventory cap + operationId: getStaticOfferInventoryCap + security: + - oauth: + - 'inventory:read' + tags: + - Static Offer Inventory Cap + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/StaticOfferInventoryCap' + '404': + description: Unknown ID + '/staticOfferInventoryCaps/{id}/versionDiff': + x-lint-skip: + - path-resource-is-plural + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + get: + summary: Get a version diff of a static offer inventory cap + description: Get a version diff of a static offer inventory cap + operationId: getStaticOfferInventoryCapVersionDiff + security: + - oauth: + - 'inventory:read' + tags: + - Static Offer Inventory Cap + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/versionDiff.yml + '404': + description: Unknown ID + /filterDemandSubAccounts: + get: + summary: Filter capped sub-account IDs + description: > + Return a filtered list of sub-account IDs that have not reached cap + limit, + + given a list of sub-account IDs + operationId: filterCappedSubAccountIds + tags: + - Demand Sub-Account Inventory Cap + parameters: + - name: limit + in: query + required: true + description: The maximum number of resources to include in the results. + schema: + type: integer + format: int32 + minimum: 1 + - name: subAccountIds + in: query + description: A comma separated list of SubAccount IDs + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + required: true + deprecated: false + allowEmptyValue: false + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + type: integer + format: int64 + /calculateDemandSubAccountCaps: + post: + summary: Refresh demand sub-account inventory cache + description: | + Refresh `DemandSubAccountInventoryCaps` cache manually + operationId: refreshDemandSubAccountInventoryCache + tags: + - Demand Sub-Account Inventory Cap + responses: + '200': + description: Success + /demandSubAccountInventoryCaps: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get demand sub-account inventory caps + description: Return demand sub account inventory caps based upon request parameters + operationId: getDemandSubAccountInventoryCaps + security: + - oauth: + - 'inventory:read' + tags: + - Demand Sub-Account Inventory Cap + parameters: + - name: id + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: demandSubAccountId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: capType + in: query + schema: + type: array + items: + $ref: ./schemas/capType.yml + - name: currentDate + in: query + schema: + type: string + format: date + - name: productType + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ProductType' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DemandSubAccountInventoryCap' + '400': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + post: + summary: Create a demand sub-account inventory cap + description: Create a demand-sub account inventory cap + operationId: createDemandSubAccountInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Demand Sub-Account Inventory Cap + requestBody: + content: + application/json: + schema: + $ref: ./schemas/demandSubAccountInventoryCapCreateData.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/DemandSubAccountInventoryCap' + '400': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '/demandSubAccountInventoryCaps/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a demand sub-account inventory cap + description: Delete a demand sub-account inventory cap + operationId: deleteDemandSubAccountInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Demand Sub-Account Inventory Cap + responses: + '204': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/DemandSubAccountInventoryCap' + '404': + description: Unknown ID + put: + summary: Update a demand sub-account inventory cap + description: Update a demand sub0-account inventory cap + operationId: updateDemandSubAccountInventoryCap + security: + - oauth: + - 'inventory:write' + tags: + - Demand Sub-Account Inventory Cap + requestBody: + content: + application/json: + schema: + $ref: ./schemas/demandSubAccountInventoryCapUpdateData.yml + responses: + '204': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/DemandSubAccountInventoryCap' + '400': + description: Invalid request + get: + summary: Get a demand sub-account inventory cap + description: Get a demand sub-account inventory cap + operationId: getDemandSubAccountInventoryCap + security: + - oauth: + - 'inventory:read' + tags: + - Demand Sub-Account Inventory Cap + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/DemandSubAccountInventoryCap' + '404': + description: Unknown ID + /staticOfferInvetoryCapsStatuses: + get: + summary: Get static offer inventory cap statuses + description: Get static offer inventory cap statuses + operationId: getStaticOfferInventoryCapStatuses + security: + - oauth: + - 'inventory:read' + tags: + - Static Offer Inventory Cap + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StaticOfferInventoryCapStatus' + '402': + description: Payment required + '/staticOfferInventoryCapsStatus/{id}': + x-lint-skip: + - path-resource-is-plural + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + get: + summary: Get the status of a static offer invetory cap + description: Get the status of a static offer invetory cap + operationId: getStaticOfferInventoryCapStatus + security: + - oauth: + - 'inventory:read' + tags: + - Static Offer Inventory Cap + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/StaticOfferInventoryCapStatus' + '402': + description: Payment required diff --git a/Tests/Fixtures/acme/birch-catalog/lead/examples/creditCardLead.yml b/Tests/Fixtures/acme/birch-catalog/lead/examples/creditCardLead.yml new file mode 100644 index 0000000..82356b1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/examples/creditCardLead.yml @@ -0,0 +1,48 @@ +summary: A credit card lead request +value: + { + "productTypes": [ + "credit_card" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "dateOfBirth": "1993-10-09" + }, + "creditCardInformation": { + "allowAnnualFee": true, + "cardPurposes": [ + "travel_incentives" + ] + }, + "creditInformation": { + "providedCreditRating": "excellent", + "providedNumericCreditScore": 750 + }, + "financialInformation": { + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "annualIncome": 120000 + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "hello": [ + "world", + "there" + ], + "something": [ + "else" + ] + } + } diff --git a/Tests/Fixtures/acme/birch-catalog/lead/examples/leadRequestJson.yml b/Tests/Fixtures/acme/birch-catalog/lead/examples/leadRequestJson.yml new file mode 100644 index 0000000..0527920 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/examples/leadRequestJson.yml @@ -0,0 +1,113 @@ +summary: A lead request +value: + { + "productTypes": [ + "loan", + "savings" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "workPhone": "2125551234", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "monthsAtAddress": 5, + "driversLicenseNumber": "111222333", + "driversLicenseState": "NY", + "ipAddress": "8.8.8.8", + "activeMilitary": false, + "militaryVeteran": true, + "dateOfBirth": "1993-10-09", + "ssn": "111-22-3333" + }, + "loanInformation": { + "purpose": "debt_consolidation", + "loanAmount": 10000 + }, + "mortgageInformation": { + "propertyType": "condo", + "propertyStatus": "own_with_mortgage", + "propertyValue": 200000, + "mortgageBalance": 10000, + "lenderName": "Bank OF NY", + "hasFHALoan": true, + "currentWithLoan": true + }, + "creditCardInformation": { + "allowAnnualFee": true, + "cardPurposes": [ + "travel_incentives" + ] + }, + "savingsInformation": { + "minDepositAmount": 1000 + }, + "creditInformation": { + "providedCreditRating": "excellent", + "providedNumericCreditScore": 750 + }, + "financialInformation": { + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "annualIncome": 120000, + "monthlyNetIncome": 10000, + "bankName": "Santander", + "bankRoutingNumber": "231372691", + "bankAccountType": "savings", + "monthsAtBank": 10, + "bankAccountNumber": "1234567890" + }, + "employmentInformation": { + "employerName": "Example Co", + "employerAddress": "45 W 21st St", + "employerCity": "New York", + "employerState": "NY", + "employerZip": "10010", + "jobTitle": "Software Engineer", + "monthsEmployed": 14, + "directDeposit": true, + "payDate1": "2004-10-06", + "payDate2": "2004-11-06" + }, + "educationInformation": { + "educationLevel": "masters", + "graduateDegreeType": "master_of_science", + "universityAttended": "Johns Hopkins University" + }, + "coApplicantInformation": { + "firstName": "Jane", + "lastName": "Doe", + "dateOfBirth": "1984-03-06", + "annualIncome": 100000, + "streetAddress1": "45 West 21st Street", + "streetAddress2": "5th Floor", + "city": "New York", + "state": "NY", + "zipcode": "10010" + }, + "healthInformation": { + "gender": "male", + "heightInInches": 72, + "weightInPounds": 195, + "tobaccoSmoker": false, + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "hello": [ + "world", + "there" + ], + "something": [ + "else" + ] + } + } diff --git a/Tests/Fixtures/acme/birch-catalog/lead/examples/loanLead.yml b/Tests/Fixtures/acme/birch-catalog/lead/examples/loanLead.yml new file mode 100644 index 0000000..535e1f0 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/examples/loanLead.yml @@ -0,0 +1,67 @@ +summary: A loan lead request +value: + { + "productTypes": [ + "loan", + "other" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "dateOfBirth": "1993-10-09", + "ssn": "111-22-3333" + }, + "loanInformation": { + "purpose": "debt_consolidation", + "loanAmount": 10000 + }, + "mortgageInformation": { + "propertyStatus": "own_with_mortgage" + }, + "creditInformation": { + "providedCreditRating": "excellent", + "providedNumericCreditScore": 750 + }, + "financialInformation": { + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "annualIncome": 120000, + }, + "educationInformation": { + "educationLevel": "masters", + "graduateDegreeType": "master_of_science", + "universityAttended": "Johns Hopkins University" + }, + "coApplicantInformation": { + "firstName": "Jane", + "lastName": "Doe", + "dateOfBirth": "1984-03-06", + "annualIncome": 100000, + "streetAddress1": "45 West 21st Street", + "streetAddress2": "5th Floor", + "city": "New York", + "state": "NY", + "zipcode": "10010" + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "hello": [ + "world", + "there" + ], + "something": [ + "else" + ] + } + } diff --git a/Tests/Fixtures/acme/birch-catalog/lead/examples/savingsLead.yml b/Tests/Fixtures/acme/birch-catalog/lead/examples/savingsLead.yml new file mode 100644 index 0000000..4ed73be --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/examples/savingsLead.yml @@ -0,0 +1,27 @@ +summary: A savings lead request +value: + { + "productTypes": [ + "savings" + ], + "personalInformation": { + "state": "NY", + "zipcode": "10010", + }, + "creditInformation": { + "providedCreditRating": "excellent", + "providedNumericCreditScore": 750 + }, + "savingsInformation": { + "minDepositAmount": 1000 + }, + "clientTags": { + "hello": [ + "world", + "there" + ], + "something": [ + "else" + ] + } + } diff --git a/Tests/Fixtures/acme/birch-catalog/lead/parameters/universityName.yml b/Tests/Fixtures/acme/birch-catalog/lead/parameters/universityName.yml new file mode 100644 index 0000000..436fff3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/parameters/universityName.yml @@ -0,0 +1,8 @@ +name: name +in: query +description: Part of a university name for search +schema: + type: string +examples: + with-name-johns: + value: johns diff --git a/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLead.yml b/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLead.yml new file mode 100644 index 0000000..bab6240 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLead.yml @@ -0,0 +1,11 @@ +description: Invalid Body +content: + application/json: + schema: + type: array + items: + $ref: ../../core/schemas/apiError.yml + example: + - message: >- + Cannot parse parameter uuid as UUID: Invalid UUID string: + 123 diff --git a/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLeadUuid.yml b/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLeadUuid.yml new file mode 100644 index 0000000..689420c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/responses/invalidLeadUuid.yml @@ -0,0 +1,9 @@ +description: Invalid UUID +content: + application/json: + schema: + type: array + items: + $ref: ../../core/schemas/apiError.yml + example: + - message: Lead UUID is invalid diff --git a/Tests/Fixtures/acme/birch-catalog/lead/responses/leadCreated.yml b/Tests/Fixtures/acme/birch-catalog/lead/responses/leadCreated.yml new file mode 100644 index 0000000..8f69727 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/responses/leadCreated.yml @@ -0,0 +1,7 @@ +description: Lead created +content: + application/json: + schema: + $ref: ../schemas/leadUuid.yml + example: + uuid: 81c08fb9-559a-4bab-948c-ba38f8dd0dcc diff --git a/Tests/Fixtures/acme/birch-catalog/lead/responses/leadFound.yml b/Tests/Fixtures/acme/birch-catalog/lead/responses/leadFound.yml new file mode 100644 index 0000000..b2ab3d3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/responses/leadFound.yml @@ -0,0 +1,5 @@ +description: Lead found +content: + application/json: + schema: + $ref: ../schemas/leadResponseJson.yml diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/bankAccountType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/bankAccountType.yml new file mode 100644 index 0000000..5d58f70 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/bankAccountType.yml @@ -0,0 +1,6 @@ +type: string +enum: + - checking + - savings + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/bestTimeToCall.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/bestTimeToCall.yml new file mode 100644 index 0000000..56fd7fb --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/bestTimeToCall.yml @@ -0,0 +1,6 @@ +type: string +enum: + - morning + - afternoon + - evening + - night diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardBenefits.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardBenefits.yml new file mode 100644 index 0000000..0d2c91f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardBenefits.yml @@ -0,0 +1,152 @@ +type: string +description: Benefits or benefit categories related to a credit card +enum: + - No Foreign Transaction Fees + - Purchase Protection + - Return Protection + - Price Protection + - Fraud Protection + - Extended Warranty + - Travel Accident Insurance + - Trip Interruption Insurance + - Car Rental Insurance + - Baggage Insurance + - Baggage Delay Insurance + - Hotel Burglary Insurance + - Travel & Emergency Assistance + - Roadside Assistance + - Concierge Service + - Lounge Access + - Identity Theft Assistance + - In-Flight Savings + - Free Checked Bag + - Priority Boarding + - No Blackout Dates + - Free Companion Ticket + - Discount Companion Ticket + - Global Entry or TSA PreCheck + - Private Jet Perks + - Lounge Access Discount + - 24/7 Cardholder Support + - Authorized User + - Entertainment Access + - Airline Fee Credit + - Late Fee Pass + - Credit Score Reporting + - No Flight Change Fees + - 24/7 Account Monitoring + - Amex Offers + - Visa Signature Offers + - MasterCard Offers + - Free Hotel Stay + - Extended Hotel Stay + - Dining Concierge + - 2 Lounge Passes + - Hilton Honors Silver Membership + - Hilton Honors Gold Membership + - World of Hyatt Discoverist Status + - SPG Gold Membership + - Marriott Rewards Silver Status + - Hertz Presidents Circle Elite Status + - 2 Free Checked Bags + - Auto Discounts + - InCircle Partnership + - ShopRunner + - WiFi Access + - ShopSafe + - BoA Preferred Rewards + - MasterCard Fuel Rewards Network + - Missed Event Ticket Protection + - Account Freezing + - Cell Phone Protection + - GPA Rewards + - In-Flight WiFi Credit + - Citi Private Pass + - Priceless Cities + - The Hotel Collection + - By Invitation Only + - Luxury Hotel Collection + - Expedia+ Silver Status + - Expedia+ Gold Status + - $100 American Airlines Discount + - Disney Parks Perks and Savings + - Ritz-Carlton Gold Elite Status + - Ritz-Carlton Club Level Upgrade + - Annual Travel Credit + - IHG Platinum Elite Status + - QuickBooks Connect + - ReceiptMatch + - Employee Spending Limits + - FX International Payments + - No Pre-Set Spending Limit + - Purchase Financing + - Amex Open Savings + - Amazon Special Financing + - $100 Ritz-Carlton Hotel Credit + - British Airways Companion Ticket + - Mercedes-Benz Gift Certificates + - Mercedes-Benz Excess Mileage Waiver + - JetBlue Annual Statement Credit + - 20% Discount on Delta Flights for Delta Private Jet Members + - Expense Report Features + - Business Cell Phone Protection + - Free Shipping on most Target.com orders + - 30 Extra Days for Returns + - Free clothing altertaions + - Personal shopping + - Shopmyway Savings + - Online Subscription Credit + - Uber Exclusive Access + - Airline Benefits + - Hotel Benefits + - Other Travel Benefits + - Emergency Assistance + - Experiences + - Shopping Benefits + - Cardholder Benefits + - Enhanced Security + - Business Benefits + - Other Benefits + - In-Flight Discounts + - Fee Coverage + - Flight Credits & Discounts + - Hotel Membership Status + - Hotel Credit & Free Stays + - Travel Credit + - Travel Experiences Programs + - Car Rental Membership Status + - Extra Gas Rewards + - Shopping Protection + - Shopping Discounts + - Free Shipping + - The Boingo American Express Preferred Plan + - AirSpace Lounge + - Uber Monthly Credit + - Ride Share Benefits + - Delta Sky Club + - Admirals Club Membership + - Priority Pass Select Membership (Prestige) + - Priority Pass Select Membership (Standard Plus) + - Daily Breakfast + - Early Check-in & Late Check-out + - Room Upgrades + - Complementary WiFi + - Amex Hotel Collection Credit + - Temporary Account Numbers + - One-Time 50% Discount on Companion Ticket + - Airline Travel Credit + - United Club Membership + - Chip Technology + - Earn More Miles for Sharing Travel Stories + - Mastercard World Elite Concierge and Luxury Travel Benefits + - 20% Savings on Delta In-Flight Purchases + - 25% Savings on United In-Flight Food and Drink Purchases + - $100 Hilton Properties Credit + - $250 Hilton Resort Credit + - Hilton Honors Diamond Membership + - Free Birthday Gift + - 2x Points During Your Birthday Month + - Car Rental VIP Perks + - Free shipping with the purchase of a bra + - Monthly Dining Credit + - Amazon Prime Student diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardPurposes.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardPurposes.yml new file mode 100644 index 0000000..533e61b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/cardPurposes.yml @@ -0,0 +1,12 @@ +type: string +description: Purposes or categories related to a credit card +enum: + - balance_transfer + - cash_back + - earning_rewards + - improve_credit + - low_interest + - new_to_credit + - student + - travel_incentives + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/citizenshipStatus.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/citizenshipStatus.yml new file mode 100644 index 0000000..16914bf --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/citizenshipStatus.yml @@ -0,0 +1,7 @@ +type: string +description: Citizenship status +enum: + - citizen + - permanent_resident + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/clientTags.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/clientTags.yml new file mode 100644 index 0000000..234c63f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/clientTags.yml @@ -0,0 +1,12 @@ +type: object +description: Arbitrary key-values mappings to associate with a `Lead`. This field can be use to attach `subid`s to a `Lead` +additionalProperties: + type: array + items: + type: string +maxProperties: 1 +minProperties: 1 +example: + { + "subid": ["123"] + } diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/coApplicantInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/coApplicantInformation.yml new file mode 100644 index 0000000..f6afe40 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/coApplicantInformation.yml @@ -0,0 +1,28 @@ +type: object +description: | + The personal information of a co-applicant that may be considered in the + underwriting and approval of a loan. +properties: + firstName: + type: string + lastName: + type: string + dateOfBirth: + type: string + format: date + annualIncome: + type: integer + format: int32 + streetAddress1: + type: string + description: Street address (primary address line) + streetAddress2: + type: string + description: Secondary address line + city: + type: string + state: + $ref: ../../core/schemas/state-lead.yml + zipCode: + type: string + pattern: ^\d{5}([-\s]\d{4})?$ diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditCardInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditCardInformation.yml new file mode 100644 index 0000000..8738664 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditCardInformation.yml @@ -0,0 +1,9 @@ +type: object +properties: + allowAnnualFee: + type: boolean + cardPurposes: + type: array + items: + $ref: ./cardPurposes.yml + description: A list of card purposes in which the lead is interested diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditInformation.yml new file mode 100644 index 0000000..5c8738a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/creditInformation.yml @@ -0,0 +1,9 @@ +type: object +description: Credit history information relating to a `Lead` +properties: + providedCreditRating: + $ref: ./providedCreditRating.yml + providedNumericCreditScore: + type: integer + format: int32 + description: FICO credit score provided by a `Lead` diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/deduplicationConfiguration.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/deduplicationConfiguration.yml new file mode 100644 index 0000000..2e24b7d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/deduplicationConfiguration.yml @@ -0,0 +1,49 @@ +type: object +required: + - id + - supplySubAccountId + - supplySubAccountUuid + - durationMinutes + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + description: | + A unique, internal identifier for this resource. + supplySubAccountId: + type: integer + format: int64 + description: | + The ID of the supply sub-account for this configuration. + supplySubAccountUuid: + type: string + format: uuid + description: | + The UUID of the supply sub-account for this configuration. + durationMinutes: + type: integer + format: int32 + description: | + The number of minutes to look back when looking for duplicate leads. + createdAt: + type: string + format: date-time + description: | + When the resource was created. + createdBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationInformation.yml new file mode 100644 index 0000000..16954a5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationInformation.yml @@ -0,0 +1,46 @@ +type: object +properties: + educationLevel: + $ref: ./educationLevel.yml + graduateDegreeType: + $ref: ./graduateDegreeType.yml + universityAttended: + type: string + description: | + Name of university where a lead received their undergraduate degree. + A lookup service for possible universities is available from using the /leads/universities endpoint. + To maximize returned offers, this string must match one of the names returned from the lookup. + deprecated: true + graduationDate: + type: string + format: date + description: Date the lead graudated from undergrad (YYYY-MM-DD) + deprecated: true + graduateGraduationDate: + type: string + format: date + description: Lead's graduate school graduation date (YYYY-MM-DD) + graduateLastAttendedDate: + type: string + format: date + description: Lead's last attended month/year for graduate school (YYYY-MM-DD) + graduateUniversityAttended: + type: string + description: | + Name of university where a lead received their graduate degree. + A lookup service for possible universities is available from using the /leads/universities endpoint. + To maximize returned offers, this string must match one of the names returned from the lookup. + undergraduateGraduationDate: + type: string + format: date + description: Date the lead graduated from undergrad (YYYY-MM-DD). + undergraduateLastAttendedDate: + type: string + format: date + description: Lead's last attended month/year for undergrad (YYYY-MM-DD) + undergraduateUniversityAttended: + type: string + description: | + Name of university where a lead received their undergraduate degree. + A lookup service for possible universities is available from using the /leads/universities endpoint. + To maximize returned offers, this string must match one of the names returned from the lookup. \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationLevel.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationLevel.yml new file mode 100644 index 0000000..d8ad1f9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/educationLevel.yml @@ -0,0 +1,13 @@ +type: string +enum: + - high_school + - associate + - bachelors + - masters + - doctorate + - other_grad_degree + - certificate + - did_not_graduate + - still_enrolled + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentInformation.yml new file mode 100644 index 0000000..10e1fa5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentInformation.yml @@ -0,0 +1,34 @@ +type: object +properties: + employerName: + type: string + employerAddress: + type: string + employerAddress2: + type: string + employerCity: + type: string + employerPhone: + type: string + employerState: + type: string + employerZip: + type: string + jobTitle: + type: string + monthsEmployed: + type: integer + format: int32 + directDeposit: + type: boolean + description: Whether a `Lead` uses direct deposit for their salary + payDate1: + type: string + format: date + payDate2: + type: string + format: date + startDate: + type: string + format: date + description: The date the lead started working at their current employer (YYYY-MM-DD) \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentPayFrequency.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentPayFrequency.yml new file mode 100644 index 0000000..db466e5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentPayFrequency.yml @@ -0,0 +1,7 @@ +type: string +enum: + - weekly + - biweekly + - twice_monthly + - monthly + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentStatus.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentStatus.yml new file mode 100644 index 0000000..a2c5837 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/employmentStatus.yml @@ -0,0 +1,10 @@ +type: string +enum: + - employed_full_time + - employed_part_time + - military + - not_employed + - self_employed + - retired + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/financialInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/financialInformation.yml new file mode 100644 index 0000000..c6e4b43 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/financialInformation.yml @@ -0,0 +1,42 @@ +type: object +properties: + employmentStatus: + $ref: ./employmentStatus.yml + employmentPayFrequency: + $ref: ./employmentPayFrequency.yml + annualIncome: + type: integer + format: int32 + monthlyNetIncome: + type: integer + format: int32 + bankName: + type: string + bankRoutingNumber: + type: string + bankAccountType: + $ref: ./bankAccountType.yml + monthsAtBank: + type: integer + format: int32 + bankAccountNumber: + type: string + monthlyDebt: + type: integer + format: int32 + totalAssets: + type: integer + format: int32 + monthlyHousingPayment: + type: integer + format: int32 + availableAssets: + type: integer + format: int32 + additionalIncome: + type: integer + format: int32 + description: The amount of additional income the lead recieves + additionalIncomeFrequency: + $ref: ./employmentPayFrequency.yml + description: The frequency the lead recieves additional income \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/gender.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/gender.yml new file mode 100644 index 0000000..4d74da5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/gender.yml @@ -0,0 +1,6 @@ +type: string +enum: + - male + - female + - unknown + diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/graduateDegreeType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/graduateDegreeType.yml new file mode 100644 index 0000000..1ec370a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/graduateDegreeType.yml @@ -0,0 +1,30 @@ +type: string +enum: + - doctor_of_medicine + - doctor_of_osteopathic_medicine + - doctor_of_optometry + - doctor_of_dental_medicine + - dentariae_medicinae_doctoris + - doctor_of_dental_surgery + - doctor_of_veterinary_medicine + - doctor_of_pharmacy + - veterinariae_medicinae_doctoris + - master_of_arts + - master_of_science + - master_of_research + - master_of_research_project + - master_of_studies + - master_of_business_administration + - master_of_library_science + - master_of_public_administration + - master_of_public_health + - master_of_laws + - master_of_arts_liberal_studies + - master_of_fine_arts + - master_of_music + - master_of_education + - master_of_engineering + - master_of_architecture + - juris_doctor + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/healthInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/healthInformation.yml new file mode 100644 index 0000000..23ef583 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/healthInformation.yml @@ -0,0 +1,12 @@ +type: object +properties: + gender: + $ref: ./gender.yml + heightInInches: + type: integer + format: int32 + weightInPounds: + type: integer + format: int32 + tobaccoSmoker: + type: boolean diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/idType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/idType.yml new file mode 100644 index 0000000..bf88b63 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/idType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - driver_license + - state_id + - passport diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/identificationInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/identificationInformation.yml new file mode 100644 index 0000000..201bbdc --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/identificationInformation.yml @@ -0,0 +1,11 @@ +type: object +properties: + idNumber: + type: string + description: The ID number supplied by the lead + idState: + type: string + description: The state of issue of the supplied ID + idType: + $ref: ./idType.yml + description: The form of the ID number supplied by the lead \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionResponse.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionResponse.yml new file mode 100644 index 0000000..25d3a1e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionResponse.yml @@ -0,0 +1,38 @@ +type: object +required: + - uuid + - actionType + - actionDate + - demandSubAccountId + - createdAt +properties: + uuid: + type: string + format: uuid + actionType: + $ref: ./leadActionType.yml + actionDate: + type: string + format: date-time + originatorKey: + type: string + demandSubAccountId: + type: integer + format: int64 + rejectReason: + $ref: ./rejectReason.yml + amount: + type: integer + format: int32 + originationFee: + type: integer + format: int32 + offerClickId: + type: integer + format: int64 + createdAt: + type: string + format: date-time + deletedAt: + type: string + format: date-time diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionType.yml new file mode 100644 index 0000000..513f3d6 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadActionType.yml @@ -0,0 +1,19 @@ +type: string +enum: + - initialized + - api_rejected + - api_approved + - api_listing + - clicked_referral_link + - clicked_special_offer_link + - special_offer_conversion + - applied + - rejected + - approved + - listed + - funded + - not_funded + - clicked_credit_card_offer_link + - clicked_mortgage_offer_link + - clicked_savings_offer_link + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadRequestJson.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadRequestJson.yml new file mode 100644 index 0000000..e14031f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadRequestJson.yml @@ -0,0 +1,69 @@ +type: object +properties: + productTypes: + type: array + description: Product types in which the `Lead` is interested + items: + $ref: ../../core/schemas/productType.yml + uuid: + type: string + format: uuid + description: Primary UUID for a `Lead` + sessionUuid: + type: string + format: uuid + description: UUID used to link leads across verticals, unique per user per supply sub-account + loanInformation: + $ref: ./loanInformation.yml + personalInformation: + $ref: ./personalInformation.yml + personalReferenceInformation: + $ref: ./personalReferenceInformation.yml + mortgageInformation: + $ref: ./mortgageInformation.yml + creditCardInformation: + $ref: ./creditCardInformation.yml + savingsInformation: + $ref: ./savingsInformation.yml + creditInformation: + $ref: ./creditInformation.yml + financialInformation: + $ref: ./financialInformation.yml + employmentInformation: + $ref: ./employmentInformation.yml + legalInformation: + $ref: ./legalInformation.yml + educationInformation: + $ref: ./educationInformation.yml + coApplicantInformation: + $ref: ./coApplicantInformation.yml + healthInformation: + $ref: ./healthInformation.yml + refinanceLoans: + type: array + items: + $ref: ./refinanceLoanInformation.yml + description: One or more loans that the lead wishes to refinance or consolidate + identificationInformation: + $ref: ./identificationInformation.yml + clientTags: + $ref: ./clientTags.yml + sessionInformation: + $ref: ./sessionInformation.yml + formCompleted: + type: boolean + description: Whether the `Lead` has completed an application form + deprecated: true + referralCompanyUuid: + type: string + format: uuid + description: UUID of company from which the `Lead` was referred + deprecated: true + trackingUuid: + type: string + format: uuid + # TODO this may need to be hidden + description: UUID for internal Example Co tracking purposes. This field should never be set by 3rd party API consumers + deprecated: true +example: + $ref: ../examples/leadRequestJson.yml diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseJson.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseJson.yml new file mode 100644 index 0000000..bea3528 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseJson.yml @@ -0,0 +1,87 @@ +type: object +required: + - leadProviderName + - uuid + - companyUUID + - isTest + - status + - createdAt + - updatedAt +properties: + leadProviderName: + type: string + description: Name of company which provided the lead + personalInformation: + $ref: ./personalInformation.yml + personalReferenceInformation: + $ref: ./personalReferenceInformation.yml + loanInformation: + $ref: ./loanInformation.yml + mortgageInformation: + $ref: ./mortgageInformation.yml + creditCardInformation: + $ref: ./creditCardInformation.yml + savingsInformation: + $ref: ./savingsInformation.yml + creditInformation: + $ref: ./creditInformation.yml + financialInformation: + $ref: ./financialInformation.yml + employmentInformation: + $ref: ./employmentInformation.yml + legalInformation: + $ref: ./legalInformation.yml + educationInformation: + $ref: ./educationInformation.yml + coApplicantInformation: + $ref: ./coApplicantInformation.yml + healthInformation: + $ref: ./healthInformation.yml + identificationInformation: + $ref: ./identificationInformation.yml + lifeInsuranceInformation: + $ref: ./lifeInsuranceInformation.yml + refinanceLoans: + type: array + items: + $ref: ./refinanceLoanInformation.yml + clientTags: + $ref: ./clientTags.yml + sessionInformation: + $ref: ./sessionInformation.yml + leadActions: + type: array + items: + $ref: ./leadActionResponse.yml + uuid: + type: string + format: uuid + description: Primary UUID for a `Lead` + companyUUID: + type: string + format: uuid + description: UUID for a company which created the `Lead` + sessionUuid: + type: string + format: uuid + description: UUID used to link leads across verticals, unique per user per supply sub-account + referralCompanyUuid: + type: string + format: uuid + deprecated: true + trackingUuid: + type: string + format: uuid + isTest: + type: boolean + description: Whether a `Lead` was created using a test access token + status: + description: The furthest step of the funnel a `Lead` has reached + allOf: + - $ref: ./leadActionType.yml + createdAt: + type: string + format: date-time + updatedAt: + type: string + format: date-time diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseWrapper.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseWrapper.yml new file mode 100644 index 0000000..336493b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadResponseWrapper.yml @@ -0,0 +1,20 @@ +type: object +required: + - leads + - offset + - limit + - count +properties: + leads: + type: array + items: + $ref: ./leadResponseJson.yml + offset: + type: integer + format: int32 + limit: + type: integer + format: int32 + count: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadUuid.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadUuid.yml new file mode 100644 index 0000000..8dd1c9e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/leadUuid.yml @@ -0,0 +1,8 @@ +type: object +required: + - uuid +properties: + uuid: + type: string + format: uuid + description: UUID corresponding to the created `Lead` diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/legalInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/legalInformation.yml new file mode 100644 index 0000000..b04f694 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/legalInformation.yml @@ -0,0 +1,15 @@ +type: object +description: Information regarding a `Lead`'s communication concent +properties: + consentsToFcra: + type: boolean + description: Whether the lead was shown, and consented to a Fair Credit Reporting Act notice + consentsToTcpa: + type: boolean + description: Whether the lead was shown, and consented to a Telephone Consumer Protection Act notice + tcpaLanguage: + type: string + description: The exact text to which the lead consented + consentsToSms: + type: boolean + description: The lead agrees to recieve SMS text messages from the Financial Institution diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/lifeInsuranceInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/lifeInsuranceInformation.yml new file mode 100644 index 0000000..53f770e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/lifeInsuranceInformation.yml @@ -0,0 +1,21 @@ +type: object +title: Life insurance information +description: Life insurance information +required: + - carrier + - duration + - policyAmount +properties: + carrier: + type: string + description: > + Carrier of the policy + duration: + type: integer + format: int64 + description: > + Duration, in years + policyAmount: + type: integer + format: int64 + description: Policy amount, in dollars diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/loanInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/loanInformation.yml new file mode 100644 index 0000000..ed5b0ee --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/loanInformation.yml @@ -0,0 +1,7 @@ +type: object +properties: + purpose: + $ref: ./purpose.yml + loanAmount: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageInformation.yml new file mode 100644 index 0000000..a9a6802 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageInformation.yml @@ -0,0 +1,78 @@ +type: object +properties: + propertyType: + $ref: ./propertyType.yml + propertyValue: + type: integer + format: int32 + mortgageBalance: + type: integer + format: int32 + lenderName: + type: string + hasFHALoan: + type: boolean + currentWithLoan: + type: boolean + propertyStatus: + $ref: ./propertyStatus.yml + mortgageType: + $ref: ./mortgageType.yml + mortgageAmount: + type: integer + format: int32 + description: Amount the lead will borrow + downPaymentAmount: + type: integer + format: int32 + propertyState: + type: string + propertyCounty: + type: string + propertyAddress1: + type: string + description: Street address (primary address line) + propertyAddress2: + type: string + description: Secondary address line + propertyZipcode: + type: string + propertyCity: + type: string + refinanceAmount: + type: integer + format: int32 + description: Amount the lead will borrow for refinancing an existing mortgage + cashOutAmount: + type: integer + format: int32 + description: Additional amount the lead will borrow against existing home equity in the case of refinance + occupancyType: + $ref: ./occupancyType.yml + refinanceType: + $ref: ./refinanceType.yml + propertySearchStatus: + $ref: ./propertySearchStatus.yml + numUnits: + type: integer + format: int32 + description: The number of legal units on the property + closingDate: + type: string + format: date + purchaseStatus: + $ref: ./purchaseStatus.yml + purchaseDate: + type: string + format: date + monthlyHoaFee: + type: number + format: float + description: The amount of the HOA fee for the lead + mortgageCompany: + type: string + description: The name of the company holding the lead's mortgage + mortgageEscrowAmount: + type: number + format: float + description: The amount of escrow the lead pays diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageType.yml new file mode 100644 index 0000000..1dba5b7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/mortgageType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - purchase + - refinance + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/newDeduplicationConfiguration.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/newDeduplicationConfiguration.yml new file mode 100644 index 0000000..0e466fb --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/newDeduplicationConfiguration.yml @@ -0,0 +1,19 @@ +type: object +required: + - durationMinutes +properties: + supplySubAccountId: + type: integer + format: int64 + description: | + The ID of the supply sub-account for this configuration. + supplySubAccountUuid: + type: string + format: uuid + description: | + The UUID of the supply sub-account for this configuration. + durationMinutes: + type: integer + format: int32 + description: | + The number of minutes to look back when looking for duplicate leads. diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/occupancyType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/occupancyType.yml new file mode 100644 index 0000000..010b1aa --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/occupancyType.yml @@ -0,0 +1,6 @@ +type: string +enum: + - primary + - secondary + - investment + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalInformation.yml new file mode 100644 index 0000000..a5a5656 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalInformation.yml @@ -0,0 +1,69 @@ +type: object +properties: + firstName: + type: string + lastName: + type: string + aliasFirstName: + type: string + description: The first name the lead uses as an alias + aliasLastName: + type: string + description: The last name the lead uses as an alias + email: + $ref: ../../core/schemas/email.yml + city: + type: string + state: + $ref: ../../core/schemas/state-lead.yml + workPhone: + type: string + pattern: ^1?\d{10}$ + primaryPhone: + type: string + pattern: ^1?\d{10}$ + bestTimeToCall: + $ref: ./bestTimeToCall.yml + address1: + type: string + description: Street address (primary address line) + address2: + type: string + description: Secondary address line + addressMoveInDate: + type: string + format: date + description: The date the lead moved into their current address + zipcode: + type: string + pattern: ^\d{5}([-\s]\d{4})?$ + monthsAtAddress: + type: integer + format: int32 + description: Number of months the provided address has been the lead's primary residence + driversLicenseNumber: + type: string + driversLicenseState: + type: string + description: State in which the driver's license was issued + ipAddress: + type: string + format: ip + description: IP address + activeMilitary: + type: boolean + description: Whether the lead is currently in the military (not a veteran) + militaryVeteran: + type: boolean + description: Whether the lead is a veteran (should not be used if the lead is active in the military) + dateOfBirth: + type: string + format: date + educationLevel: + deprecated: true + allOf: + - $ref: ./educationLevel.yml + ssn: + $ref: ../../core/schemas/ssn.yml + citizenshipStatus: + $ref: ./citizenshipStatus.yml diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceInformation.yml new file mode 100644 index 0000000..a01ee5e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceInformation.yml @@ -0,0 +1,15 @@ +type: object +properties: + firstName: + type: string + description: The first name of the personal reference supplied by the lead + lastName: + type: string + description: The last name of the personal reference supplied by the lead + primaryPhone: + type: string + pattern: ^1?\d{10}$ + description: The phone number of the personal reference supplied by the lead + relationType: + $ref: ./personalReferenceRelationType.yml + description: The relation of the personal reference supplied by the lead \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceRelationType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceRelationType.yml new file mode 100644 index 0000000..2ad90fa --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/personalReferenceRelationType.yml @@ -0,0 +1,10 @@ +type: string +enum: + - parent + - employer + - spouse + - guardian + - sibling + - relative + - friend + - other \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/productSubType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/productSubType.yml new file mode 100644 index 0000000..dc7c53d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/productSubType.yml @@ -0,0 +1,28 @@ +type: string +description: A type of financial product +enum: + # credit_card + - credit_card + - secured_card + + # loan + - personal_loan + - student_loan_refinance + - co_applicant_loan + - line_of_credit + + # mortgage + - purchase + - refinance + + # savings + - savings_account + - money_market_account + - certificate_of_deposit + - individual_retirement_account + - cash_management_account + - high_interest_checking + + # life_insurance + - accidental_death_benefits + - term_life diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/productType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/productType.yml new file mode 100644 index 0000000..c1ef665 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/productType.yml @@ -0,0 +1,10 @@ +type: string +enum: + - credit_card + - insurance + - life_insurance + - loan + - mortgage + - savings + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertySearchStatus.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertySearchStatus.yml new file mode 100644 index 0000000..b12efc9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertySearchStatus.yml @@ -0,0 +1,5 @@ +type: string +enum: + - found + - not_found + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyStatus.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyStatus.yml new file mode 100644 index 0000000..23715ac --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyStatus.yml @@ -0,0 +1,6 @@ +type: string +enum: + - own_outright + - own_with_mortgage + - rent + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyType.yml new file mode 100644 index 0000000..226ffab --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/propertyType.yml @@ -0,0 +1,8 @@ +type: string +enum: + - rent + - condo + - multi_unit + - single_family + - townhouse + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/providedCreditRating.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/providedCreditRating.yml new file mode 100644 index 0000000..1cbaf07 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/providedCreditRating.yml @@ -0,0 +1,8 @@ +type: string +enum: + - excellent + - good + - fair + - poor + - limited + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/purchaseStatus.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/purchaseStatus.yml new file mode 100644 index 0000000..200f9e4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/purchaseStatus.yml @@ -0,0 +1,7 @@ +type: string +enum: + - no_offer + - offer_accepted + - offer_pending + - under_contract + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/purpose.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/purpose.yml new file mode 100644 index 0000000..5954d44 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/purpose.yml @@ -0,0 +1,32 @@ +type: string +enum: + - auto_purchase + - auto_refinance + - baby + - boat + - business + - car_repair + - cosmetic + - credit_card_refi + - debt_consolidation + - emergency + - engagement + - green + - home_improvement + - home_purchase + - home_refi + - household_expenses + - large_purchases + - life_event + - medical_dental + - motorcycle + - moving_relocation + - rv + - special_occasion + - student_loan + - student_loan_refi + - taxes + - vacation + - wedding + - other + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanInformation.yml new file mode 100644 index 0000000..d736c74 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanInformation.yml @@ -0,0 +1,31 @@ +type: object +title: Refinance loan information +properties: + accountNumber: + type: string + description: The account number for a loan the lead is refinancing + incomeBasedRepayment: + type: boolean + description: If the repayment is income-based for a loan the lead is refinancing + interestRate: + type: number + format: float + description: The interest rate for a loan the lead is refinancing + loanAmount: + type: integer + format: int32 + description: The loan amount for a loan the lead is refinancing + loanServicer: + type: string + description: The name of a loan servicer of a loan the lead is refinancing + loanType: + $ref: ./refinanceLoanType.yml + description: The loan type for a loan the lead is refinancing + nextPaymentAmount: + type: number + format: float + description: The amount the next payment will be on a loan the lead is refinancing + nextPaymentDate: + type: string + format: date + description: The next payment date for a loan the lead is refinancing \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanType.yml new file mode 100644 index 0000000..702e913 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceLoanType.yml @@ -0,0 +1,4 @@ +type: string +enum: + - federal_student_loan + - private_student_loan diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceType.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceType.yml new file mode 100644 index 0000000..c282333 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/refinanceType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - cash_out + - rate_term + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/rejectReason.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/rejectReason.yml new file mode 100644 index 0000000..ec6eb9a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/rejectReason.yml @@ -0,0 +1,11 @@ +type: string +enum: + - low_fico + - no_fico + - major_derogatory + - underwriting_decline + - debt_to_income_ratio + - not_in_active_state + - incorrect_data_provided + - duplicate + - unknown diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/savingsInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/savingsInformation.yml new file mode 100644 index 0000000..9d45b61 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/savingsInformation.yml @@ -0,0 +1,6 @@ +type: object +properties: + minDepositAmount: + type: integer + format: int64 + description: The minimum amount a `Lead` is interesting in depositing when opening a new savings account diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/sessionInformation.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/sessionInformation.yml new file mode 100644 index 0000000..8aa694f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/sessionInformation.yml @@ -0,0 +1,7 @@ +type: object +description: Browsing session information accociated with a `Lead` +properties: + ipAddress: + type: string + userAgent: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/lead/schemas/university.yml b/Tests/Fixtures/acme/birch-catalog/lead/schemas/university.yml new file mode 100644 index 0000000..56b457c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/schemas/university.yml @@ -0,0 +1,21 @@ +type: object +required: + - id + - opeId + - name + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + opeId: + type: string + name: + type: string + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/lead/spec.yml b/Tests/Fixtures/acme/birch-catalog/lead/spec.yml new file mode 100644 index 0000000..b53beee --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/lead/spec.yml @@ -0,0 +1,650 @@ +openapi: 3.0.3 +info: + title: lead + description: Capture and calculate financial informations for our partners + version: 1.4.0 + contact: + name: Offers Chapter + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com' + description: Prod + - url: 'https://dev-api.example.com' + description: Dev +components: + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'svc-lead:leads:insert': Allows write access to `Leads` + 'svc-lead:leads:insert-test': >- + Disables non-test write access to `Leads`. An access token with + this scope can _only_ create test `Lead`s + 'svc-lead:leads:readAll': Allows read access to all `Lead`s + 'svc-lead:admin:read': Allows reads on admin endpoints in lead + 'svc-lead:admin:write': Allows writes on admin endpoints in lead + schemas: + ApiError: + $ref: ../core/schemas/apiError.yml + AprType: + $ref: ../originator/schemas/aprType.yml + BankAccountType: + $ref: ./schemas/bankAccountType.yml + BestTimeToCall: + $ref: ./schemas/bestTimeToCall.yml + BonusPersonalization: + $ref: ../offer-augmentation/schemas/bonusPersonalization.yml + CardBenefits: + $ref: ../lead/schemas/cardBenefits.yml + CardPurpose: + $ref: ./schemas/cardPurposes.yml + CardType: + $ref: ../originator/schemas/cardType.yml + CitizenshipStatus: + $ref: ./schemas/citizenshipStatus.yml + ClientTags: + $ref: ./schemas/clientTags.yml + CoApplicantInformation: + $ref: ./schemas/coApplicantInformation.yml + CreditCardInformation: + $ref: ./schemas/creditCardInformation.yml + CreditInformation: + $ref: ./schemas/creditInformation.yml + CreditCardIntroOfferType: + $ref: ../originator/schemas/introOfferType.yml + CreditCardOffer: + $ref: ../originator/schemas/creditCardOffer.yml + CreditCardOfferDetails: + $ref: ../originator/schemas/creditCardOfferDetails.yml + DeduplicationConfiguration: + $ref: ./schemas/deduplicationConfiguration.yml + DeduplicationConfigurationSort: + type: string + enum: + - id + - supplySubAccountId + - durationMinutes + - createdAt + - deletedAt + DemandPartner: + $ref: ../originator/schemas/demandPartner.yml + EarningBonus: + $ref: ../offer-augmentation/schemas/earningBonus.yml + EarningBonusName: + $ref: ../offer-augmentation/schemas/earningBonusName.yml + EarningBonusType: + $ref: ../offer-augmentation/schemas/earningBonusType.yml + EarningContext: + $ref: ../offer-augmentation/schemas/earningContext.yml + EarningContextType: + $ref: ../offer-augmentation/schemas/earningContextType.yml + EarningGroup: + $ref: ../offer-augmentation/schemas/earningGroup.yml + EarningItem: + $ref: ../offer-augmentation/schemas/earningItem.yml + EarningItemPersonalization: + $ref: ../offer-augmentation/schemas/earningItemPersonalization.yml + EarningItemType: + $ref: ../offer-augmentation/schemas/earningItemType.yml + EarningProgram: + $ref: ../offer-augmentation/schemas/earningProgram.yml + EarningProgramPersonalization: + $ref: ../offer-augmentation/schemas/earningProgramPersonalization.yml + EducationInformation: + $ref: ./schemas/educationInformation.yml + EducationLevel: + $ref: ./schemas/educationLevel.yml + EmploymentInformation: + $ref: ./schemas/employmentInformation.yml + EmploymentPayFrequency: + $ref: ./schemas/employmentPayFrequency.yml + EmploymentStatus: + $ref: ./schemas/employmentStatus.yml + FinancialInformation: + $ref: ./schemas/financialInformation.yml + IdType: + $ref: ./schemas/idType.yml + Gender: + $ref: ./schemas/gender.yml + GraduateDegreeType: + $ref: ./schemas/graduateDegreeType.yml + HealthInformation: + $ref: ./schemas/healthInformation.yml + IdentificationInformation: + $ref: ./schemas/identificationInformation.yml + LeadAction: + $ref: ./schemas/leadActionResponse.yml + LeadActionRejectReason: + $ref: ./schemas/rejectReason.yml + LeadActionType: + $ref: ./schemas/leadActionType.yml + LeadRequest: + $ref: ./schemas/leadRequestJson.yml + LeadResponse: + $ref: ./schemas/leadResponseJson.yml + LeadResponseWrapper: + $ref: ./schemas/leadResponseWrapper.yml + LeadUuid: + $ref: ./schemas/leadUuid.yml + LegalInformation: + $ref: ./schemas/legalInformation.yml + LifeInsuranceInformation: + $ref: ./schemas/lifeInsuranceInformation.yml + LoanInformation: + $ref: ./schemas/loanInformation.yml + LoanOffer: + $ref: ../originator/schemas/loanOfferPublic.yml + LoanPurpose: + $ref: ./schemas/purpose.yml + LoanTermUnit: + $ref: ../originator/schemas/termUnit.yml + Merchant: + $ref: ../offer-augmentation/schemas/merchant.yml + MerchantCategory: + $ref: ../offer-augmentation/schemas/category.yml + MorgageAdjustmentType: + $ref: ../originator/schemas/adjustmentType.yml + MorgageInformation: + $ref: ./schemas/mortgageInformation.yml + MorgageLoanType: + $ref: ../originator/schemas/mortgageLoanType.yml + MortgageOccupancyType: + $ref: ./schemas/occupancyType.yml + MortgageOffer: + $ref: ../originator/schemas/mortgageOffer.yml + MortgageOfferDetails: + $ref: ../originator/schemas/mortgageOfferDetails.yml + MortgagePropertySearchStatus: + $ref: ./schemas/propertySearchStatus.yml + MortgagePropertyStatus: + $ref: ./schemas/propertyStatus.yml + MortgagePropertyType: + $ref: ./schemas/propertyType.yml + MortgagePurchaseStatus: + $ref: ./schemas/purchaseStatus.yml + MortgageRefinanceType: + $ref: ./schemas/refinanceType.yml + MortgageType: + $ref: ./schemas/mortgageType.yml + NewDeduplicationConfiguration: + $ref: ./schemas/newDeduplicationConfiguration.yml + Offer: + $ref: ../originator/schemas/offer.yml + Order: + $ref: ../core/schemas/order.yml + Originator: + $ref: ../originator/schemas/originator.yml + OriginatorImage: + $ref: ../originator/schemas/originatorImage.yml + PendingResponse: + $ref: ../originator/schemas/pendingResponse.yml + PersonalInformation: + $ref: ./schemas/personalInformation.yml + PersonalReferenceInformation: + $ref: ./schemas/personalReferenceInformation.yml + PersonalReferenceRelationType: + $ref: ./schemas/personalReferenceRelationType.yml + ProductSubType: + $ref: ./schemas/productSubType.yml + ProductType: + $ref: ../core/schemas/productType.yml + ProvidedCreditRating: + $ref: ./schemas/providedCreditRating.yml + RateTablePublic: + $ref: ../originator/schemas/rateTablePublic.yml + RefinanceLoanInformation: + $ref: ./schemas/refinanceLoanInformation.yml + RefinanceLoanType: + $ref: ./schemas/refinanceLoanType.yml + SavingsCompoundingMethod: + $ref: ../originator/schemas/compoundingMethod.yml + SavingsInformation: + $ref: ./schemas/savingsInformation.yml + SavingsOffer: + $ref: ../originator/schemas/savingsOffer.yml + SavingsOfferDetails: + $ref: ../originator/schemas/savingsOfferDetails.yml + SessionInformation: + $ref: ./schemas/sessionInformation.yml + SpecialOffer: + $ref: ../originator/schemas/specialOfferPublic.yml + State: + $ref: ../core/schemas/state-lead.yml + TimestampField: + type: string + enum: + - createdAt + - updatedAt + University: + $ref: ./schemas/university.yml +tags: + - name: Deduplication Configuration + description: >- + Used to indicate that leads from the specified supply sub-account should + be rejected as duplicate if they have an email that has been submitted by + any supply partner, within a configurable number of minutes. + - name: Lead + description: >- + The `Lead` object contains information associated with a possible + applicant for one or more products. + - name: University + description: University endpoints used to improve student loan refinance UX +paths: + /leads: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get leads + operationId: getLeads + security: + - oauth: + - 'svc-lead:leads:readAll' + tags: + - Lead + parameters: + - name: uuid + in: query + description: | + Limits results to leads with the specified UUIDs. + schema: + type: array + items: + type: string + format: uuid + - name: email + in: query + description: | + Limits results to leads with the specified email addresses. + schema: + type: array + items: + type: string + - name: credit + in: query + description: > + Limits results to leads that have the specified self-assessed credit + bands. + schema: + type: array + items: + $ref: '#/components/schemas/ProvidedCreditRating' + - name: timestampField + in: query + description: > + Defines the timestamp to consider for the `from` and `to` + parameters. + schema: + type: string + default: createdAt + allOf: + - $ref: '#/components/schemas/TimestampField' + - name: from + in: query + description: > + The earliest timestamp to include in the result set. Will either + match against `createdAt` or `updatedAt`, depending on the value of + the `timestampField` parameter. + schema: + type: string + format: date-time + - name: to + in: query + description: > + The latest timestamp to include in the result set. Will either match + against `createdAt` or `updatedAt`, depending on the value of the + `timestampField` parameter. + schema: + type: string + format: date-time + - name: company + in: query + description: > + Limits the result set to leads belonging the companies with the + specified UUIDs + schema: + type: array + items: + type: string + format: uuid + - name: test + in: query + description: > + When true, only returns test leads; otherwise, only returns non-test + leads + schema: + type: boolean + default: false + - name: status + in: query + schema: + type: array + items: + $ref: '#/components/schemas/LeadActionType' + - name: sortDirection + in: query + schema: + $ref: '#/components/schemas/Order' + - name: offset + in: query + description: > + The number of resources to skip before the first resource in the + results. + schema: + type: integer + format: int32 + default: 0 + - name: limit + in: query + description: | + The maximum number of resources to include in the results. + schema: + type: integer + format: int32 + default: 100 + responses: + '200': + description: Leads matching the query parameters + content: + application/json: + schema: + $ref: '#/components/schemas/LeadResponseWrapper' + post: + summary: Create a lead + operationId: createLead + tags: + - Lead + requestBody: + description: A lead object + required: true + content: + application/json: + schema: + $ref: ./schemas/leadRequestJson.yml + responses: + '200': + $ref: ./responses/leadCreated.yml + '400': + $ref: ./responses/invalidLead.yml + security: + - oauth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + '/leads/{uuid}': + parameters: + - name: uuid + in: path + required: true + description: The UUID of the lead + schema: + type: string + format: uuid + get: + summary: Get a lead + description: >- + Return a `Lead` given its UUID. Depending on the access token scope, the + response may contain a subset of a `Lead` object. + operationId: getLead + tags: + - Lead + responses: + '200': + $ref: ./responses/leadFound.yml + '400': + $ref: ./responses/invalidLeadUuid.yml + '404': + description: '`Lead` with the given UUID does not exist' + security: + - oauth: + - 'svc-lead:leads:readAll' + patch: + summary: Update a lead + description: >- + Update a `Lead` by its UUID. Array fields (like `productTypes`) with new + values are _merged_ with existing values. + operationId: updateLead + tags: + - Lead + requestBody: + description: A Lead object + required: true + content: + application/json: + schema: + $ref: ./schemas/leadRequestJson.yml + responses: + '200': + description: Lead updated + content: + application/json: + schema: + $ref: ./schemas/leadUuid.yml + example: + uuid: 81c08fb9-559a-4bab-948c-ba38f8dd0dcc + links: + lead: + operationId: LeadController.getLead + description: Get the updated `Lead` + parameters: + uuid: $request.path.uuid + '400': + description: Invalid data + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + invalid-uuid: + value: + - message: >- + Cannot parse parameter uuid as UUID: Invalid UUID + string: 123 + invalid-body: + value: + - message: >- + Invalid fields present: List(123 is not a valid email), + full request: ... + '404': + description: '`Lead` with the given UUID does not exist' + security: + - oauth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + /leads/rateTables: + post: + summary: Submit a lead and get a rate table + description: >- + A shorthand operation for `POST /leads` followed by a `POST + /originator/rateTables`. The response `RateTable` must still be queried + until there are no more `pendingResponses` + operationId: getRateTableForLead + tags: + - Lead + requestBody: + description: A Lead object + required: true + content: + application/json: + schema: + $ref: ./schemas/leadRequestJson.yml + responses: + '200': + description: The generated `RateTable` + content: + application/json: + schema: + $ref: ../originator/schemas/rateTablePublic.yml + examples: + rateTable: + value: + $ref: ../originator/examples/rateTablePublic.yml + '400': + description: Bad Request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + security: + - oauth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + /leads/admin/universities: + get: + summary: Get all available universites (limited to first 10000) + operationId: getUniversities + tags: + - University + responses: + '200': + description: A list of all available universities + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/university.yml + security: + - oauth: + - 'svc-lead:admin:read' + /admin/deduplicationConfigurations: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get deduplication configurations + description: Return deduplication configurations based upon request parameters + operationId: getDeduplicationConfigurations + security: + - oauth: + - 'svc-lead:admin:read' + tags: + - Deduplication Configuration + parameters: + - name: id + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: supplySubAccountId + in: query + schema: + type: integer + format: int64 + - name: supplySubAccountUuid + in: query + schema: + type: string + format: uuid + - name: includeDeleted + in: query + schema: + type: boolean + - name: offset + in: query + description: > + The number of resources to skip before the first resource in the + results. + schema: + type: integer + format: int64 + default: 0 + - name: limit + in: query + description: | + The maximum number of resources to include in the results. + schema: + type: integer + format: int32 + default: 100 + - name: sortBy + in: query + description: | + The attribute with which to sort the resources. + schema: + $ref: '#/components/schemas/DeduplicationConfigurationSort' + - name: order + in: query + description: | + The direction to use for ordering resources. + schema: + $ref: '#/components/schemas/Order' + responses: + '200': + description: Deduplication configurations matching the query parameters + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeduplicationConfiguration' + '400': + description: Invalid request provided + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiError' + post: + summary: Create a deduplication configuration + description: | + Create a deduplication configuration. Must specify exactly one of + `supplySubAccountId` or `supplySubAccountUuid`, otherwise an error will + be returned. + operationId: createDeduplicationConfiguration + security: + - oauth: + - 'svc-lead:admin:write' + tags: + - Deduplication Configuration + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/NewDeduplicationConfiguration' + responses: + '201': + description: The deduplication configuration was created successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DeduplicationConfiguration' + '400': + description: Invalid request provided + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiError' + '/admin/deduplicationConfigurations/{id}': + delete: + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + summary: Delete a deduplication configuration + description: Delete a deduplication configuration + operationId: deleteDeduplicationConfiguration + security: + - oauth: + - 'svc-lead:admin:write' + tags: + - Deduplication Configuration + responses: + '204': + description: The deduplication configuration was successfully deleted. + '404': + description: No deduplication configuration exists for the specified ID diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustment.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustment.yml new file mode 100644 index 0000000..d68c3d0 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustment.yml @@ -0,0 +1,48 @@ +type: object +title: accountAdjustment +required: + - id + - accountId + - amount + - adjustmentReason + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + accountId: + title: Account Id + type: integer + format: int64 + amount: + title: Adjustment Amount + type: number + format: double + adjustmentReason: + title: Adjustment Reason + $ref: ./adjustmentReason.yml + memo: + title: Memo + type: string + ledgerItemId: + title: Ledger Item Id + type: integer + format: int64 + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustmentCreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustmentCreateData.yml new file mode 100644 index 0000000..bea7b46 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/accountAdjustmentCreateData.yml @@ -0,0 +1,20 @@ +type: object +required: + - accountId + - amount + - adjustmentReason +properties: + accountId: + type: integer + format: int64 + amount: + type: number + format: double + adjustmentReason: + $ref: ./adjustmentReason.yml + memo: + title: Memo + type: string + ledgerItemId: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/adjustmentReason.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/adjustmentReason.yml new file mode 100644 index 0000000..d86305f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/adjustmentReason.yml @@ -0,0 +1,13 @@ +title: Adjustment Reason +type: string +enum: + - monthly_ten_percent + - customer_reporting + - savings_revenue + - credit_card_revenue + - email_revenue + - pre_reported + - promotional + - lead_testing_adjustment + - other + - unknown \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycle.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycle.yml new file mode 100644 index 0000000..39b51f2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycle.yml @@ -0,0 +1,54 @@ +type: object +title: billingCycle +required: + - id + - accountId + - ledgerItemType + - effectiveAt + - termUnit + - netD + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + accountId: + title: Account Id + type: integer + format: int64 + ledgerItemType: + title: Ledger Item Type + $ref: ./ledgerItemType.yml + effectiveAt: + title: Effective At + type: string + format: date + endDate: + title: End Date + type: string + format: date + termUnit: + title: Term Unit + $ref: ./termUnit.yml + netD: + title: NetD + type: number + format: double + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleCreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleCreateData.yml new file mode 100644 index 0000000..1efddf5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleCreateData.yml @@ -0,0 +1,31 @@ +type: object +title: billingCycleCreateData +required: + - accountId + - ledgerItemType + - effectiveAt + - termUnit + - netD +properties: + accountId: + title: Account Id + type: integer + format: int64 + ledgerItemType: + title: Ledger Item Type + $ref: ./ledgerItemType.yml + effectiveAt: + title: Effective At + type: string + format: date + endDate: + title: End Date + type: string + format: date + termUnit: + title: Term Unit + $ref: ./termUnit.yml + netD: + title: NetD + type: number + format: double \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleUpdateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleUpdateData.yml new file mode 100644 index 0000000..d9ddf6f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/billingCycleUpdateData.yml @@ -0,0 +1,9 @@ +type: object +title: billingCycleUpdateData +required: + - endDate +properties: + endDate: + title: End Date + type: string + format: date \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItem.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItem.yml new file mode 100644 index 0000000..9995d5f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItem.yml @@ -0,0 +1,75 @@ +type: object +title: ledgerItem +required: + - id + - accountId + - amount + - startDate + - endDate + - dueDate + - ledgerItemType + - billingCycleId + - details + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + accountId: + title: Account Id + type: integer + format: int64 + amount: + title: Amount + type: number + format: double + memo: + title: Memo + type: string + startDate: + title: Start Date + type: string + format: date + endDate: + title: End Date + type: string + format: date + dueDate: + title: Due Date + type: string + format: string + ledgerItemType: + title: Ledger Item Type + $ref: ./ledgerItemType.yml + reason: + $ref: ./ledgerItemReason.yml + previousLedgerItemId: + title: Previous Ledger Item Id + type: integer + format: int64 + billingCycleId: + title: Billing Cycle Id + type: integer + format: int64 + details: + type: array + items: + $ref: ./ledgerItemDetail.yml + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemAdjustment.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemAdjustment.yml new file mode 100644 index 0000000..c037d78 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemAdjustment.yml @@ -0,0 +1,37 @@ +type: object +title: ledgerItemAdjustment +required: + - id + - accountAdjustmentId + - ledgerItemId + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + accountAdjustmentId: + title: Account Adjustment Id + type: integer + format: int64 + ledgerItemId: + title: Ledger Item Id + type: integer + format: int64 + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCreateData.yml new file mode 100644 index 0000000..e92b71f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCreateData.yml @@ -0,0 +1,14 @@ +type: object +title: ledgerItemCreateData +required: + - billingCycleId + - targetDate +properties: + billingCycleId: + title: Billing Cycle Id + type: integer + format: int64 + targetDate: + title: Target Date + type: string + format: date \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCsvData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCsvData.yml new file mode 100644 index 0000000..124e405 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemCsvData.yml @@ -0,0 +1,39 @@ +type: object +title: ledgerItemCsvData +required: + - ledgerItemId + - month + - partner + - accountRevenue + - billDate + - dueDate + - lineDescription +properties: + ledgerItemId: + title: Ledger Item Id + type: integer + format: int64 + month: + title: Month + $ref: ../../core/schemas/month.yml + partner: + title: Partner + type: string + partnerName: + title: Partner Name + type: string + accountRevenue: + title: Account Revenue + type: number + format: double + billDate: + title: Bill Date + type: string + format: date + dueDate: + title: Due Date + type: string + format: date + lineDescription: + title: Line Description + type: string \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemDetail.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemDetail.yml new file mode 100644 index 0000000..154c9b7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemDetail.yml @@ -0,0 +1,45 @@ +type: object +title: ledgerItemDetail +required: + - id + - ledgerItemId + - subAccountId + - amount + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + ledgerItemId: + title: Ledger Item Id + type: integer + format: int64 + subAccountId: + title: Sub Account Id + type: integer + format: int64 + amount: + title: Amount + type: number + format: double + contractType: + title: Contract Type + type: string + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReason.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReason.yml new file mode 100644 index 0000000..9c7ddd9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReason.yml @@ -0,0 +1,5 @@ +type: string +enum: + - standard + - settlement + - oneOff diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliation.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliation.yml new file mode 100644 index 0000000..25fa91c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliation.yml @@ -0,0 +1,39 @@ +type: object +title: ledgerItemReconciliation +required: + - id + - ledgerItemId + - reconciliationType + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + ledgerItemId: + title: Ledger Item Id + type: integer + format: int64 + reconciliationType: + title: Reconciliation Type + $ref: ./reconciliationType.yml + memo: + title: Memo + type: string + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + type: string + format: uuid + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliationCreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliationCreateData.yml new file mode 100644 index 0000000..2576435 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemReconciliationCreateData.yml @@ -0,0 +1,19 @@ +type: object +title: ledgerItemReconciliationCreateData +required: + - ledgerItemIds + - reconciliationType + - memo +properties: + ledgerItemIds: + title: Ledger Item Ids + type: array + items: + type: integer + format: int64 + reconciliationType: + title: Reconciliation Type + $ref: ./reconciliationType.yml + memo: + title: Memo + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRecreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRecreateData.yml new file mode 100644 index 0000000..bb9c566 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRecreateData.yml @@ -0,0 +1,8 @@ +type: object +title: ledgerItemRecreateData +required: + - copyAdjustments +properties: + copyAdjustments: + title: Copy Adjustments + type: boolean \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatch.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatch.yml new file mode 100644 index 0000000..30e991a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatch.yml @@ -0,0 +1,27 @@ +type: object +required: + - id + - ledgerItemIds + - newLedgerItemIds + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + ledgerItemIds: + type: array + items: + type: integer + format: int64 + newLedgerItemIds: + type: array + items: + type: integer + format: int64 + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatchCreateData.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatchCreateData.yml new file mode 100644 index 0000000..fc98028 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemRegenerationBatchCreateData.yml @@ -0,0 +1,12 @@ +type: object +required: + - ledgerItemIds + - copyAdjustments +properties: + ledgerItemIds: + type: array + items: + type: integer + format: int64 + copyAdjustments: + type: boolean diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemType.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemType.yml new file mode 100644 index 0000000..bb8c1a4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/ledgerItemType.yml @@ -0,0 +1,6 @@ +title: Ledger Item Type +type: string +enum: + - payable + - receivable + - unknown \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/payableSummary.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/payableSummary.yml new file mode 100644 index 0000000..571675e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/payableSummary.yml @@ -0,0 +1,61 @@ +type: object +required: + - id + - accountId + - accountName + - startDate + - endDate + - reason + - calculatedPayout + - adjustment + - totalPayout + - dueDate + - reconciliationType + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + accountId: + type: integer + format: int64 + accountName: + type: string + startDate: + type: string + format: date + endDate: + type: string + format: date + reason: + $ref: ./ledgerItemReason.yml + calculatedPayout: + type: number + format: float + adjustment: + type: number + format: float + totalPayout: + type: number + format: float + dueDate: + type: string + format: date + reconciliationType: + $ref: ./reconciliationType.yml + reconciliationTypeUpdateAt: + type: string + format: date-time + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/receivableSummary.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/receivableSummary.yml new file mode 100644 index 0000000..707361a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/receivableSummary.yml @@ -0,0 +1,55 @@ +type: object +required: + - id + - accountId + - accountName + - startDate + - endDate + - calculatedPayout + - adjustment + - totalPayout + - dueDate + - reconciliationType + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + accountId: + type: integer + format: int64 + accountName: + type: string + startDate: + type: string + format: date + endDate: + type: string + format: date + calculatedPayout: + type: number + format: float + adjustment: + type: number + format: float + totalPayout: + type: number + format: float + dueDate: + type: string + format: date + reconciliationType: + $ref: ./reconciliationType.yml + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/reconciliationType.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/reconciliationType.yml new file mode 100644 index 0000000..852c4c9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/reconciliationType.yml @@ -0,0 +1,8 @@ +title: Reconciliation Type +type: string +enum: + - paid + - ignored + - unpaid + - overdue + - unknown \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/schemas/termUnit.yml b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/termUnit.yml new file mode 100644 index 0000000..e1102e1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/schemas/termUnit.yml @@ -0,0 +1,7 @@ +title: Term Unit +type: string +enum: + - week + - bi_monthly + - month + - unkown \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/ledger/spec.yml b/Tests/Fixtures/acme/birch-catalog/ledger/spec.yml new file mode 100644 index 0000000..01985c3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ledger/spec.yml @@ -0,0 +1,1280 @@ +openapi: 3.0.3 +info: + title: ledger + description: Capture and calculate financial informations for our partners + version: 1.0.0 + contact: + name: Finance Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/ledger' + description: Prod + - url: 'https://dev-api.example.com/ledger' + description: Dev +components: + x-lint-skip: + - inline-schema-is-scalar + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'ledger:read': Allows read access to svc-ledger resources + 'ledger:write': Allows write access to svc-ledger resources + schemas: + AccountAdjustment: + $ref: ./schemas/accountAdjustment.yml + AccountAdjustmentCreateData: + $ref: ./schemas/accountAdjustmentCreateData.yml + AdjustmentReason: + $ref: ./schemas/adjustmentReason.yml + BillingCycle: + $ref: ./schemas/billingCycle.yml + BillingCycleCreateData: + $ref: ./schemas/billingCycleCreateData.yml + BillingCycleUpdateData: + $ref: ./schemas/billingCycleUpdateData.yml + ApiError: + $ref: ../core/schemas/apiError.yml + LedgerItem: + $ref: ./schemas/ledgerItem.yml + LedgerItemCreateData: + $ref: ./schemas/ledgerItemCreateData.yml + LedgerItemRecreateData: + $ref: ./schemas/ledgerItemRecreateData.yml + LedgerItemReconciliation: + $ref: ./schemas/ledgerItemReconciliation.yml + LedgerItemReconciliationCreateData: + $ref: ./schemas/ledgerItemReconciliationCreateData.yml + Order: + $ref: ../core/schemas/order.yml + ReconciliationType: + $ref: ./schemas/reconciliationType.yml +tags: + - name: Ledger + description: >- + Ledger Items are used to capture and calculate financial informations for + our partners +paths: + /accountAdjustments: + get: + summary: Get multiple account adjustments + description: | + Returns a list of account adjustments that match the specified criteria + operationId: AccountAdjustmentController.index + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + parameters: + - name: id + in: query + description: A comma separated list of adjustment ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: accountId + in: query + description: A comma separated list of Account ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: ledgerItemIds + in: query + description: A comma separated list of Ledger Item ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: adjustmentReason + in: query + description: Reason for account adjustment based on a defined enum + style: form + explode: false + schema: + type: array + items: + $ref: ./schemas/adjustmentReason.yml + - name: q + in: query + description: Fuzzy search parameter + style: form + explode: false + schema: + type: array + items: + type: string + - name: createdAtStart + in: query + description: beginning of the createdAt range + schema: + type: string + format: date-time + - name: createdAtEnd + in: query + description: end of the createdAt range + schema: + type: string + format: date-time + - name: createdByUuids + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtStart + in: query + description: beginning of range for deletedAt + schema: + type: string + format: date-time + - name: deletedAtEnd + in: query + description: end of range for deletedAt + schema: + type: string + format: date-time + - name: deletedByUuids + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + description: 'limit the results, default 100' + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + description: 'at what offset do you want to start looking at, default 0' + required: true + schema: + type: integer + format: int64 + minimum: 0 + - name: sortBy + description: 'how do you want to sort, default created_at' + in: query + schema: + type: string + - name: order + in: query + schema: + $ref: ../core/schemas/order.yml + - name: excludeDeleted + description: 'ignored deleted items, default true' + in: query + schema: + type: boolean + responses: + '200': + description: Account Adjustment found + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/accountAdjustment.yml + '400': + description: Missing required query parameter + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLimit: + summary: The request did not include a 'limit' query parameter + value: + - message: Query parameter 'limit' must be defined + missingOffset: + summary: The request did not include an 'offset' query parameter + value: + - message: Query parameter 'offset' must be defined + post: + summary: Create an Account Adjustment + operationId: AccountAdjustmentController.create + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/accountAdjustmentCreateData.yml + responses: + '201': + description: Account adjustment recorded successfully + content: + application/json: + schema: + $ref: ./schemas/accountAdjustment.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccountId: + summary: The request body did not include 'accountId' + value: + - attribute: accountId + type: missing + message: accountId must be specified + missingAmount: + summary: The request body did not include 'amount' + value: + - attribute: amount + type: missing + message: amount must be specified + missingAdjustmentReason: + summary: The request body did not include 'adjustmentReason' + value: + - attribute: adjustmentReason + type: missing + message: adjustmentReason must be specified + '/accountAdjustments/{id}': + parameters: + - name: id + in: path + description: account adjustment id + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a single account adjustment + description: > + Soft delete the account adjustment corresponding to the specified ID in + URL path, if one exists + operationId: AccountAdjustmentController.delete + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + responses: + '204': + description: Account adjustment was deleted successfully + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + /adjustmentsReasons: + get: + summary: Return the a list of acceptable reasons for account adjustments + operationId: AdjustmentReasonController.index + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + responses: + '200': + description: List of acceptable adjustment reasons + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/adjustmentReason.yml + /billingCycles: + get: + summary: Get multiple billing cycles + description: | + Return a list of billing cycles that match the specified criteria + operationId: BillingCycleController.index + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + parameters: + - name: ids + in: query + description: A comma separated list of Ledger Item ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: accountIds + in: query + description: A comma separated list of Account ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: ledgerItemType + in: query + description: 'Ledger Item Type, either payable or receivable' + style: form + explode: false + schema: + type: array + items: + type: string + - name: effectiveAtStart + in: query + description: beginning of effectiveAt range + style: form + explode: false + schema: + type: array + items: + type: string + format: date + - name: effectiveAtEnd + in: query + description: end of effectiveAt range + schema: + type: string + format: date + - name: netD + in: query + description: The amount of time allowed between cycle end and payment due + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: createdAtStart + in: query + description: start of createdAtStart range + schema: + type: string + format: date-time + - name: createdAtEnd + in: query + description: end of createdAtStart range + schema: + type: string + format: date-time + - name: createdByUuid + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtStart + in: query + description: start of range for deletedAt + schema: + type: string + format: date-time + - name: deletedAtEnd + in: query + description: end of range for deletedAt + schema: + type: string + format: date-time + - name: deletedByUuid + in: query + description: comma separated list of uuid + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + description: 'limit the results, default 100' + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + description: default 0 + schema: + type: integer + format: int64 + minimum: 0 + - name: sortBy + in: query + schema: + type: string + - name: order + in: query + description: default asc + schema: + $ref: ../core/schemas/order.yml + - name: excludeDeleted + in: query + description: 'ignore deleted items, default true' + schema: + type: boolean + responses: + '200': + description: Found billing cycles + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/billingCycle.yml + '400': + description: Missing required query parameter + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLimit: + summary: The request did not include a 'limit' query parameter + value: + - message: Query parameter 'limit' must be specified + post: + summary: Record a billing cycle + operationId: BillingCycleController.create + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/billingCycleCreateData.yml + responses: + '201': + description: Billing cycle recorded successfully + content: + application/json: + schema: + $ref: ./schemas/billingCycle.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccountId: + summary: The request body did not include 'accountId' + value: + - attribute: accountId + type: missing + message: accountId must be specified + missingLedgerItemType: + summary: The request body did not include 'ledgerItemType' + value: + - attribute: ledgerItemType + type: missing + message: ledgerItemType must be specified + missingEffectiveAt: + summary: The request body did not include 'effectiveAt' + value: + - attribute: effectiveAt + type: missing + message: effectiveAt must be specified + missingTermUnit: + summary: The request body did not include 'termUnit' + value: + - attribute: termUnit + type: missing + message: termUnit must be specified + missingNetD: + summary: The request body did not include 'netD' + value: + - attribute: netD + type: missing + message: netD must be specified + '/billingCycles/{id}': + parameters: + - name: id + description: billing cycle id + in: path + required: true + schema: + type: integer + format: int64 + put: + summary: Update a single billing cycle + description: > + Updates the memo field of the ledger item corresponding to the specified + ID in URL path, if one exists + operationId: BillingCycleController.update + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/billingCycleUpdateData.yml + responses: + '201': + description: Billing cycle Updated + content: + application/json: + schema: + $ref: ./schemas/billingCycle.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingEndDate: + summary: The request body did not include 'endDate' + value: + - attribute: endDate + type: missing + message: endDate must be specified + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + delete: + summary: Delete a single billing cycle + description: > + Soft delete the billing cycle corresponding to the specified ID in URL + path, if one exists + operationId: BillingCycleController.delete + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + responses: + '204': + description: Billing Cycle was deleted successfully + content: + text/plain: + schema: + type: string + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + /billingCycles/generateLedgerItems: + post: + summary: Generate ledger items in a batch + description: | + Generate a list of ledger items based on a specifed date + operationId: BillingCycleController.generateForDate + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + parameters: + - name: generateForDate + in: query + description: A date you want to generate the ledger items for + style: form + explode: false + schema: + type: string + format: date + responses: + '204': + description: Request has been sent to process + '422': + description: Unprocessible entity + '503': + description: Actor unavailable for processing + /ledgerItems: + get: + summary: Get multiple ledger items + description: | + Returns a list of ledger items that match the specified criteria. + operationId: LedgerItemController.index + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + parameters: + - name: ids + in: query + description: A comma separated list of Ledger Item ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: accountIds + in: query + description: A comma separated list of Account ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: startDate + in: query + description: ledger item start date + style: form + explode: false + schema: + type: array + items: + type: string + format: date + - name: endDate + in: query + description: ledger item end date + schema: + type: string + format: date + - name: dueDate + in: query + schema: + type: string + format: date + - name: ledgerItemType + in: query + description: 'Ledger Item Type, either payable or receivable' + style: form + explode: false + schema: + type: array + items: + type: string + - name: reconciliationType + in: query + description: 'Reconciliation type, either paid or ignored' + style: form + explode: false + schema: + type: array + items: + type: string + - name: netD + in: query + description: The amount of time allowed between cycle end and payment due + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: q + in: query + description: Fuzzy search parameter + style: form + explode: false + schema: + type: array + items: + type: string + - name: createdAtStart + in: query + schema: + type: string + format: date-time + - name: createdAtEnd + in: query + schema: + type: string + format: date-time + - name: createdBy + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtStart + in: query + schema: + type: string + format: date-time + - name: deletedAtEnd + in: query + schema: + type: string + format: date-time + - name: deletedBy + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + required: true + schema: + type: integer + format: int64 + minimum: 0 + - name: sortBy + in: query + schema: + type: string + - name: order + in: query + schema: + $ref: ../core/schemas/order.yml + - name: excludeDeleted + in: query + schema: + type: boolean + responses: + '200': + description: Ledger Item(s) found + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/ledgerItem.yml + '400': + description: Missing required query parameter + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLimit: + summary: The request did not include a 'limit' query parameter + value: + - message: Query parameter 'limit' must be defined + missingOffset: + summary: The request did not include an 'offset' query parameter + value: + - message: Query parameter 'offset' must be defined + post: + summary: Record a ledger item + operationId: LedgerItemController.create + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/ledgerItemCreateData.yml + responses: + '201': + description: Ledger item recorded successfully + content: + application/json: + schema: + $ref: ./schemas/ledgerItem.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingBillingCycleId: + summary: The request body did not include 'billingCycleId' + value: + - attribute: billingCycleId + type: missing + message: billingCycleId must be specified + missingTargetDate: + summary: The request body did not include 'targetDate' + value: + - attribute: targetDate + type: missing + message: targetDate must be specified + '/ledgerItems/{id}': + parameters: + - name: id + in: path + description: id of ledger item to find + required: true + schema: + type: integer + format: int64 + get: + summary: Get a single ledger item + description: > + Returns the ledger item corresponding to the specified ID in the URL + path, if one exists. + operationId: LedgerItemController.get + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + responses: + '200': + description: Ledger Item found + content: + application/json: + schema: + $ref: ./schemas/ledgerItem.yml + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + put: + summary: Update a single ledger item + description: > + Updates the memo field of the ledger item corresponding to the specified + ID in URL path, if one exists + operationId: LedgerItemController.update + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + title: Memo + type: string + responses: + '200': + description: Ledger Item Updated + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + delete: + summary: Delete a single ledger item + description: > + Soft delete the ledger item corresponding to the specified ID in URL + path, if one exists + operationId: LedgerItemController.delete + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + responses: + '200': + description: Ledger Item was deleted successfully + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '/ledgerItems/{id}/recreate': + x-lint-skip: + - path-resource-is-plural + parameters: + - name: id + description: id of item to recreate + in: path + required: true + schema: + type: integer + format: int64 + post: + summary: Recreate a ledger item + operationId: LedgerItemController.recreate + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/ledgerItemRecreateData.yml + responses: + '201': + description: Ledger item recorded successfully + content: + application/json: + schema: + $ref: ./schemas/ledgerItem.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingCopyAdjustments: + summary: The request body did not include 'copyAdjustments' + value: + - attribute: copyAdjustments + type: missing + message: copyAdjustments must be specified + /ledgerItemReconciliations: + get: + summary: Get multiple ledger item reconiliations + description: > + Returns a list of ledger item reconciliations that match the specified + criteria. + operationId: LedgerItemReconciliationController.index + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + parameters: + - name: ids + in: query + description: A comma separated list of Ledger Item ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: ledgerItemIds + in: query + description: A comma separated list of Ledger Item ids + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: reconciliationType + in: query + description: Ledger Item reconciliation type + style: form + explode: false + schema: + $ref: ./schemas/reconciliationType.yml + - name: createdAtStart + in: query + description: beginning of range createdAt + schema: + type: string + format: date-time + - name: createdAtEnd + in: query + description: end of range createdAt + schema: + type: string + format: date-time + - name: createdBy + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtStart + in: query + description: beginning of range for deletedAt + schema: + type: string + format: date-time + - name: deletedAtEnd + in: query + description: end of range for deletedAt + schema: + type: string + format: date-time + - name: deletedBy + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + description: default 100 + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + description: default is 0 + schema: + type: integer + format: int64 + minimum: 0 + - name: sortBy + in: query + description: default is created_at + schema: + type: string + - name: order + in: query + description: default case is asc + schema: + $ref: ../core/schemas/order.yml + - name: excludeDeleted + in: query + description: default case is true + schema: + type: boolean + responses: + '200': + description: Ledger Item Reconciliations found + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/ledgerItemReconciliation.yml + '400': + description: Missing required query parameter + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLimit: + summary: The request did not include a 'limit' query parameter + value: + - message: Query parameter 'limit' must be defined + post: + summary: Record a ledger item reconciliation + operationId: LedgerItemReconciliationController.create + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/ledgerItemReconciliationCreateData.yml + responses: + '201': + description: Ledger item reconciliation recorded successfully + content: + application/json: + schema: + $ref: ./schemas/ledgerItemReconciliation.yml + '400': + description: Invalid request body JSON format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLedgerItemIds: + summary: The request body did not include 'ledgerItemIds' + value: + - attribute: ledgerItemIds + type: missing + message: ledgerItemIds must be specified + missingReconciliationType: + summary: The request body did not include 'reconciliationType' + value: + - attribute: reconciliationType + type: missing + message: reconciliationType must be specified + missingMemo: + summary: The request body did not include 'memo' + value: + - attribute: memo + type: missing + message: memo must be specified + delete: + summary: Delete multiple Ledger Item Reconciliations + description: > + Soft delete multiple ledger item reconciliations that match the ids + provided in the URL path + operationId: LedgerItemReconciliationController.delete + tags: + - Ledger + security: + - oauth: + - 'ledger:write' + parameters: + - name: ids + in: query + description: A comma separated list of Ledger Item id + required: true + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + responses: + '200': + description: Deleted Ledger Item Reconciliation(s) + content: + text/plain: + schema: + type: string + '400': + description: Missing required query parameter + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLedgerItemIds: + summary: The request did not include a 'ids' query parameter + value: + - message: Query parameter 'ids' must be defined + '404': + description: Ledger Item Reconciliation(s) not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '/ledgerItemReconciliations/{id}': + parameters: + - name: id + in: path + required: true + description: Ledger item reconciliation id + schema: + type: integer + format: int64 + get: + summary: Get a single ledger item reconciliation + description: > + Returns the ledger item reconciliation corresponding to the specified ID + in the URL path, if one exists. + operationId: LedgerItemReconciliationController.get + tags: + - Ledger + security: + - oauth: + - 'ledger:read' + responses: + '200': + description: Ledger Item Reconciliations found + content: + application/json: + schema: + $ref: ./schemas/ledgerItemReconciliation.yml + '404': + description: ID not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/lifeInsuranceLead.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/lifeInsuranceLead.yml new file mode 100644 index 0000000..3b538b9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/lifeInsuranceLead.yml @@ -0,0 +1,91 @@ +summary: A rateTable request for life insurance, containing a lead and related ratings information +value: + { + "lifeInsuranceResponses": [ + { + "questionUuid": "ecea8251-8cd6-45fe-990d-89cbdd710a63", + "values": ["Yes"] + }, + { + "questionUuid": "6f5f0396-fc2c-4ada-b43d-fb7549eb356d", + "values": ["BIPOLAR", "CANCER" ] + } + ], + "lead": { + "productTypes": [ + "life_insurance", + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "workPhone": "2125551234", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "monthsAtAddress": 5, + "driversLicenseNumber": "111222333", + "driversLicenseState": "NY", + "ipAddress": "8.8.8.8", + "activeMilitary": false, + "militaryVeteran": true, + "dateOfBirth": "1993-10-09", + "ssn": "111-22-3333" + }, + "creditInformation": { + "providedCreditRating": "excellent", + "providedNumericCreditScore": 750 + }, + "financialInformation": { + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "annualIncome": 120000, + "monthlyNetIncome": 10000, + "bankName": "Santander", + "bankRoutingNumber": "231372691", + "bankAccountType": "savings", + "monthsAtBank": 10, + "bankAccountNumber": "1234567890" + }, + "employmentInformation": { + "employerName": "Example Co", + "employerAddress": "45 W 21st St", + "employerCity": "New York", + "employerState": "NY", + "employerZip": "10010", + "jobTitle": "Software Engineer", + "monthsEmployed": 14, + "directDeposit": true, + "payDate1": "2004-10-06", + "payDate2": "2004-11-06" + }, + "educationInformation": { + "educationLevel": "masters", + "graduateDegreeType": "master_of_science", + "universityAttended": "Johns Hopkins University" + }, + "healthInformation": { + "gender": "male", + "heightInInches": 72, + "weightInPounds": 195, + "tobaccoSmoker": false, + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "hello": [ + "world", + "there" + ], + "something": [ + "else" + ] + } + } + } diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/questionList.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/questionList.yml new file mode 100644 index 0000000..b995ed7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/examples/questionList.yml @@ -0,0 +1,63 @@ +summary: A list of questions +value: + { + questions: [ + { + "uuid": "3c939507-2317-41ab-9546-7ca5fe8bea1d", + "questionType": "binary", + "leapLifeId": "LEAP_LIFE_ID_1", + "prompt": "This is a prompt", + "answerOptions": [ + { "answerValue": "Yes", "answerLabel": "Yes" }, + { "answerValue": "No", "answerLabel": "No" }, + ] + }, + { + "uuid": "2f04d037-e3ab-4b45-8f56-43511cc216ab", + "questionType": "select-multiple", + "leapLifeId": "LEAP_LIFE_ID_2", + "prompt": "This is a prompt", + "company": "leap", + "answerOptions": [ + { "answerValue": "A", "answerLabel": "A" }, + { "answerValue": "B", "answerLabel": "B" }, + { "answerValue": "C", "answerLabel": "C" }, + ], + "allowNoSelection": true, + "followupQuestions": [ + { "triggeringValue": "A", "triggeredQuestionUuid": "ece530a3-9bad-436e-8261-37d37f732f94" }, + ], + }, + { + "uuid": "ece530a3-9bad-436e-8261-37d37f732f94", + "questionType": "binary", + "leapLifeId": "LEAP_LIFE_ID_3", + "prompt": "This is a prompt", + "answerOptions": [ + { "answerValue": "Yes", "answerLabel": "Yes" }, + { "answerValue": "No", "answerLabel": "No" }, + ], + "followupQuestions": [ + { "triggeringValue": "Yes", "triggeredQuestionUuid": "a350af7c-b176-4bb2-a942-7b5efab4e06b" } + ], + }, + { + "uuid": "a350af7c-b176-4bb2-a942-7b5efab4e06b", + "prompt": "This is a prompt", + "leapLifeId": "LEAP_LIFE_ID_4", + "contextTitle": "Context Title", + "questionType": "freeform-multiple", + "company": "leap", + } + ], + groups: [ + [ + "3c939507-2317-41ab-9546-7ca5fe8bea1d", + "2f04d037-e3ab-4b45-8f56-43511cc216ab", + ], + [ + "ece530a3-9bad-436e-8261-37d37f732f94", + "a350af7c-b176-4bb2-a942-7b5efab4e06b", + ] + ] + } diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answer.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answer.yml new file mode 100644 index 0000000..ade9d4d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answer.yml @@ -0,0 +1,17 @@ +type: object +required: + - questionUuid + - values +properties: + questionUuid: + type: string + pattern: uuid + description: > + The uuid of the question that is being answered + values: + type: array + description: > + The list of values that are the response to this question + items: + type: string + pattern: '[a-zA-z_]+' diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answerOption.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answerOption.yml new file mode 100644 index 0000000..1555ae3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/answerOption.yml @@ -0,0 +1,9 @@ +type: object +required: + - answerValue + - answerLabel +properties: + answerValue: + type: string + answerLabel: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/followupQuestion.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/followupQuestion.yml new file mode 100644 index 0000000..7f81069 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/followupQuestion.yml @@ -0,0 +1,13 @@ +type: object +required: + - triggeringValue + - triggeredQuestionUuid +properties: + triggeringValue: + type: string + description: > + When the current question response matches this value, the followup question is asked. + The special value of `*` means that any response should result in this followup question + triggeredQuestionUuid: + type: string + pattern: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/lifeInsuranceLead.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/lifeInsuranceLead.yml new file mode 100644 index 0000000..c89e7fc --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/lifeInsuranceLead.yml @@ -0,0 +1,14 @@ +type: object +required: + - lead + - lifeInsuranceResponses +properties: + lead: + $ref: ../../lead/schemas/leadResponseJson.yml + lifeInsuranceResponses: + type: array + description: A list of responses + items: + $ref: ./answer.yml +example: + $ref: ../examples/lifeInsuranceLead.yml diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/question.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/question.yml new file mode 100644 index 0000000..bb9edbf --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/question.yml @@ -0,0 +1,51 @@ +type: object +required: + - uuid + - questionType + - leapLifeId + - prompt +properties: + uuid: + type: string + pattern: uuid + questionType: + $ref: ./questionType.yml + leapLifeId: + type: string + description: > + The leap life id for the question + prompt: + type: string + description: > + The text of the question + contextTitle: + type: string + description: > + The context heading, to use for the display of followup questions + answerOptions: + type: array + description: > + The possible values that the user can select + items: + $ref: ./answerOption.yml + followupQuestions: + type: array + description: > + The list of followup questions if any. + Based on the answer selection of this questions, we should ask the followup question + items: + $ref: ./followupQuestion.yml + company: + type: string + default: "leap" + description: > + The company for which this question is relevant + allowNoSelection: + type: boolean + description: > + Allow no value to be selected + Applicable to `select-many` questions + helperText: + type: string + description: > + Additional note on the question diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionGroup.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionGroup.yml new file mode 100644 index 0000000..fe86f09 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionGroup.yml @@ -0,0 +1,6 @@ +type: array +description: > + The list of question identifiers +items: + type: string + pattern: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionList.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionList.yml new file mode 100644 index 0000000..5c25e07 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionList.yml @@ -0,0 +1,19 @@ +type: object +required: + - questions + - groups +properties: + questions: + type: array + description: > + A list of questions + items: + $ref: ./question.yml + groups: + type: array + description: > + The order to display the questions and their grouping + items: + $ref: ./questionGroup.yml +example: + $ref: ../examples/questionList.yml diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionType.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionType.yml new file mode 100644 index 0000000..dcfbab5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/schemas/questionType.yml @@ -0,0 +1,14 @@ +type: string +enum: + - binary + - select-multiple + - select-one + - freeform-multiple + - freeform-one +description: > + The display and response behavior of the question + * `binary` : Select between two choices + * `select-multiple` : checkbox behavior + * `select-one` : radio button behavior + * `freeform-multiple` : Multiple freeform text responses. + * `freeform-one` : A single freeform text response. diff --git a/Tests/Fixtures/acme/birch-catalog/life-insurance/spec.yml b/Tests/Fixtures/acme/birch-catalog/life-insurance/spec.yml new file mode 100644 index 0000000..a52b731 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/life-insurance/spec.yml @@ -0,0 +1,141 @@ +openapi: 3.0.3 +info: + title: life-insurance + description: ... TODO + version: 1.2.0 + contact: + name: Life Insurance Team + url: 'https://example.com/docs/api-team' +servers: + - url: 'https://api.example.com' + description: Prod + - url: 'https://dev-api.example.com' + description: Dev +components: + x-lint-skip: + - inline-schema-is-scalar + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'svc-life-insurance:read': Allows access to read svc-life-insurance resources + 'svc-life-insurance:write': Allows access to write svc-life-insurance resources + schemas: + QuestionList: + $ref: ./schemas/questionList.yml + RateTablePublic: + $ref: ../originator/schemas/rateTablePublic.yml + LeadResponseJson: + $ref: ../lead/schemas/leadResponseJson.yml + LifeInsuranceLead: + $ref: ./schemas/lifeInsuranceLead.yml + ApiError: + $ref: ../core/schemas/apiError.yml +tags: + - name: TODO ... + description: TODO ... +paths: + /lifeInsurance/questions: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get all questions + description: Return all questions + operationId: QuestionsController.index + tags: + - Questions + responses: + '200': + description: A list of questions + content: + application/json: + schema: + $ref: ./schemas/questionList.yml + security: + - oauth: + - 'svc-life-insurance:read' + /lifeInsurance/rateTables: + post: + summary: Create a lead and generate a lifeInsurance rateTable in one operation + description: >- + A combined operation that does the following: + - `PATCH /leads/uuid` + - `POST` answers to leapLife + - `POST` /originator/rateTables` + The response `RateTable` must still be queried until there are no more + `pendingResponses` + operationId: RateTablesController.create + tags: + - Life Insurance Lead + requestBody: + description: A Lead object with lifeInsuranceAnswersInformation + required: true + content: + application/json: + schema: + $ref: ./schemas/lifeInsuranceLead.yml + responses: + '200': + description: The generated `RateTable` + content: + application/json: + schema: + $ref: ../originator/schemas/rateTablePublic.yml + examples: + rateTable: + value: + $ref: ../originator/examples/rateTablePublic.yml + '400': + description: Bad Request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + security: + - oauth: + - 'svc-life-insurance:write' + '/lifeInsurance/leads/{uuid}': + parameters: + - name: uuid + in: path + required: true + description: The UUID of the lead + schema: + type: string + format: uuid + patch: + summary: Create a lead + description: A proxy to the `PATCH /leads/uuid` endpoint. + operationId: RateTablesController.createFromLead + tags: + - Life Insurance Lead + requestBody: + description: A Lead object with lifeInsuranceAnswersInformation + required: true + content: + application/json: + schema: + $ref: ./schemas/lifeInsuranceLead.yml + responses: + '200': + description: The generated `Lead` + content: + application/json: + schema: + $ref: ../lead/schemas/leadResponseJson.yml + '400': + description: Bad Request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + security: + - oauth: + - 'svc-life-insurance:write' diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/creditCardRateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/creditCardRateTable.yml new file mode 100644 index 0000000..db182f3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/creditCardRateTable.yml @@ -0,0 +1,95 @@ +summary: A credit card rate table response +value: + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [], + "specialOffers": [], + "savingsOffers": [], + "creditCardOffers": [ + { + "uuid": "6e6a6043-afaf-4c61-971b-a035282548f0", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "credit_card", + "productSubType": "credit_card", + "url": "https://dev-offers.example.com/ref/6bb3ed5c-f1d1-4c69-af1c-d02a4e028b3c", + "details": { + "cardName": "Credit Card", + "cardImageUrl": "https://example.com/image", + "cardPurposes": [ + "travel_incentives" + ], + "ratesUrl": "https://example.com/", + "maxPurchaseApr": 15, + "minPurchaseApr": 15, + "maxPurchaseIntroApr": 0, + "minPurchaseIntroApr": 0, + "purchaseIntroAprTerm": 12, + "purchaseIntroAprTermUnit": "month", + "maxCashAdvanceApr": 15, + "minCashAdvanceApr": 15, + "maxCashAdvanceIntroApr": 0, + "minCashAdvanceIntroApr": 0, + "cashAdvanceIntroAprTerm": 12, + "cashAdvanceIntroAprTermUnit": "month", + "maxBalanceTransferApr": 15, + "minBalanceTransferApr": 15, + "maxBalanceTransferIntroApr": 0, + "minBalanceTransferIntroApr": 0, + "balanceTransferIntroAprTerm": 12, + "balanceTransferIntroAprTermUnit": "month", + "annualFee": 100, + "annualIntroFee": 0, + "annualIntroFeeTerm": 1, + "details": [ + "Credit card detail" + ], + "additionalDetails": [ + "One click away credit card detail" + ], + "cardType": "visa", + "minimumCreditLine": 5000, + "minimumPenaltyApr": 10, + "maximumPenaltyApr": 10, + "balanceTransferFee": 25, + "cashAdvanceFee": 5, + "lateFee": 25, + "foreignExchangeFee": 10, + "accountOpeningFee": 0, + "returnPaymentFee": 0, + "monthlyServiceFee": 0, + "recommendedCreditRatings": [ + "good" + ] + } + } + ], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Partner Bank 2", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/partnerBank2/partnerBank2Logo.png" + }, + "productTypes": [ + "credit_card" + ] + } + ] + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/loanRateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/loanRateTable.yml new file mode 100644 index 0000000..09da5d2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/loanRateTable.yml @@ -0,0 +1,88 @@ +summary: A loan rate table response +value: + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [ + { + "uuid": "fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "originator": "", + "originatorId": null, + "termLength": 36, + "termUnit": "month", + "maxAmount": 25000, + "minAmount": 1500, + "maxApr": 35.99, + "minApr": 25.01, + "meanApr": 30.5, + "feeRate": null, + "maxFeeRate": null, + "minFeeRate": null, + "feeFixed": null, + "maxFeeFixed": null, + "minFeeFixed": null, + "allowPrepayment": true, + "prepaymentFee": 0, + "monthlyPayment": 119.3, + "maxMonthlyPayment": 137.4, + "minMonthlyPayment": 119.3, + "meanMonthlyPayment": 128.18, + "maxTotalPayment": 4947, + "minTotalPayment": 4295, + "meanTotalPayment": 4615, + "terms": null, + "url": "https://offers.example.com/ref/fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "preQualified": false, + "preApproved": false, + "sponsored": false, + "aprType": "fixed", + "recommendationScore": 95 + } + ], + "specialOffers": [ + { + "uuid": "6a43bd3d-67ba-4cdf-9fb0-c137b869fb26", + "name": "Resolve Your Debt", + "desc": "Apply today for our customized debt resolution solutions and join thousands of other customers on the road to financial freedom.", + "url": "https://offers.example.com/ref/6cecafe3-78fb-40b5-9775-41dbb0537ca0", + "partnerName": "Freedom Debt Relief", + "partnerImageUrl": "https://aff-tag.example.com/images/freedom/debt-relief/fdr.png", + "recommendationScore": 76 + } + ], + "savingsOffers": [], + "creditCardOffers": [], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Lending Club", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/old/images/lendingclub/lendingclub_120.png" + }, + "productTypes": [ + "loan" + ] + } + ], + "pendingOriginators": [ + { + "key": "avant", + "name": "Avant", + "description": "Personal loans from $1,000 to $35,000", + "images": [ + { + "sizeKey": "150", + "url": "aff-tag.example.com/images/avant/avant_120.png" + }, + { + "sizeKey": "115", + "url": "aff-tag.example.com/images/avant/avant_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + } + ] + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTable.yml new file mode 100644 index 0000000..e131e01 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTable.yml @@ -0,0 +1,6 @@ +summary: A mock rate table object +value: + { + "name": "Example mock rate table request", + "notes": "Sample JSON for a mock rate table request object" + } \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTableStaticOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTableStaticOffer.yml new file mode 100644 index 0000000..26053b3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/mockRateTableStaticOffer.yml @@ -0,0 +1,6 @@ +summary: A mock rate table static offer object +value: + { + "mockRateTableId": 12345, + "staticOfferId": 67890 + } \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/rateTablePublic.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/rateTablePublic.yml new file mode 100644 index 0000000..ba8caa2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/rateTablePublic.yml @@ -0,0 +1,232 @@ +summary: A rate table response +value: + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [ + { + "uuid": "fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "originator": "", + "originatorId": null, + "termLength": 36, + "termUnit": "month", + "maxAmount": 25000, + "minAmount": 1500, + "maxApr": 35.99, + "minApr": 25.01, + "meanApr": 30.5, + "feeRate": null, + "maxFeeRate": null, + "minFeeRate": null, + "feeFixed": null, + "maxFeeFixed": null, + "minFeeFixed": null, + "allowPrepayment": true, + "prepaymentFee": 0, + "monthlyPayment": 119.3, + "maxMonthlyPayment": 137.4, + "minMonthlyPayment": 119.3, + "meanMonthlyPayment": 128.18, + "maxTotalPayment": 4947, + "minTotalPayment": 4295, + "meanTotalPayment": 4615, + "terms": null, + "url": "https://offers.example.com/ref/64c5ff44-983b-4b47-940d-4ce4176c1d6f/fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "preQualified": false, + "preApproved": false, + "sponsored": false, + "aprType": "fixed", + "recommendationScore": 95 + } + ], + "specialOffers": [ + { + "uuid": "6a43bd3d-67ba-4cdf-9fb0-c137b869fb26", + "name": "Resolve Your Debt", + "desc": "Apply today for our customized debt resolution solutions and join thousands of other customers on the road to financial freedom.", + "url": "https://special-offers.example.com/ref/74539c71-4558-401b-916c-ae69fc59fc29/6cecafe3-78fb-40b5-9775-41dbb0537ca0", + "partnerName": "Freedom Debt Relief", + "partnerImageUrl": "https://aff-tag.example.com/images/freedom/debt-relief/fdr.png", + "recommendationScore": 76 + } + ], + "savingsOffers": [ + { + "uuid": "60a32cee-a5aa-4358-a5fe-f8070f8f2a14", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "savings", + "productSubType": "money_market_account", + "url": "https://dev-offers.example.com/ref/1ed2f58e-af3f-409e-a1e6-f7f00f18cd88", + "consumerRating": 80, + "details": { + "name": "Ally Bank", + "description": "Open an Account Today. Ally Bank, Member FDIC.", + "details": "", + "rate": 1.14, + "annualPercentYield": 1.15, + "compoundingMethod": "annually", + "introductoryPeriodMonths": 0, + "introductoryRate": 0, + "minimumDeposit": 0, + "minimumDepositWithFees": 0, + "monthlyFee": 0, + "checkWriting": false, + "effectiveAsOf": 1501113600000 + } + } + ], + "creditCardOffers": [ + { + "uuid": "6e6a6043-afaf-4c61-971b-a035282548f0", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "credit_card", + "productSubType": "credit_card", + "url": "https://dev-offers.example.com/ref/6bb3ed5c-f1d1-4c69-af1c-d02a4e028b3c", + "details": { + "cardName": "Credit Card", + "cardImageUrl": "https://example.com/image", + "cardPurposes": [ + "travel_incentives" + ], + "ratesUrl": "https://example.com/", + "maxPurchaseApr": 15, + "minPurchaseApr": 15, + "maxPurchaseIntroApr": 0, + "minPurchaseIntroApr": 0, + "purchaseIntroAprTerm": 12, + "purchaseIntroAprTermUnit": "month", + "maxCashAdvanceApr": 15, + "minCashAdvanceApr": 15, + "maxCashAdvanceIntroApr": 0, + "minCashAdvanceIntroApr": 0, + "cashAdvanceIntroAprTerm": 12, + "cashAdvanceIntroAprTermUnit": "month", + "maxBalanceTransferApr": 15, + "minBalanceTransferApr": 15, + "maxBalanceTransferIntroApr": 0, + "minBalanceTransferIntroApr": 0, + "balanceTransferIntroAprTerm": 12, + "balanceTransferIntroAprTermUnit": "month", + "maxAnnualFee": 100, + "minAnnualFee": 50, + "annualIntroFee": 0, + "annualIntroFeeTerm": 1, + "details": [ + "Credit card detail" + ], + "additionalDetails": [ + "Possibly hidden credit card detail" + ], + "cardType": "visa", + "minimumCreditLine": 5000, + "minimumPenaltyApr": 10, + "maximumPenaltyApr": 10, + "balanceTransferFee": 25, + "cashAdvanceFee": 5, + "lateFee": 25, + "foreignExchangeFee": 10, + "accountOpeningFee": 0, + "returnPaymentFee": 0, + "monthlyServiceFee": 0, + "recommendedCreditRatings": [ + "good" + ], + "preQualified": false, + "preApproved": false, + "preSelected": true + } + } + ], + "mortgageOffers": [ + { + "uuid": "05de6bf9-f339-413a-95a4-29a6879d2c89", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "mortgage", + "productSubType": "purchase", + "url": "https://dev-offers.example.com/ref/a2d79303-7181-415c-bb19-a561ed5a1960", + "consumerRating": 1, + "disclaimer": "Offer disclaimer", + "details": { + "interestRate": 3.5, + "loanType": "five_one_adjustable", + "priceAdjustment": 0, + "monthlyPayment": 1316, + "netClosingCosts": 13678, + "apr": 3.615, + "loanTerm": 30, + "adjustmentType": "par" + } + } + ], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Lending Club", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/old/images/lendingclub/lendingclub_120.png" + }, + "productTypes": [ + "loan" + ] + } + ], + "pendingOriginators": [ + { + "key": "avant", + "name": "Avant", + "description": "Personal loans from $1,000 to $35,000", + "images": [ + { + "sizeKey": "150", + "url": "aff-tag.example.com/images/avant/avant_120.png" + }, + { + "sizeKey": "115", + "url": "aff-tag.example.com/images/avant/avant_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + } + ] + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/savingsRateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/savingsRateTable.yml new file mode 100644 index 0000000..8c0002a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/savingsRateTable.yml @@ -0,0 +1,80 @@ +summary: A savings rate table response +value: + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [], + "specialOffers": [], + "savingsOffers": [ + { + "uuid": "60a32cee-a5aa-4358-a5fe-f8070f8f2a14", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "savings", + "productSubType": "money_market_account", + "url": "https://dev-offers.example.com/ref/1ed2f58e-af3f-409e-a1e6-f7f00f18cd88", + "consumerRating": 80, + "details": { + "name": "Ally Bank", + "description": "Open an Account Today. Ally Bank, Member FDIC.", + "details": "", + "rate": 1.14, + "annualPercentYield": 1.15, + "compoundingMethod": "annually", + "introductoryPeriodMonths": 0, + "introductoryRate": 0, + "minimumDeposit": 0, + "minimumDepositWithFees": 0, + "monthlyFee": 0, + "checkWriting": false, + "effectiveAsOf": 1501113600000 + } + } + ], + "creditCardOffers": [], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Partner Bank 2", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/partnerBank2/partnerBank2Logo.png" + }, + "productTypes": [ + "savings" + ] + } + ], + "pendingOriginators": [ + { + "key": "avant", + "name": "Avant", + "description": "Personal loans from $1,000 to $35,000", + "images": [ + { + "sizeKey": "150", + "url": "aff-tag.example.com/images/avant/avant_120.png" + }, + { + "sizeKey": "115", + "url": "aff-tag.example.com/images/avant/avant_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + } + ] + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusion.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusion.yml new file mode 100644 index 0000000..bb01268 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusion.yml @@ -0,0 +1,14 @@ +summary: A supply demand inclusion object +value: + { + "demandSubAccountId": 1, + "supplySubAccountId": 2, + "createdReason": "demand_onboarding", + "createdMemo": "created during onboarding process for so and so bank", + "createdAt": "2019-05-16T14:49:02.143280Z", + "createdBy": "77e1e05f-0831-406d-b1a2-ad1fa857bbb5", + "deletedReason": "poor_performance", + "deletedMemo": "supply partner providing poor leads", + "deletedAt": "2019-05-20T14:49:02.143280Z", + "deletedBy": "77e1e05f-0831-406d-b1a2-ad1fa857bbb5", + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionCreate.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionCreate.yml new file mode 100644 index 0000000..08eb040 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionCreate.yml @@ -0,0 +1,8 @@ +summary: A supply demand inclusion creation object +value: + { + "demandSubAccountId": 1, + "supplySubAccountId": 2, + "createdReason": "demand_onboarding", + "createdMemo": "created during onboarding process for so and so bank" + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionDelete.yml b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionDelete.yml new file mode 100644 index 0000000..0bcefd9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/examples/supplyDemandInclusionDelete.yml @@ -0,0 +1,6 @@ +summary: A supply demand inclusion deletion object +value: + { + "deletedReason": "poor_performance", + "deletedMemo": "deleted due to poor performance by supply partner" + } diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/adjustmentType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/adjustmentType.yml new file mode 100644 index 0000000..c4f09f8 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/adjustmentType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - credits + - par + - points diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/annualIncomeRange.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/annualIncomeRange.yml new file mode 100644 index 0000000..7d6ec56 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/annualIncomeRange.yml @@ -0,0 +1,8 @@ +type: object +properties: + start: + type: integer + format: int32 + end: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/aprType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/aprType.yml new file mode 100644 index 0000000..ecad511 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/aprType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - variable + - regular + - fixed diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/cardType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/cardType.yml new file mode 100644 index 0000000..0da8075 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/cardType.yml @@ -0,0 +1,6 @@ +type: string +enum: + - visa + - mastercard + - american_express + - discover diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/compoundingMethod.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/compoundingMethod.yml new file mode 100644 index 0000000..49d1407 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/compoundingMethod.yml @@ -0,0 +1,10 @@ +type: string +enum: + - annually + - continuous + - daily + - monthly + - quarterly + - semiAnnually + - simple + - weekly diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardBenefit.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardBenefit.yml new file mode 100644 index 0000000..4e6e045 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardBenefit.yml @@ -0,0 +1,8 @@ +type: object +properties: + name: + type: string + description: Name associated with a credit card benefit + details: + type: string + description: Description associated with a credit card benefit diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardFee.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardFee.yml new file mode 100644 index 0000000..adcacb8 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardFee.yml @@ -0,0 +1,15 @@ +type: object +properties: + subtitle: + type: string + description: Extra information related to fees + qualifier: + type: string + description: Fee caveats and explainations + name: + type: string + description: Fee name + value: + type: number + format: float + description: Numerical fee representation diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOffer.yml new file mode 100644 index 0000000..38c5baa --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOffer.yml @@ -0,0 +1,9 @@ +type: object +description: An offer for a credit card +required: + - details +properties: + details: + $ref: ./creditCardOfferDetails.yml +allOf: + - $ref: ./offer.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferDetails.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferDetails.yml new file mode 100644 index 0000000..7d0075f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferDetails.yml @@ -0,0 +1,141 @@ +type: object +required: + - cardImageUrl + - preQualified + - preApproved +properties: + cardName: + type: string + description: Display name of the card + cardImageUrl: + type: string + format: url + cardPurposes: + type: array + items: + $ref: ../../lead/schemas/cardPurposes.yml + ratesUrl: + type: string + format: url + description: External link to card rates, terms and conditions + maxPurchaseApr: + type: number + minPurchaseApr: + type: number + purchaseAprText: + type: string + maxPurchaseIntroApr: + type: number + minPurchaseIntroApr: + type: number + purchaseIntroAprTerm: + type: integer + format: int32 + purchaseIntroAprTermUnit: + $ref: ./termUnit.yml + purchaseIntroAprText: + type: string + maxCashAdvanceApr: + type: number + minCashAdvanceApr: + type: number + cashAdvanceAprText: + type: string + maxCashAdvanceIntroApr: + type: number + minCashAdvanceIntroApr: + type: number + cashAdvanceIntroAprTerm: + type: integer + format: int32 + cashAdvanceIntroAprTermUnit: + $ref: ./termUnit.yml + cashAdvanceIntroAprText: + type: string + maxBalanceTransferApr: + type: number + minBalanceTransferApr: + type: number + balanceTransferAprText: + type: string + maxBalanceTransferIntroApr: + type: number + minBalanceTransferIntroApr: + type: number + balanceTransferIntroAprTerm: + type: integer + format: int32 + balanceTransferIntroAprTermUnit: + $ref: ./termUnit.yml + balanceTransferIntroAprText: + type: string + maxAnnualFee: + type: number + minAnnualFee: + type: number + annualIntroFee: + type: number + annualIntroFeeTerm: + type: integer + format: int32 + description: Number of _years_ the introductory anual fee is in effect + introOfferAmount: + type: number + introOfferText: + type: string + introOfferType: + $ref: ./introOfferType.yml + details: + type: array + description: List of card features which must be prominently displayed with the offer + items: + type: string + additionalDetails: + type: array + description: List of card features which must be displayed with the offer + items: + type: string + cardType: + $ref: ./cardType.yml + minimumCreditLine: + type: number + minimumPenaltyApr: + type: number + maximumPenaltyApr: + type: number + balanceTransferFee: + type: number + cashAdvanceFee: + type: number + lateFee: + type: number + foreignExchangeFee: + type: number + accountOpeningFee: + type: number + returnPaymentFee: + type: number + monthlyServiceFee: + type: number + recommendedCreditRatings: + type: array + items: + $ref: ../../lead/schemas/providedCreditRating.yml + preQualified: + type: boolean + preApproved: + type: boolean + preSelected: + type: boolean + description: Indicates that Even has determined that the user has an increased likelihood of being approved for this card. + earningProgram: + description: JSON related to a cards earning program at the card and transaction level + $ref: ../../offer-augmentation/schemas/earningProgram.yml + foreignTransactionFee: + type: number + format: float + description: Percentage represented in decimal format added to all foreign transactions + cardBenefits: + type: array + items: + $ref: ../../lead/schemas/cardBenefits.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferRecord.yml new file mode 100644 index 0000000..36487da --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOfferRecord.yml @@ -0,0 +1,147 @@ +type: object +required: + - cardImageUrl + - preQualified + - preApproved + - createdAt +properties: + cardName: + type: string + description: Display name of the card + cardImageUrl: + type: string + format: url + cardPurposes: + type: array + items: + $ref: ../../lead/schemas/cardPurposes.yml + ratesUrl: + type: string + format: url + description: External link to card rates, terms and conditions + maxPurchaseApr: + type: number + minPurchaseApr: + type: number + purchaseAprText: + type: string + maxPurchaseIntroApr: + type: number + minPurchaseIntroApr: + type: number + purchaseIntroAprTerm: + type: integer + format: int32 + purchaseIntroAprTermUnit: + $ref: ./termUnit.yml + purchaseIntroAprText: + type: string + maxCashAdvanceApr: + type: number + minCashAdvanceApr: + type: number + cashAdvanceAprText: + type: string + maxCashAdvanceIntroApr: + type: number + minCashAdvanceIntroApr: + type: number + cashAdvanceIntroAprTerm: + type: integer + format: int32 + cashAdvanceIntroAprTermUnit: + $ref: ./termUnit.yml + cashAdvanceIntroAprText: + type: string + maxBalanceTransferApr: + type: number + minBalanceTransferApr: + type: number + balanceTransferAprText: + type: string + maxBalanceTransferIntroApr: + type: number + minBalanceTransferIntroApr: + type: number + balanceTransferIntroAprTerm: + type: integer + format: int32 + balanceTransferIntroAprTermUnit: + $ref: ./termUnit.yml + balanceTransferIntroAprText: + type: string + maxAnnualFee: + type: number + minAnnualFee: + type: number + annualIntroFee: + type: number + annualIntroFeeTerm: + type: integer + format: int32 + description: Number of _years_ the introductory anual fee is in effect + introOfferAmount: + type: number + introOfferText: + type: string + introOfferType: + $ref: ./introOfferType.yml + details: + type: array + description: List of card features which must be prominently displayed with the offer + items: + type: string + additionalDetails: + type: array + description: List of card features which must be displayed with the offer + items: + type: string + cardType: + $ref: ./cardType.yml + minimumCreditLine: + type: number + minimumPenaltyApr: + type: number + maximumPenaltyApr: + type: number + balanceTransferFee: + type: number + cashAdvanceFee: + type: number + lateFee: + type: number + foreignExchangeFee: + type: number + accountOpeningFee: + type: number + returnPaymentFee: + type: number + monthlyServiceFee: + type: number + recommendedCreditRatings: + type: array + items: + $ref: ../../lead/schemas/providedCreditRating.yml + preQualified: + type: boolean + preApproved: + type: boolean + preSelected: + type: boolean + description: Indicates that Even has determined that the user has an increased likelihood of being approved for this card. + earningProgram: + description: JSON related to a cards earning program at the card and transaction level + $ref: ../../offer-augmentation/schemas/earningProgram.yml + foreignTransactionFee: + type: number + format: float + description: Percentage represented in decimal format added to all foreign transactions + cardBenefits: + type: array + items: + $ref: ../../lead/schemas/cardBenefits.yml + createdAt: + type: string + format: date-time +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOtherBonus.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOtherBonus.yml new file mode 100644 index 0000000..7c3eb26 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/creditCardOtherBonus.yml @@ -0,0 +1,11 @@ +type: object +properties: + name: + type: string + description: Name of credit card bonus + amount: + type: string + description: Quantity of the stated bonus in dollars to be recieved + bonusRequirement: + type: string + description: Additional prerequisites for recieving bonuses diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/dbOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/dbOffer.yml new file mode 100644 index 0000000..699d32c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/dbOffer.yml @@ -0,0 +1,24 @@ +type: object +description: | + An polymorphic, internal representation of an offer from any vertical. +required: + - generic + - version + - instance +properties: + generic: + $ref: ./offerRecord.yml + version: + $ref: ./offerVersionRecord.yml + deactivatedAt: + type: string + format: date-time + description: | + When the resource was deactivated. + deactivatedBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to deactivate this resource. + instance: + $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandApiFilter.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandApiFilter.yml new file mode 100644 index 0000000..bc4d5ea --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandApiFilter.yml @@ -0,0 +1,8 @@ +type: object +properties: + id: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandPartner.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandPartner.yml new file mode 100644 index 0000000..fc222f7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/demandPartner.yml @@ -0,0 +1,24 @@ +type: object +required: + - uuid + - name + - description + - disclaimer + - supportsPersonalizedOffers + - imageUrl +properties: + uuid: + type: string + format: uuid + name: + type: string + description: + type: string + disclaimer: + type: string + supportsPersonalizedOffers: + type: boolean + description: Whether the partner supports returning pre-qualified or pre-approved offers + imageUrl: + type: string + format: url diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/introOfferType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/introOfferType.yml new file mode 100644 index 0000000..10d5f1b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/introOfferType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - miles + - points + - statement_credit \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/approvalBiasedRuleCombinator.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/approvalBiasedRuleCombinator.yml new file mode 100644 index 0000000..c34a57a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/approvalBiasedRuleCombinator.yml @@ -0,0 +1,11 @@ +type: object +required: + - childRules +properties: + childRules: + type: array + description: Child rules + items: + type: string +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttribute.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttribute.yml new file mode 100644 index 0000000..2faed47 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttribute.yml @@ -0,0 +1,30 @@ +type: string +enum: + - age + - annual_income + - closed_with_balance_past_due + - collection_count + - collection_count_last_6_months + - days_on_file + - debt_to_income_ratio + - employment_status + - historical_negative_occurrences_count + - inquiry_count + - installment_past_due + - is_frozen + - loan_purpose + - mortgage_past_due + - negative_trade_count + - non_mortgage_debt_to_income_ratio + - open_past_due + - past_due_balance + - public_record_code + - requested_loan_amount + - request_to_income_ratio + - revolving_past_due + - self_reported_credit_rating + - self_reported_credit_score + - total_past_due + - trade_count + - trades_30_days_past_due + - vantage_score_3 \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeBoolean.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeBoolean.yml new file mode 100644 index 0000000..ccc6915 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeBoolean.yml @@ -0,0 +1,3 @@ +type: string +enum: + - is_frozen \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeNumeric.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeNumeric.yml new file mode 100644 index 0000000..a6035ba --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeNumeric.yml @@ -0,0 +1,25 @@ +type: string +enum: + - age + - annual_income + - closed_with_balance_past_due + - collection_count + - collection_count_last_6_months + - days_on_file + - debt_to_income_ratio + - historical_negative_occurrences_count + - inquiry_count + - installment_past_due + - mortgage_past_due + - negative_trade_count + - non_mortgage_debt_to_income_ratio + - open_past_due + - past_due_balance + - requested_loan_amount + - request_to_income_ratio + - revolving_past_due + - self_reported_credit_score + - total_past_due + - trade_count + - trades_30_days_past_due + - vantage_score_3 \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeString.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeString.yml new file mode 100644 index 0000000..86165fd --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadAttributeString.yml @@ -0,0 +1,6 @@ +type: string +enum: + - employment_status + - loan_purpose + - public_record_code + - self_reported_credit_rating \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadFilterRule.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadFilterRule.yml new file mode 100644 index 0000000..4d8d2f4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/leadFilterRule.yml @@ -0,0 +1,7 @@ +type: object +required: + - key +properties: + key: + type: string + description: LeadFilterRule Discriminator \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfBooleanMatches.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfBooleanMatches.yml new file mode 100644 index 0000000..8236611 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfBooleanMatches.yml @@ -0,0 +1,25 @@ +type: object +description: A rule to set an invalid boolean value for a lead attribute. +required: + - comparisonValue + - strictApproval + - rejectIfAttributeNotProvided + - rejectIfAttributeNull + - leadAttribute +properties: + comparisonValue: + description: The boolean to reject if matches. + type: boolean + strictApproval: + type: boolean + description: Determines if passing the rule is enough information to decide to send the lead to the demand API. + rejectIfAttributeNotProvided: + type: boolean + description: Determines if the attribute not being present on the lead constitutes a rejection. + rejectIfAttributeNull: + type: boolean + description: Determines if the attribute being present but semantically null constitutes a rejection. + leadAttribute: + $ref: './leadAttributeBoolean.yml' +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfGreaterThan.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfGreaterThan.yml new file mode 100644 index 0000000..d699f7d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfGreaterThan.yml @@ -0,0 +1,25 @@ +type: object +description: A rule to set a maximum for a lead attribute value. +required: + - comparisonValue + - strictApproval + - rejectIfAttributeNotProvided + - rejectIfAttributeNull + - leadAttribute +properties: + comparisonValue: + type: number + description: The maximum value for the lead attribute. + strictApproval: + type: boolean + description: Determines if passing the rule is enough information to decide to send the lead to the demand API. + rejectIfAttributeNotProvided: + type: boolean + description: Determines if the attribute not being present on the lead constitutes a rejection. + rejectIfAttributeNull: + type: boolean + description: Determines if the attribute being present but semantically null constitutes a rejection. + leadAttribute: + $ref: './leadAttributeNumeric.yml' +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfInSet.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfInSet.yml new file mode 100644 index 0000000..04dce54 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfInSet.yml @@ -0,0 +1,28 @@ +type: object +description: A rule to define a restricted set of string values for a lead attribute value. +required: + - rejectionSet + - strictApproval + - rejectIfAttributeNotProvided + - rejectIfAttributeNull + - leadAttribute +properties: + rejectionSet: + description: The restricted set of strings for the lead attribute. + type: array + items: + type: string + minItems: 1 + strictApproval: + type: boolean + description: Determines if passing the rule is enough information to decide to send the lead to the demand API. + rejectIfAttributeNotProvided: + type: boolean + description: Determines if the attribute not being present on the lead constitutes a rejection. + rejectIfAttributeNull: + type: boolean + description: Determines if the attribute being present but semantically null constitutes a rejection. + leadAttribute: + $ref: './leadAttributeString.yml' +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfLessThan.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfLessThan.yml new file mode 100644 index 0000000..fe29c2d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfLessThan.yml @@ -0,0 +1,25 @@ +type: object +description: A rule to set a minimum for a lead attribute value. +required: + - comparisonValue + - strictApproval + - rejectIfAttributeNotProvided + - rejectIfAttributeNull + - leadAttribute +properties: + comparisonValue: + type: number + description: The minimum value for the lead attribute. + strictApproval: + type: boolean + description: Determines if passing the rule is enough information to decide to send the lead to the demand API. + rejectIfAttributeNotProvided: + type: boolean + description: Determines if the attribute not being present on the lead constitutes a rejection. + rejectIfAttributeNull: + type: boolean + description: Determines if the attribute being present but semantically null constitutes a rejection. + leadAttribute: + $ref: './leadAttributeNumeric.yml' +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfNotInSet.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfNotInSet.yml new file mode 100644 index 0000000..1da0de3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectIfNotInSet.yml @@ -0,0 +1,28 @@ +type: object +description: A rule to define an approved set of string values for a lead attribute value. +required: + - inclusionSet + - strictApproval + - rejectIfAttributeNotProvided + - rejectIfAttributeNull + - leadAttribute +properties: + inclusionSet: + description: The approved set of strings for the lead attribute. + type: array + items: + type: string + minItems: 1 + strictApproval: + type: boolean + description: Determines if passing the rule is enough information to decide to send the lead to the demand API. + rejectIfAttributeNotProvided: + type: boolean + description: Determines if the attribute not being present on the lead constitutes a rejection. + rejectIfAttributeNull: + type: boolean + description: Determines if the attribute being present but semantically null constitutes a rejection. + leadAttribute: + $ref: './leadAttributeString.yml' +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectionBiasedRuleCombinator.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectionBiasedRuleCombinator.yml new file mode 100644 index 0000000..c34a57a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/leadFilterRules/rejectionBiasedRuleCombinator.yml @@ -0,0 +1,11 @@ +type: object +required: + - childRules +properties: + childRules: + type: array + description: Child rules + items: + type: string +allOf: + - $ref: './leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferDetails.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferDetails.yml new file mode 100644 index 0000000..bd237d7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferDetails.yml @@ -0,0 +1,36 @@ +type: object +required: + - policyAmount + - termLength + - termUnit + - monthlyPremiumAmount +properties: + policyAmount: + type: integer + format: int64 + description: Policy amount, in dollars + termLength: + type: integer + format: int64 + termUnit: + $ref: ./termUnit.yml + monthlyPremiumAmount: + type: number + description: Monthly premium amount, in dollars + annualPremiumAmount: + type: number + description: Annual premium amount, in dollars + semiAnnualPremiumAmount: + type: number + description: Semi-annual premium amount, in dollars + onlineAppAvailable: + type: boolean + description: Online application is available + noMedicalTest: + type: boolean + description: Can receive quote without medical test + packageType: + $ref: ./packageType.yml + recommended: + type: boolean + description: Policy is recommended diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferRecord.yml new file mode 100644 index 0000000..1636758 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lifeInsuranceOfferRecord.yml @@ -0,0 +1,46 @@ +type: object +required: + - policyAmount + - termLength + - termUnit + - monthlyPremiumAmount + - createdAt + - createdBy +properties: + policyAmount: + type: integer + format: int64 + description: Policy amount, in dollars + termLength: + type: integer + format: int64 + termUnit: + $ref: ./termUnit.yml + monthlyPremiumAmount: + type: number + description: Monthly premium amount, in dollars + annualPremiumAmount: + type: number + description: Annual premium amount, in dollars + semiAnnualPremiumAmount: + type: number + description: Semi-annual premium amount, in dollars + onlineAppAvailable: + type: boolean + description: Online application is available + noMedicalTest: + type: boolean + description: Can receive quote without medical test + packageType: + $ref: ./packageType.yml + recommended: + type: boolean + description: Policy is recommended + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/lineOfCreditOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lineOfCreditOfferRecord.yml new file mode 100644 index 0000000..8cea929 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/lineOfCreditOfferRecord.yml @@ -0,0 +1,79 @@ +type: object +required: + - allowPrepayment + - apr + - aprType + - details + - displayName + - maxAmount + - preApproved + - preQualified + - preSelected + - termLength + - termUnit + - createdAt + - createdBy +properties: + allowPrepayment: + type: boolean + annualIntroFee: + type: number + format: double + apr: + type: number + format: double + aprType: + $ref: ./aprType.yml + cardBenefits: + type: array + items: + type: string + cardImageUrl: + type: string + cardType: + $ref: ./cardType.yml + details: + type: array + items: + type: string + displayName: + type: string + maxAmount: + type: integer + format: int32 + minAmount: + type: integer + format: int32 + originationFee: + type: number + format: double + preApproved: + type: boolean + preQualified: + type: boolean + preSelected: + type: boolean + purchaseApr: + type: number + format: double + recommendedCreditRatings: + type: array + items: + type: string + secured: + type: boolean + supportsAutoPay: + type: boolean + termLength: + type: integer + format: int32 + termUnit: + type: string + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanAmountRange.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanAmountRange.yml new file mode 100644 index 0000000..7d6ec56 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanAmountRange.yml @@ -0,0 +1,8 @@ +type: object +properties: + start: + type: integer + format: int32 + end: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferPublic.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferPublic.yml new file mode 100644 index 0000000..8ce993a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferPublic.yml @@ -0,0 +1,98 @@ +type: object +required: + - termLength + - termUnit + - maxAmount + - allowPrepayment + - preQualified + - preApproved + - secured + - sponsored + - aprType +properties: + uuid: + type: string + format: uuid + originator: + $ref: ./originator.yml + originatorId: + type: string + termLength: + type: integer + format: int32 + termUnit: + $ref: ./termUnit.yml + maxAmount: + type: integer + format: int32 + minAmount: + type: integer + format: int32 + maxApr: + type: number + minApr: + type: number + meanApr: + type: number + feeRate: + type: number + description: The maximum percent of loan amount fee for an offer. `maxFeeRate` should be used instead + deprecated: true + maxFeeRate: + type: number + minFeeRate: + type: number + feeFixed: + type: number + description: The maximum fee, in dollars, for an offer. `maxFeeFixed` should be used instead + deprecated: true + maxFeeFixed: + type: number + minFeeFixed: + type: number + allowPrepayment: + type: boolean + prepaymentFee: + type: number + monthlyPayment: + type: number + description: The estimated maximum monthly payment, in dollars, for an offer. `maxMonthlyPayment` should be used instead + deprecated: true + maxMonthlyPayment: + type: number + minMonthlyPayment: + type: number + meanMonthlyPayment: + type: number + maxTotalPayment: + type: number + minTotalPayment: + type: number + meanTotalPayment: + type: number + terms: + type: string + url: + type: string + format: url + preQualified: + type: boolean + preApproved: + type: boolean + secured: + type: boolean + sponsored: + type: boolean + deprecated: true + recommendationScore: + type: number + payout: + type: number + conversionProbability: + type: number + productType: + $ref: ../../core/schemas/productType.yml + productSubType: + $ref: ../../lead/schemas/productSubType.yml + aprType: + $ref: ./aprType.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferRecord.yml new file mode 100644 index 0000000..2f22638 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/loanOfferRecord.yml @@ -0,0 +1,107 @@ +type: object +required: + - termLength + - termUnit + - maxAmount + - allowPrepayment + - preQualified + - preApproved + - secured + - sponsored + - aprType + - createdAt + - createdByUuid +properties: + uuid: + type: string + format: uuid + originator: + $ref: ./originator.yml + originatorId: + type: string + termLength: + type: integer + format: int32 + termUnit: + $ref: ./termUnit.yml + maxAmount: + type: integer + format: int32 + minAmount: + type: integer + format: int32 + maxApr: + type: number + minApr: + type: number + meanApr: + type: number + feeRate: + type: number + description: The maximum percent of loan amount fee for an offer. `maxFeeRate` should be used instead + deprecated: true + maxFeeRate: + type: number + minFeeRate: + type: number + feeFixed: + type: number + description: The maximum fee, in dollars, for an offer. `maxFeeFixed` should be used instead + deprecated: true + maxFeeFixed: + type: number + minFeeFixed: + type: number + allowPrepayment: + type: boolean + prepaymentFee: + type: number + monthlyPayment: + type: number + description: The estimated maximum monthly payment, in dollars, for an offer. `maxMonthlyPayment` should be used instead + deprecated: true + maxMonthlyPayment: + type: number + minMonthlyPayment: + type: number + meanMonthlyPayment: + type: number + maxTotalPayment: + type: number + minTotalPayment: + type: number + meanTotalPayment: + type: number + terms: + type: string + url: + type: string + format: url + preQualified: + type: boolean + preApproved: + type: boolean + secured: + type: boolean + sponsored: + type: boolean + recommendationScore: + type: number + payout: + type: number + conversionProbability: + type: number + productType: + $ref: ../../core/schemas/productType.yml + productSubType: + $ref: ../../lead/schemas/productSubType.yml + aprType: + $ref: ./aprType.yml + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTable.yml new file mode 100644 index 0000000..e4c776a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTable.yml @@ -0,0 +1,13 @@ +type: object +title: MockRateTables +description: A mock rate table that allows for better testing and demonstration of the Even flow +required: + - name +properties: + name: + title: Mock Rate Table Name + type: string + notes: + title: Notes + description: Additional notes about the mock rate table + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTableStaticOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTableStaticOffer.yml new file mode 100644 index 0000000..e9e3585 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mockRateTableStaticOffer.yml @@ -0,0 +1,15 @@ +type: object +title: MockRateTableStaticOffers +description: Mock rate table and static offer link +required: + - mockRateTableId + - staticOfferId +properties: + mockRateTableId: + title: Mock Rate Table ID + type: integer + format: int64 + staticOfferId: + title: Static Offer ID + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageLoanType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageLoanType.yml new file mode 100644 index 0000000..3ffb7d9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageLoanType.yml @@ -0,0 +1,7 @@ +type: string +enum: + - fifteen_year_fixed + - thirty_year_fixed + - five_one_adjustable + - seven_one_adjustable + - ten_one_adjustable diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOffer.yml new file mode 100644 index 0000000..1e34975 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOffer.yml @@ -0,0 +1,9 @@ +type: object +description: An offer for a mortgage +required: + - details +properties: + details: + $ref: ./mortgageOfferDetails.yml +allOf: + - $ref: ./offer.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferDetails.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferDetails.yml new file mode 100644 index 0000000..9c42ec8 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferDetails.yml @@ -0,0 +1,28 @@ +type: object +required: + - interestRate + - loanType + - priceAdjustment + - monthlyPayment + - netClosingCosts + - apr + - loanTerm + - adjustmentType +properties: + interestRate: + type: number + loanType: + $ref: ./mortgageLoanType.yml + priceAdjustment: + type: number + monthlyPayment: + type: number + netClosingCosts: + type: number + apr: + type: number + loanTerm: + type: integer + format: int32 + adjustmentType: + $ref: ./adjustmentType.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferRecord.yml new file mode 100644 index 0000000..c93690f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/mortgageOfferRecord.yml @@ -0,0 +1,30 @@ +type: object +required: + - interestRate + - loanType + - priceAdjustment + - monthlyPayment + - netClosingCosts + - apr + - loanTerm + - adjustmentType +properties: + interestRate: + type: number + loanType: + $ref: ./mortgageLoanType.yml + priceAdjustment: + type: number + monthlyPayment: + type: number + netClosingCosts: + type: number + apr: + type: number + loanTerm: + type: integer + format: int32 + adjustmentType: + $ref: ./adjustmentType.yml +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offer.yml new file mode 100644 index 0000000..8cb6481 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offer.yml @@ -0,0 +1,26 @@ +type: object +required: + - uuid + - partner + - productType + - productSubType + - url +properties: + uuid: + type: string + format: uuid + partner: + $ref: ./demandPartner.yml + marketplace: + $ref: ./demandPartner.yml + productType: + $ref: ../../core/schemas/productType.yml + productSubType: + $ref: ../../lead/schemas/productSubType.yml + url: + type: string + format: url + recommendationScore: + type: number + disclaimer: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivation.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivation.yml new file mode 100644 index 0000000..aec7893 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivation.yml @@ -0,0 +1,41 @@ +type: object +required: + - id + - offerId + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + description: | + A unique, internal identifier for this resource. + offerId: + type: integer + format: int64 + description: | + An identifier for the offer that is deactivated. + deactivationReason: + type: string + description: | + Reason why the offer was deactivated. + createdAt: + type: string + format: date-time + description: | + When the resource was created. + createdBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivationCreateData.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivationCreateData.yml new file mode 100644 index 0000000..4f4c923 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDeactivationCreateData.yml @@ -0,0 +1,15 @@ +type: object +required: + - offerIds +properties: + offerIds: + type: array + items: + type: integer + format: int64 + description: | + Identifiers for the offers that are deactivated. + deactivationReason: + type: string + description: | + Reason why the offers were deactivated. diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDetailsRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDetailsRecord.yml new file mode 100644 index 0000000..a3530b3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerDetailsRecord.yml @@ -0,0 +1,7 @@ +type: object +required: + - id +properties: + id: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRecord.yml new file mode 100644 index 0000000..644e537 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRecord.yml @@ -0,0 +1,38 @@ +type: object +description: | + A generic, internal offer representation +required: + - id + - uuid + - sourceSubAccountId + - apiSubAccountId + - productTypeKey + - productSubTypeKey + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + uuid: + type: string + format: uuid + sourceSubAccountId: + type: integer + format: int64 + apiSubAccountId: + type: integer + format: int64 + productTypeKey: + $ref: ../../core/schemas/productType.yml + productSubTypeKey: + $ref: ../../lead/schemas/productSubType.yml + demandPayout: + type: number + format: double + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRule.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRule.yml new file mode 100644 index 0000000..6d3327e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRule.yml @@ -0,0 +1,72 @@ +type: object +required: + - id + - rootId + - staticOfferId + - demandSubAccountId + - supplySubAccountIds + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + rootId: + type: integer + format: int64 + staticOfferId: + type: integer + format: int64 + offer: + $ref: ./dbOffer.yml + demandSubAccountId: + type: integer + format: int64 + loanAmountRange: + $ref: ./loanAmountRange.yml + loanPurposeKeys: + type: array + items: + $ref: ../../lead/schemas/purpose.yml + selfAssessedCreditScoreKeys: + type: array + items: + $ref: ../../lead/schemas/providedCreditRating.yml + annualIncomeRange: + $ref: ./annualIncomeRange.yml + supplySubAccountIds: + type: array + items: + type: integer + format: int64 + stateAbbreviations: + type: array + items: + type: string + militaryStatusKeys: + type: array + items: + type: string + memo: + type: string + reason: + $ref: ./offerRuleReason.yml + cardPurposes: + type: array + items: + $ref: ../../lead/schemas/cardPurposes.yml + minDepositAmount: + type: integer + format: int32 + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedByUuid: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleReason.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleReason.yml new file mode 100644 index 0000000..3044dd2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleReason.yml @@ -0,0 +1,8 @@ +type: string +enum: + - demand_onboarding + - supply_onboarding + - poor_performance + - demand_request + - supply_request + - other diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleRecord.yml new file mode 100644 index 0000000..52a51f3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleRecord.yml @@ -0,0 +1,72 @@ +type: object +title: OfferRuleRecord +required: + - id + - rootId + - demandSubAccountId + - supplySubAccountIds + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + rootId: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 + loanAmountRange: + type: object + $ref: ../../core/schemas/range.yml + loanPurposeKeys: + type: array + items: + type: string + selfAssessedCreditScoreKeys: + type: array + items: + type: string + annualIncomeRange: + type: object + $ref: ../../core/schemas/range.yml + supplySubAccountIds: + type: array + items: + type: number + format: int64 + stateAbbreviations: + type: array + items: + type: string + militaryStatuses: + type: array + items: + type: string + memo: + type: string + reason: + type: string + cardPurposes: + type: array + items: + type: string + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedByUuid: + type: string + format: uuid + minDepositAmount: + type: integer + format: int64 + maxDepositAmount: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleWriteData.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleWriteData.yml new file mode 100644 index 0000000..89b2006 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerRuleWriteData.yml @@ -0,0 +1,48 @@ +type: object +required: + - staticOfferId + - demandSubAccountId + - supplySubAccountIds +properties: + staticOfferId: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 + loanAmountRange: + $ref: ./loanAmountRange.yml + loanPurposeKeys: + type: array + items: + $ref: ../../lead/schemas/purpose.yml + selfAssessedCreditScoreKeys: + type: array + items: + $ref: ../../lead/schemas/providedCreditRating.yml + annualIncomeRange: + $ref: ./annualIncomeRange.yml + supplySubAccountIds: + type: array + items: + type: integer + format: int64 + stateAbbreviations: + type: array + items: + type: string + militaryStatusKeys: + type: array + items: + type: string + memo: + type: string + reason: + $ref: ./offerRuleReason.yml + cardPurposes: + type: array + items: + $ref: ../../lead/schemas/cardPurposes.yml + minDepositAmount: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerVersionRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerVersionRecord.yml new file mode 100644 index 0000000..78a1bb9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/offerVersionRecord.yml @@ -0,0 +1,51 @@ +type: object +description: | + A version of an offer +required: + - id + - offerId + - version + - url + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + offerId: + type: integer + format: int64 + version: + type: integer + format: int32 + loanOfferId: + type: integer + format: int64 + specialOfferId: + type: integer + format: int64 + savingsOfferId: + type: integer + format: int64 + mortgageOfferId: + type: integer + format: int64 + creditCardOfferId: + type: integer + format: int64 + lineOfCreditOfferId: + type: integer + format: int64 + disclaimer: + type: string + url: + type: string + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + deprecatedByVersion: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/originator.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/originator.yml new file mode 100644 index 0000000..b11f5ea --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/originator.yml @@ -0,0 +1,21 @@ +type: object +required: + - key + - name + - images +properties: + key: + type: string + name: + type: string + description: + type: string + images: + type: array + items: + $ref: ./originatorImage.yml + disclaimer: + type: string + companyUuid: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/originatorImage.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/originatorImage.yml new file mode 100644 index 0000000..48038ba --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/originatorImage.yml @@ -0,0 +1,6 @@ +type: object +properties: + sizeKey: + type: string + url: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/packageType.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/packageType.yml new file mode 100644 index 0000000..7da31fd --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/packageType.yml @@ -0,0 +1,6 @@ +type: string +description: Life insurance package types +enum: + - basic + - essential + - elite diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/payoutCeiling.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/payoutCeiling.yml new file mode 100644 index 0000000..21ac97e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/payoutCeiling.yml @@ -0,0 +1,49 @@ +type: object +required: + - id + - supplySubAccountId + - demandSubAccountId + - ceilingDollars + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + supplySubAccountId: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 + ceilingDollars: + type: string + description: | + Ceiling amount in dollars. + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. + createdBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/pendingResponse.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/pendingResponse.yml new file mode 100644 index 0000000..2e86946 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/pendingResponse.yml @@ -0,0 +1,11 @@ +type: object +required: + - partner + - productTypes +properties: + partner: + $ref: ./demandPartner.yml + productTypes: + type: array + items: + $ref: ../../core/schemas/productType.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRule.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRule.yml new file mode 100644 index 0000000..ac44998 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRule.yml @@ -0,0 +1,27 @@ +type: object +title: preSelectRule +required: + - offerId +properties: + offerId: + type: integer + format: int64 + nonPreSelectOfferId: + type: integer + format: int64 + vantageScoreCeiling: + type: integer + format: int64 + vantageScoreFloor: + type: integer + format: int64 + approvedScores: + type: array + items: + type: number + format: int64 + filters: + type: array + items: + type: object + $ref: ./preSelectRuleFilter.yml \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilter.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilter.yml new file mode 100644 index 0000000..e5dfd5e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilter.yml @@ -0,0 +1,24 @@ +type: object +required: + - filterKey + - characteristic +title: preSelectRuleFilter +properties: + filterKey: + $ref: ./preSelectRuleFilterKey.yml + high: + type: integer + format: int64 + description: Should be included in RangeFilter and HighFilter + low: + type: integer + format: int64 + description: Should be included in RangeFilter and LowFilter + exact: + type: integer + format: int64 + description: Should be included in ExactFilter + characteristic: + type: string + format: string + description: TransUnion characteristic for the filter https://github.com/EVENFinancial/third-party-data/blob/master/modules/core/src/main/scala/com/example/thirdpartydata/models/TransUnionEnrichedCharacteristic.scala diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilterKey.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilterKey.yml new file mode 100644 index 0000000..5c7deb2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleFilterKey.yml @@ -0,0 +1,7 @@ + type: string + enum: + - range + - exact + - high + - low + description: Represents the type of filter to be utlized on the PreSelectRule as knockout criteria, which is associated to the provided characteristic diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleSummary.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleSummary.yml new file mode 100644 index 0000000..4096a8d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/preSelectRuleSummary.yml @@ -0,0 +1,51 @@ +type: object +required: + - id + - offerId + - offerName + - productType + - demandSubAccountId + - demandSubAccountName + - filters + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + offerId: + type: integer + format: int64 + offerName: + type: string + productType: + $ref: ../../core/schemas/productType.yml + nonPreSelectOfferId: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 + demandSubAccountName: + type: string + vantageScoreCeiling: + type: integer + format: int32 + vantageScoreFloor: + type: integer + format: int32 + approvedScores: + type: array + items: + type: integer + format: int32 + filters: + type: array + items: + $ref: ./preSelectRuleFilter.yml + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/pricingControlSummary.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/pricingControlSummary.yml new file mode 100644 index 0000000..85e7080 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/pricingControlSummary.yml @@ -0,0 +1,60 @@ + +type: object +required: + - id + - demandSubAccountId + - demandSubAccountName + - audienceName + - description + - productType + - offerRate + - clickToFundRate + - averageOfferRank + - projectedOfferRank + - currentClickVolume + - availableClickVolume + - projectedClickVolume + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + demandSubAccountId: + type: integer + format: int64 + demandSubAccountName: + type: string + audienceName: + type: string + description: + type: string + productType: + $ref: ../../core/schemas/productType.yml + offerRate: + type: number + format: float + clickToFundRate: + type: number + format: float + averageOfferRank: + type: number + format: float + projectedOfferRank: + type: number + format: float + currentClickVolume: + type: integer + format: int32 + availableClickVolume: + type: integer + format: int32' + projectedClickVolume: + type: integer + format: int32 + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTable.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTable.yml new file mode 100644 index 0000000..7b11e08 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTable.yml @@ -0,0 +1,77 @@ +type: object +description: A `RateTable` customized to a `Lead` input, used for internal display in Admin +required: + - uuid + - leadUuid + - loanAmount + - creditCardOffers + - lifeInsuranceOffers + - lineOfCreditOffers + - loanOffers + - mortgageOffers + - savingsOffers + - specialOffers + - pendingOriginators + - pendingResponses +properties: + id: + type: number + format: int64 + uuid: + type: string + format: uuid + description: Primary UUID for a `RateTable` + leadUuid: + type: string + format: uuid + description: UUID of the associated `Lead` + loanAmount: + type: integer + format: int32 + description: "`Lead`'s provided loan amount at the time of `RateTable` creation" + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + creditCardOffers: + type: array + items: + $ref: ./creditCardOfferDetails.yml + lifeInsuranceOffers: + type: array + items: + $ref: ./lifeInsuranceOfferDetails.yml + lineOfCreditOffers: + type: array + items: + type: number + format: int32 + loanOffers: + type: array + items: + $ref: ./loanOfferRecord.yml + mortgageOffers: + type: array + items: + $ref: ./mortgageOfferDetails.yml + savingsOffers: + type: array + items: + $ref: ./savingsOfferDetails.yml + specialOffers: + type: array + items: + $ref: ./specialOfferRecord.yml + pendingOriginators: + type: array + description: List of originators which have been queried, but have not responded yet. This list only contains loan originators, and should no longer be used + deprecated: true + items: + $ref: ./originator.yml + pendingResponses: + type: array + description: List of demand partners which have been queried, but have not responded yet. It is a guarantee that no offers will be added to the rate table after this list is empty + items: + $ref: ./pendingResponse.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTablePublic.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTablePublic.yml new file mode 100644 index 0000000..8c45ab1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTablePublic.yml @@ -0,0 +1,57 @@ +type: object +description: A `RateTable` customized to a `Lead` input +required: + - uuid + - leadUuid + - loanAmount + - creditCardOffers + - loanOffers + - mortgageOffers + - savingsOffers + - specialOffers + - pendingOriginators + - pendingResponses +properties: + uuid: + type: string + format: uuid + description: Primary UUID for a `RateTable` + leadUuid: + type: string + format: uuid + description: UUID of the associated `Lead` + loanAmount: + type: integer + format: int32 + description: "`Lead`'s provided loan amount at the time of `RateTable` creation" + creditCardOffers: + type: array + items: + $ref: ./creditCardOffer.yml + loanOffers: + type: array + items: + $ref: ./loanOfferPublic.yml + mortgageOffers: + type: array + items: + $ref: ./mortgageOffer.yml + savingsOffers: + type: array + items: + $ref: ./savingsOffer.yml + specialOffers: + type: array + items: + $ref: ./specialOfferPublic.yml + pendingOriginators: + type: array + description: List of originators which have been queried, but have not responded yet. This list only contains loan originators, and should no longer be used + deprecated: true + items: + $ref: ./originator.yml + pendingResponses: + type: array + description: List of demand partners which have been queried, but have not responded yet. It is a guarantee that no offers will be added to the rate table after this list is empty + items: + $ref: ./pendingResponse.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecord.yml new file mode 100644 index 0000000..3ac8610 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecord.yml @@ -0,0 +1,27 @@ +type: object +description: > + A simple representation of a rate table, without any nested resources +required: + - id + - uuid + - leadUuid + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + uuid: + type: string + format: uuid + leadUuid: + type: string + format: uuid + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + format: uuid + readOnly: true diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecordCreateData.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecordCreateData.yml new file mode 100644 index 0000000..becd24e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/rateTableRecordCreateData.yml @@ -0,0 +1,17 @@ +type: object +required: + - leadUuid + - supplySubAccountId + - offerIds +properties: + leadUuid: + type: string + format: uuid + supplySubAccountId: + type: integer + format: int64 + offerIds: + type: array + items: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilter.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilter.yml new file mode 100644 index 0000000..ec4616e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilter.yml @@ -0,0 +1,15 @@ +type: object +required: + - demandSubAccountId + - leadFilterRules +properties: + demandSubAccountId: + type: integer + format: int64 + supplySubAccountId: + type: integer + format: int64 + leadFilterRules: + type: array + items: + $ref: './leadFilterRules/leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilterCreateData.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilterCreateData.yml new file mode 100644 index 0000000..36c901d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/ruleDemandApiFilterCreateData.yml @@ -0,0 +1,17 @@ +type: object +required: + - demandSubAccountId + - leadFilterRules +properties: + demandSubAccountId: + type: integer + format: int64 + supplySubAccountIds: + type: array + items: + type: integer + format: int64 + leadFilterRules: + type: array + items: + $ref: './leadFilterRules/leadFilterRule.yml' \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOffer.yml new file mode 100644 index 0000000..547046b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOffer.yml @@ -0,0 +1,9 @@ +type: object +description: An offer for a savings account +required: + - details +properties: + details: + $ref: ./savingsOfferDetails.yml +allOf: + - $ref: ./offer.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferDetails.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferDetails.yml new file mode 100644 index 0000000..10772cb --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferDetails.yml @@ -0,0 +1,38 @@ +type: object +required: + - annualPercentYield + - compoundingMethod + - minimumDeposit + - monthlyFee +properties: + name: + type: string + description: + type: string + details: + type: string + rate: + type: number + description: Annual interest rate + annualPercentYield: + type: number + compoundingMethod: + $ref: ./compoundingMethod.yml + introductoryPeriodMonths: + type: integer + format: int32 + introductoryRate: + type: number + minimumDeposit: + type: number + minimumDepositWithFees: + type: number + monthlyFee: + type: number + checkWriting: + type: boolean + description: Whether the account allows checks + effectiveAsOf: + type: string + format: date-time + description: When the offer was last validated, formatted as yyyy-MM-ddTHH:mm:ss.SSSZZ diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferRecord.yml new file mode 100644 index 0000000..382a359 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/savingsOfferRecord.yml @@ -0,0 +1,48 @@ +type: object +required: + - annualPercentYield + - compoundingMethod + - minimumDeposit + - monthlyFee + - createdAt + - createdByUuid +properties: + name: + type: string + description: + type: string + details: + type: string + rate: + type: number + description: Annual interest rate + annualPercentYield: + type: number + compoundingMethod: + $ref: ./compoundingMethod.yml + introductoryPeriodMonths: + type: integer + format: int32 + introductoryRate: + type: number + minimumDeposit: + type: number + minimumDepositWithFees: + type: number + monthlyFee: + type: number + checkWriting: + type: boolean + description: Whether the account allows checks + effectiveAsOf: + type: string + format: date-time + description: When the offer was last validated, formatted as yyyy-MM-ddTHH:mm:ss.SSSZZ + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferPublic.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferPublic.yml new file mode 100644 index 0000000..375bb3d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferPublic.yml @@ -0,0 +1,22 @@ +type: object +properties: + uuid: + type: string + format: uuid + name: + type: string + desc: + type: string + description: Description + url: + type: string + format: url + partnerName: + type: string + partnerImageUrl: + type: string + format: url + recommendationScore: + type: number + payout: + type: number diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferRecord.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferRecord.yml new file mode 100644 index 0000000..e5b72f4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/specialOfferRecord.yml @@ -0,0 +1,49 @@ +type: object +required: + - sortNumber + - createdAt + - createdByUuid +properties: + uuid: + type: string + format: uuid + name: + type: string + desc: + type: string + description: Description + url: + type: string + format: url + partnerName: + type: string + partnerImageUrl: + type: string + format: url + recommendationScore: + type: number + offerSourceKey: + type: string + sortNumber: + type: number + format: int64 + memo: + type: string + payout: + type: number + predictedRevenue: + type: number + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedByUuid: + type: string + format: uuid +allOf: + - $ref: ./offerDetailsRecord.yml diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/staticOffer.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/staticOffer.yml new file mode 100644 index 0000000..94d2380 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/staticOffer.yml @@ -0,0 +1,60 @@ +type: object +required: + - id + - offerId + - offerRules + - isAutoUpdating + - enableRewardValue + - createdAt + - createdByUuid +properties: + id: + type: integer + format: int64 + offerId: + type: integer + format: int64 + offerUuid: + type: string + format: uuid + name: + type: string + memo: + type: string + offerRules: + type: array + items: + $ref: ./offerRule.yml + isAutoUpdating: + type: boolean + description: Indicates if this static offer gets automatically updated via aggregator APIs + partnerProductId: + type: string + description: demand partner's unique identifier for the offer + birchUuid: + type: string + format: uuid + description: atlas's unique identifier for the offer + enableRewardValue: + type: boolean + monetizable: + type: boolean + description: Indicates this static offer is monetizable (financial institution is directly represented) + createdAt: + type: string + format: date-time + createdByUuid: + type: string + format: uuid + deletedAt: + type: string + format: date-time + deletedByUuid: + type: string + format: uuid + deactivqtedAt: + type: string + format: date-time + deactivqtedBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusion.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusion.yml new file mode 100644 index 0000000..fa36cc7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusion.yml @@ -0,0 +1,58 @@ +type: object +title: SupplyDemandInclusion +description: A whitelist that allows leed traffic to flow from specified supply partners to specified dynamic demand apis +required: + - id + - demandSubAccountId + - supplySubAccountId + - createdReason + - createdMemo + - createdAt + - createdBy +properties: + id: + title: Id + type: integer + format: int64 + demandSubAccountId: + title: Demand Sub Account Id + type: integer + format: int64 + supplySubAccountId: + title: Demand Sub Account Id + type: integer + format: int64 + createdReason: + title: Created Reason + description: enumerated field with set reasons for creation + type: string + createdMemo: + title: Created Memo + description: field to provide further details to the reason for creation + type: string + createdAt: + title: Created At + type: string + format: date-time + createdBy: + title: Created By + description: access token uuid of the creator + type: string + format: uuid + deletedReason: + title: Deleted Reason + description: enumerated field with set reasons for deletion + type: string + deletedMemo: + title: Deleted Memo + description: field to provide further details to the reason for deletion + type: string + deletedAt: + title: Deleted At + type: string + format: date-time + deletedBy: + title: Deleted By + description: access token uuid of the deletor + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionCreate.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionCreate.yml new file mode 100644 index 0000000..e94876a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionCreate.yml @@ -0,0 +1,24 @@ +type: object +title: SupplyDemandInclusionCreate +required: + - demandSubAccountId + - supplySubAccountId + - createdReason + - createdMemo +properties: + demandSubAccountId: + title: Demand Sub Account Id + type: integer + format: int64 + supplySubAccountId: + title: Supply Sub Account Id + type: integer + format: int64 + createdReason: + title: Created Reason + description: enumerated field with set reasons for creation + type: string + createdMemo: + title: Created Memo + description: field to provide further details to the reason for creation + type: string \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionDelete.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionDelete.yml new file mode 100644 index 0000000..1e9f17e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/supplyDemandInclusionDelete.yml @@ -0,0 +1,14 @@ +type: object +title: SupplyDemandInclusionDelete +required: + - deletedReason + - deletedMemo +properties: + deletedReason: + title: Deleted Reason + description: enumerated field with set reasons for deletion + type: string + deletedMemo: + title: Deleted Memo + description: field to provide further details to the reason for deletion + type: string \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/originator/schemas/termUnit.yml b/Tests/Fixtures/acme/birch-catalog/originator/schemas/termUnit.yml new file mode 100644 index 0000000..dcd053b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/schemas/termUnit.yml @@ -0,0 +1,8 @@ +type: string +description: | + Unit of measure for offer term lengths, or open for a single term. +enum: + - day + - month + - year + - open diff --git a/Tests/Fixtures/acme/birch-catalog/originator/spec.yml b/Tests/Fixtures/acme/birch-catalog/originator/spec.yml new file mode 100644 index 0000000..9dda8b1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/originator/spec.yml @@ -0,0 +1,2262 @@ +openapi: 3.0.3 +info: + title: originator + description: description + version: 1.10.0-rc.2 + contact: + name: Offers Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/originator' + description: Prod + - url: 'https://dev-api.example.com/originator' + description: Dev +components: + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'originator:rateTables:read': Allows read access to `RateTables` + 'originator:rate_table:read': 'Deprecated alias of `originator:rateTables:read`' + 'originator:rateTables:create': Allows create access to `RateTables` + 'originator:admin:read': Allows read access to all admin endpoints in originator + 'originator:admin:write': Allows write access to all admin endpoints in originator + parameters: + excludeDeleted: + $ref: ../core/parameters/excludeDeleted.yml + includeDeactivated: + $ref: ../core/parameters/includeDeactivated.yml + id: + $ref: ../core/parameters/id.yml + uuid: + $ref: ../core/parameters/uuid.yml + limit: + $ref: ../core/parameters/limit.yml + offset: + $ref: ../core/parameters/offset.yml + sortBy: + $ref: ../core/parameters/sortBy.yml + order: + $ref: ../core/parameters/order.yml + schemas: + AdjustmentType: + $ref: ./schemas/adjustmentType.yml + AnnualIncomeRange: + $ref: ./schemas/annualIncomeRange.yml + ApiError: + $ref: ../core/schemas/apiError.yml + ApprovalBiasedRuleCombinator: + $ref: ./schemas/leadFilterRules/approvalBiasedRuleCombinator.yml + AprType: + $ref: ./schemas/aprType.yml + BankAccountType: + $ref: ../lead/schemas/bankAccountType.yml + BestTimeToCall: + $ref: ../lead/schemas/bestTimeToCall.yml + BonusPersonalization: + $ref: ../offer-augmentation/schemas/bonusPersonalization.yml + CardBenefits: + $ref: ../lead/schemas/cardBenefits.yml + CardPurpose: + $ref: ../lead/schemas/cardPurposes.yml + CardType: + $ref: ./schemas/cardType.yml + CitizenshipStatus: + $ref: ../lead/schemas/citizenshipStatus.yml + CreditCardOfferRecord: + $ref: ./schemas/creditCardOfferRecord.yml + EarningBonus: + $ref: ../offer-augmentation/schemas/earningBonus.yml + EarningBonusName: + $ref: ../offer-augmentation/schemas/earningBonusName.yml + EarningBonusType: + $ref: ../offer-augmentation/schemas/earningBonusType.yml + EarningContext: + $ref: ../offer-augmentation/schemas/earningContext.yml + EarningContextType: + $ref: ../offer-augmentation/schemas/earningContextType.yml + EarningGroup: + $ref: ../offer-augmentation/schemas/earningGroup.yml + EarningItem: + $ref: ../offer-augmentation/schemas/earningItem.yml + EarningItemPersonalization: + $ref: ../offer-augmentation/schemas/earningItemPersonalization.yml + EarningItemType: + $ref: ../offer-augmentation/schemas/earningItemType.yml + EarningProgram: + $ref: ../offer-augmentation/schemas/earningProgram.yml + EarningProgramPersonalization: + $ref: ../offer-augmentation/schemas/earningProgramPersonalization.yml + IdType: + $ref: ../lead/schemas/idType.yml + CreditCardOffer: + $ref: ./schemas/creditCardOffer.yml + CreditCardOfferDetails: + $ref: ./schemas/creditCardOfferDetails.yml + CreditCardIntroOfferType: + $ref: ./schemas/introOfferType.yml + CompoundingMethod: + $ref: ./schemas/compoundingMethod.yml + DbOffer: + $ref: ./schemas/dbOffer.yml + DemandApiFilter: + $ref: ./schemas/demandApiFilter.yml + DemandPartner: + $ref: ./schemas/demandPartner.yml + EducationLevel: + $ref: ../lead/schemas/educationLevel.yml + EmploymentPayFrequency: + $ref: ../lead/schemas/employmentPayFrequency.yml + EmploymentStatus: + $ref: ../lead/schemas/employmentStatus.yml + Gender: + $ref: ../lead/schemas/gender.yml + GraduateDegreeType: + $ref: ../lead/schemas/graduateDegreeType.yml + LeadAction: + $ref: ../lead/schemas/leadActionResponse.yml + LeadActionType: + $ref: ../lead/schemas/leadActionType.yml + LeadActionRejectReason: + $ref: ../lead/schemas/rejectReason.yml + LoanAmountRange: + $ref: ./schemas/loanAmountRange.yml + LeadAttribute: + $ref: ./schemas/leadFilterRules/leadAttribute.yml + LeadAttributeBoolean: + $ref: ./schemas/leadFilterRules/leadAttributeBoolean.yml + LeadAttributeNumeric: + $ref: ./schemas/leadFilterRules/leadAttributeNumeric.yml + LeadAttributeString: + $ref: ./schemas/leadFilterRules/leadAttributeString.yml + LeadCoApplicationInformation: + $ref: ../lead/schemas/coApplicantInformation.yml + LeadCreditInformation: + $ref: ../lead/schemas/creditInformation.yml + LeadCreditCardInformation: + $ref: ../lead/schemas/creditCardInformation.yml + LeadEducationInformation: + $ref: ../lead/schemas/educationInformation.yml + LeadEmploymentInformation: + $ref: ../lead/schemas/employmentInformation.yml + LeadFilterRule: + $ref: ./schemas/leadFilterRules/leadFilterRule.yml + LeadFinancialInformation: + $ref: ../lead/schemas/financialInformation.yml + LeadHealthInformation: + $ref: ../lead/schemas/healthInformation.yml + LeadIdentificationInformation: + $ref: ../lead/schemas/identificationInformation.yml + LeadLegalInformation: + $ref: ../lead/schemas/legalInformation.yml + LeadLifeInsuranceInformation: + $ref: ../lead/schemas/lifeInsuranceInformation.yml + LeadLoanInformation: + $ref: ../lead/schemas/loanInformation.yml + LeadMortgageInformation: + $ref: ../lead/schemas/mortgageInformation.yml + LeadPersonalInformation: + $ref: ../lead/schemas/personalInformation.yml + LeadResponseJson: + $ref: ../lead/schemas/leadResponseJson.yml + LeadSavingsInformation: + $ref: ../lead/schemas/savingsInformation.yml + LeadSessionInformation: + $ref: ../lead/schemas/sessionInformation.yml + LifeInsuranceOfferRecord: + $ref: ./schemas/lifeInsuranceOfferRecord.yml + LifeInsurancePackageType: + $ref: ./schemas/packageType.yml + LineOfCreditOfferRecord: + $ref: ./schemas/lineOfCreditOfferRecord.yml + LoanOfferPublic: + $ref: ./schemas/loanOfferPublic.yml + LoanOfferRecord: + $ref: ./schemas/loanOfferRecord.yml + LoanPurpose: + $ref: ../lead/schemas/purpose.yml + Merchant: + $ref: ../offer-augmentation/schemas/merchant.yml + MerchantCategory: + $ref: ../offer-augmentation/schemas/category.yml + MockRateTable: + $ref: ./schemas/mockRateTable.yml + MockRateTableStaticOffer: + $ref: ./schemas/mockRateTableStaticOffer.yml + MortgageLoanType: + $ref: ./schemas/mortgageLoanType.yml + MortgageOccupancyType: + $ref: ../lead/schemas/occupancyType.yml + MortgageOffer: + $ref: ./schemas/mortgageOffer.yml + MortgageOfferRecord: + $ref: ./schemas/mortgageOfferRecord.yml + MortgageOfferDetails: + $ref: ./schemas/mortgageOfferDetails.yml + MortgagePropertyType: + $ref: ../lead/schemas/propertyType.yml + MortgagePropertySearchStatus: + $ref: ../lead/schemas/propertySearchStatus.yml + MortgagePropertyStatus: + $ref: ../lead/schemas/propertyStatus.yml + MortgagePurchaseStatus: + $ref: ../lead/schemas/purchaseStatus.yml + MortgageRefinanceType: + $ref: ../lead/schemas/refinanceType.yml + MortgageType: + $ref: ../lead/schemas/mortgageType.yml + LifeInsuranceOfferDetails: + $ref: ./schemas/lifeInsuranceOfferDetails.yml + Offer: + $ref: ./schemas/offer.yml + OfferDeactivation: + $ref: ./schemas/offerDeactivation.yml + OfferDeactivationCreateData: + $ref: ./schemas/offerDeactivationCreateData.yml + OfferDetailsRecord: + $ref: ./schemas/offerDetailsRecord.yml + OfferRecord: + $ref: ./schemas/offerRecord.yml + OfferRule: + $ref: ./schemas/offerRule.yml + OfferRuleReason: + $ref: ./schemas/offerRuleReason.yml + OfferRuleWriteData: + $ref: ./schemas/offerRuleWriteData.yml + OfferVersionRecord: + $ref: ./schemas/offerVersionRecord.yml + Order: + $ref: ../core/schemas/order.yml + Originator: + $ref: ./schemas/originator.yml + OriginatorImage: + $ref: ./schemas/originatorImage.yml + PendingResponse: + $ref: ./schemas/pendingResponse.yml + PersonalReferenceInformation: + $ref: ../lead/schemas/personalReferenceInformation.yml + PersonalReferenceRelationType: + $ref: ../lead/schemas/personalReferenceRelationType.yml + PreSelectRule: + $ref: ./schemas/preSelectRule.yml + PreSelectRuleFilter: + $ref: ./schemas/preSelectRuleFilter.yml + PreSelectRuleFilterKey: + $ref: ./schemas/preSelectRuleFilterKey.yml + PreSelectRuleSummary: + $ref: ./schemas/preSelectRuleSummary.yml + PricingControlSummary: + $ref: ./schemas/pricingControlSummary.yml + ProductType: + $ref: ../core/schemas/productType.yml + ProductSubType: + $ref: ../lead/schemas/productSubType.yml + ProvidedCreditRating: + $ref: ../lead/schemas/providedCreditRating.yml + RateTableRecord: + $ref: ./schemas/rateTableRecord.yml + RateTableRecordCreateData: + $ref: ./schemas/rateTableRecordCreateData.yml + RateTable: + $ref: ./schemas/rateTable.yml + RateTablePublic: + $ref: ./schemas/rateTablePublic.yml + RefinanceLoanInformation: + $ref: ../lead/schemas/refinanceLoanInformation.yml + RefinanceLoanType: + $ref: ../lead/schemas/refinanceLoanType.yml + RejectIfBooleanMatches: + $ref: ./schemas/leadFilterRules/rejectIfBooleanMatches.yml + RejectIfGreaterThan: + $ref: ./schemas/leadFilterRules/rejectIfGreaterThan.yml + RejectIfInSet: + $ref: ./schemas/leadFilterRules/rejectIfInSet.yml + RejectIfLessThan: + $ref: ./schemas/leadFilterRules/rejectIfLessThan.yml + RejectIfNotInSet: + $ref: ./schemas/leadFilterRules/rejectIfNotInSet.yml + RejectionBiasedRuleCombinator: + $ref: ./schemas/leadFilterRules/rejectionBiasedRuleCombinator.yml + RuleDemandApiFilter: + $ref: ./schemas/ruleDemandApiFilter.yml + RuleDemandApiFilterCreateData: + $ref: ./schemas/ruleDemandApiFilterCreateData.yml + SavingsOffer: + $ref: ./schemas/savingsOffer.yml + SavingsOfferRecord: + $ref: ./schemas/savingsOfferRecord.yml + SavingsOfferDetails: + $ref: ./schemas/savingsOfferDetails.yml + SpecialOfferPublic: + $ref: ./schemas/specialOfferPublic.yml + SpecialOfferRecord: + $ref: ./schemas/specialOfferRecord.yml + State: + $ref: ../core/schemas/state-lead.yml + StaticOffer: + $ref: ./schemas/staticOffer.yml + SupplyDemandInclusion: + $ref: ./schemas/supplyDemandInclusion.yml + SupplyDemandInclusionCreate: + $ref: ./schemas/supplyDemandInclusionCreate.yml + SupplyDemandInclusionDelete: + $ref: ./schemas/supplyDemandInclusionDelete.yml + TermUnit: + $ref: ./schemas/termUnit.yml + PayoutCeiling: + $ref: ./schemas/payoutCeiling.yml + responses: + InvalidRequest: + $ref: ../core/responses/invalidRequest.yml + MalformedRequest: + $ref: ../core/responses/malformedRequest.yml + UnauthorizedRequest: + $ref: ../core/responses/unauthorizedRequest.yml +tags: + - name: Demand API Filter + - name: Life Insurance + - name: Mock Rate Table + - name: Offer + - name: Offer Deactivation + - name: Offer Rule + - name: Payout Ceiling + - name: Pre-Select Rule + - name: Preview Offer + - name: Pricing Control + - name: Rate Table + description: >- + The `RateTable` object contains offers relating to one or more product + types customized for a specific `Lead`. It only contains offers for + product types set on the `Lead`. + - name: Rule Demand API Filter + - name: Static Offer + - name: Supply Demand Inclusion +paths: + '/rateTables/{uuid}': + parameters: + - name: uuid + in: path + required: true + schema: + type: string + format: uuid + get: + summary: Get a rate table + description: Return a rate table for a UUID + operationId: getRateTable + tags: + - Rate Table + security: + - oauth: + - 'originator:rateTables:read' + - 'originator:rate_table:read' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/rateTablePublic.yml + '400': + description: Malformed UUID + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + example: + - message: >- + Cannot parse parameter uuid as UUID: Invalid UUID string: + 123 + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown UUID + /preview/creditCardOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get credit card preview offers + description: Get credit card preview offers + operationId: getPreviewCreditCardOffers + tags: + - Preview Offer + security: + - oauth: + - 'originator:rateTables:read' + parameters: + - name: providedCreditRating + in: query + required: false + schema: + $ref: ../lead/schemas/providedCreditRating.yml + - name: zipCode + in: query + required: false + schema: + type: string + - name: cardPurposes + in: query + required: false + schema: + $ref: ../lead/schemas/cardPurposes.yml + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/creditCardOffer.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /preview/loanOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get loan preview offers + description: Get loan preview offers + operationId: getPreviewLoanOffers + tags: + - Preview Offer + security: + - oauth: + - 'originator:rateTables:read' + parameters: + - name: loanAmount + in: query + required: false + schema: + type: integer + format: int32 + - name: providedCreditRating + in: query + required: false + schema: + $ref: ../lead/schemas/providedCreditRating.yml + - name: loanPurpose + in: query + required: false + schema: + $ref: ../lead/schemas/purpose.yml + - name: zipCode + in: query + required: false + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/loanOfferPublic.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /preview/savingsOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get savings preview offers + description: Get savings preview offers + operationId: getPreviewSavingsOffers + tags: + - Preview Offer + security: + - oauth: + - 'originator:rateTables:read' + parameters: + - name: maxDepositAmount + in: query + required: false + schema: + type: integer + format: int64 + - name: minDepositAmount + in: query + required: false + schema: + type: integer + format: int64 + - name: zipCode + in: query + required: false + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/savingsOffer.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /admin/rateTables: + get: + summary: Get a rate table + description: get rate table + operationId: getAdminRateTable + tags: + - Rate Table + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: leadUuid + in: query + required: false + schema: + type: array + items: + type: string + format: uuid + - name: uuid + in: query + required: false + schema: + type: array + items: + type: string + format: uuid + - name: offerId + in: query + required: false + schema: + type: array + items: + type: integer + format: int64 + - name: id + in: query + required: false + schema: + type: array + items: + type: integer + format: int64 + - name: minId + in: query + required: false + schema: + type: array + items: + type: integer + format: int64 + - name: maxId + in: query + required: false + schema: + type: array + items: + type: integer + format: int64 + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + - name: offset + in: query + required: false + schema: + type: array + items: + type: integer + format: int64 + - name: sortBy + in: query + required: false + schema: + type: string + - name: order + in: query + required: false + schema: + type: string + - name: createdAtMin + in: query + required: false + schema: + type: string + format: date-time + - name: createdAtMax + in: query + required: false + schema: + type: string + format: date-time + - name: createdBy + in: query + required: false + schema: + type: array + items: + type: string + format: uuid + - name: snapshotAt + in: query + required: false + schema: + type: string + format: date-time + - name: pendingNonBlockingResponses + in: query + schema: + type: boolean + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RateTable' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + post: + summary: Create a rate table + description: Create a rate table + operationId: createRateTable + tags: + - Rate Table + security: + - oauth: + - 'originator:admin:write' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RateTableRecordCreateData' + example: + leadUuid: 5d057825-2db1-4fe8-b3f5-398ee115a517 + supplySubAccountId: 286 + offerIds: + - 299610 + - 298111 + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/RateTableRecord' + example: + id: 835193 + uuid: b87a5163-f7b2-4668-a514-d7630669b00e + leadUuid: 5d057825-2db1-4fe8-b3f5-398ee115a517 + createdAt: '2020-05-22T19:45:57Z' + createdBy: 268abb4c-539f-4da0-b464-458bf02982ae + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ApiError' + example: + - attribute: 'offerIds[1]' + type: excluded + details: + offerId: 123 + subAccountId: 456 + message: | + Offer 123 cannot be shown to supply sub-account 456 + because it is not turned on for the demand sub-account. + /admin/demandApiFilters: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get demand API filters + description: Get demand API filters + operationId: getDemandApiFilters + tags: + - Demand API Filter + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + description: A comma separated list of ids + required: false + deprecated: false + allowEmptyValue: true + style: form + explode: false + allowReserved: false + schema: + title: id + type: array + items: + type: integer + format: int64 + minimum: 1 + examples: + one-id: + value: 3 + multiple-ids: + value: '1,23,456,7' + - name: demandSubAccountId + in: query + description: A comma separated list of ids + required: false + deprecated: false + allowEmptyValue: true + style: form + explode: false + allowReserved: false + schema: + title: id schema + type: array + items: + type: integer + format: int64 + minimum: 1 + examples: + one-id: + value: 3 + multiple-ids: + value: '1,23,456,7' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/demandApiFilter.yml + examples: + non-empty-response: + summary: A list of `demandApiFilters` + description: The results filtered by the provided parameters + value: + - id: 1 + demandSubAccountId: 132 + - id: 2 + demandSubAccountId: 135 + empty-response: + summary: An empty array + description: There are no results matching the provided parameters + value: [] + '400': + $ref: '#/components/responses/InvalidRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /admin/ruleDemandApiFilters: + get: + summary: Get Rule Demand API Filters + description: Get Rule Demand API Filters based on request parameters + operationId: getRuleDemandApiFilters + tags: + - Rule Demand API Filter + security: + - oauth: + - 'originator:admin:read' + parameters: + - $ref: '#/components/parameters/id' + - name: demandSubAccountId + in: query + description: A comma seperated list of Demand Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - $ref: '#/components/parameters/excludeDeleted' + - name: supplySubAccountId + in: query + description: A comma seperated list of Supply Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: limit + in: query + description: limit results + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - $ref: '#/components/parameters/offset' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RuleDemandApiFilter' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + post: + summary: Create rule demand API filters + description: Create rule demand API filters + operationId: createRuleDemandApiFilters + tags: + - Rule Demand API Filter + security: + - oauth: + - 'originator:admin:write' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RuleDemandApiFilterCreateData' + responses: + '201': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RuleDemandApiFilter' + '422': + $ref: '#/components/responses/InvalidRequest' + /admin/supplyDemandInclusions: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get supply / demand inclusions + description: Return supply / demand inclusions based on request parameters + operationId: getSupplyDemandInclusions + tags: + - Supply Demand Inclusion + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + description: A comma separated list of Supply Demand Inclusion ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: demandSubAccountId + in: query + description: A comma separated list of Demand Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: supplySubAccountid + in: query + description: A comma separated list of Supply Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/supplyDemandInclusion.yml + '400': + $ref: '#/components/responses/InvalidRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + post: + summary: Create a supply / demand inclusion + description: Create a supply / demand inclusion + operationId: createSupplyDemandInclusion + tags: + - Supply Demand Inclusion + security: + - oauth: + - 'originator:admin:write' + requestBody: + description: A Supply Demand Inclusion object + required: true + content: + application/json: + schema: + $ref: ./schemas/supplyDemandInclusionCreate.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/supplyDemandInclusion.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + example: + - message: SubAccount for ID 123 does not exist + details: + referenceType: SubAccount + specified: 123 + '/admin/supplyDemandInclusions/{id}': + delete: + summary: Delete a supply / demand inclusion + description: Delete a supply / demand inclusion + operationId: deleteSupplyDemandInclusion + tags: + - Supply Demand Inclusion + security: + - oauth: + - 'originator:admin:write' + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int32 + requestBody: + description: A Supply Demand Inclusion Delete object + required: true + content: + application/json: + schema: + $ref: ./schemas/supplyDemandInclusionDelete.yml + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/supplyDemandInclusion.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + example: + - message: SupplyDemandInclusion for ID 2 does not exist + attribute: id + type: invalidIdReference + details: + referenceType: SupplyDemandInclusion + specified: 2 + /admin/offerRules: + post: + summary: Create an offer rule + description: Create an offer rule + operationId: createOfferRule + tags: + - Offer Rule + security: + - oauth: + - 'originator:admin:write' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OfferRuleWriteData' + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OfferRule' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get offer rules + description: Get offer rules + operationId: getOfferRules + tags: + - Offer Rule + security: + - oauth: + - 'originator:admin:read' + parameters: + - $ref: '#/components/parameters/id' + - name: rootId + in: query + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: productTypes + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ProductType' + - name: demandSubAccountId + in: query + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: loanAmountMin + in: query + schema: + type: integer + format: int32 + minimum: 0 + - name: loanAmountMax + in: query + schema: + type: integer + format: int32 + minimum: 0 + - name: loanPurposeKey + in: query + explode: false + schema: + type: array + items: + $ref: ../lead/schemas/purpose.yml + - name: selfAssessedCreditScoreKey + in: query + explode: false + schema: + type: array + items: + $ref: ../lead/schemas/providedCreditRating.yml + - name: annualIncomeMin + in: query + schema: + type: integer + format: int32 + minimum: 0 + - name: annualIncomeMax + in: query + schema: + type: integer + format: int32 + minimum: 0 + - name: supplySubAccountId + in: query + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: stateAbbreviation + in: query + explode: false + schema: + type: array + items: + type: string + - name: militaryStatusKey + in: query + explode: false + schema: + type: array + items: + type: string + - name: cardPurposes + in: query + explode: false + schema: + type: array + items: + $ref: ../lead/schemas/cardPurposes.yml + - name: offerId + in: query + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: staticOfferId + in: query + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OfferRule' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '/admin/offerRules/root/{rootId}': + x-lint-skip: + - path-resource-is-plural + parameters: + - name: rootId + description: The stable `rootId` of the offer rule. + in: path + required: true + schema: + type: integer + format: int64 + patch: + summary: Update an offer rule + description: Update an offer rule + operationId: updateOfferRule + security: + - oauth: + - 'originator:admin:write' + tags: + - Offer Rule + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OfferRuleWriteData' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OfferRule' + '400': + $ref: '#/components/responses/InvalidRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + delete: + summary: Delete an offer rule + description: Delete an offer rule + operationId: deleteOfferRule + security: + - oauth: + - 'originator:admin:write' + tags: + - Offer Rule + responses: + '204': + description: Success + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + /admin/offers: + get: + summary: Get offers + description: Get offers + operationId: getOffers + tags: + - Offer + security: + - oauth: + - 'originator:admin:read' + parameters: + - $ref: '#/components/parameters/id' + - $ref: '#/components/parameters/uuid' + - name: loanOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: mortgageOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: savingsOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: specialOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: staticOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: productType + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ProductType' + - name: leadUuid + in: query + schema: + type: array + items: + type: string + format: uuid + - name: rateTableId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: rateTableOfferId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: sourceSubAccountId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: includedForSupplySubAccountId + in: query + description: | + Limits offers to those that belong to demand sub-accounts for which + there exists an active `SupplyDemandInclusion` for any of the + specified supply sub-account IDs. + schema: + type: array + items: + type: integer + format: int64 + - name: static + in: query + schema: + type: boolean + - name: hasRule + in: query + schema: + type: boolean + - $ref: '#/components/parameters/includeDeactivated' + - name: minId + in: query + schema: + type: integer + format: int64 + - $ref: '#/components/parameters/offset' + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + - $ref: '#/components/parameters/order' + - $ref: '#/components/parameters/sortBy' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DbOffer' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /admin/staticOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get static offers + description: Get static offers + operationId: getStaticOffers + tags: + - Static Offer + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: name + in: query + style: form + explode: false + schema: + type: string + - name: offerId + in: query + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: offerRuleId + in: query + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: productType + in: query + style: form + explode: false + schema: + type: string + - name: subAccountId + in: query + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + - name: rateTableUuid + in: query + style: form + explode: false + schema: + type: string + format: uuid + - name: offset + in: query + style: form + explode: false + schema: + type: integer + format: int64 + - name: limit + in: query + style: form + explode: false + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/staticOffer.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /admin/mockRateTables: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get mock rate tables + description: Get mock rate tables + operationId: getMockRateTables + tags: + - Mock Rate Table + parameters: + - name: limit + in: query + required: true + description: The maximum number of records to return + schema: + type: integer + format: int32 + - name: offset + in: query + description: Offset for paginating through results when larger than the limit + schema: + type: integer + format: int64 + default: 0 + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/mockRateTable.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + post: + summary: Create a mock rate table + description: Create a mock rate table + operationId: createMockRateTable + tags: + - Mock Rate Table + security: + - oauth: + - 'originator:admin:write' + requestBody: + description: A mock rate table object + required: true + content: + application/json: + schema: + $ref: ./schemas/mockRateTable.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/mockRateTable.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + '/admin/mockRateTables/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a mock rate table + description: Delete a mock rate table + operationId: deleteMockRateTable + tags: + - Mock Rate Table + security: + - oauth: + - 'originator:admin:write' + responses: + '204': + description: Success + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + /admin/mockRateTableStaticOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get mock rate table static offers + description: Get mock rate table static offers + operationId: getMockRateTableStaticOffers + tags: + - Mock Rate Table + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + description: Mock rate table static offer record ID + schema: + type: integer + format: int64 + - name: mockRateTableId + in: query + description: Mock rate table ID + schema: + type: integer + format: int64 + - name: staticOfferId + in: query + description: Static offer ID + schema: + type: integer + format: int64 + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/mockRateTableStaticOffer.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + post: + summary: Create a mock rate table static offer + description: Create a mock rate table static offer + operationId: createMockRateTableStaticOffer + tags: + - Mock Rate Table + security: + - oauth: + - 'originator:admin:write' + requestBody: + description: A mock rate table and static offer pair + required: true + content: + application/json: + schema: + $ref: ./schemas/mockRateTableStaticOffer.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/mockRateTableStaticOffer.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + '/admin/mockRateTableStaticOffers/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a mock rate table static offer + description: Delete a mock rate table static offer + operationId: deleteMockRateTableStaticOffer + tags: + - Mock Rate Table + security: + - oauth: + - 'originator:admin:write' + responses: + '204': + description: Success + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + /admin/preSelectRules: + get: + summary: Get pre-select rules + description: Get pre-select rules + operationId: getPreSelectRules + tags: + - Pre-Select Rule + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + description: Preselect Rule record IDs + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + - name: uuid + in: query + description: Preselect Rule Uuids + schema: + type: integer + format: int64 + - name: offerId + in: query + description: Offer ID + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + - name: nonPreSelectOfferId + in: query + description: Non PreSelect Offer Ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + - name: limit + in: query + required: true + description: The maximum number of records to return + schema: + type: integer + format: int32 + minimum: 1 + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/preSelectRule.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + post: + summary: Create a pre-select rule + description: Create a pre-select rule + operationId: createPreSelectRule + tags: + - Pre-Select Rule + security: + - oauth: + - 'originator:admin:write' + requestBody: + description: A preselect rule object + required: true + content: + application.json: + schema: + $ref: ./schemas/preSelectRule.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/preSelectRule.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + '/admin/preSelectRules/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Delete a pre-select rule + description: Delete a pre-select rule + operationId: deletePreSelectRule + tags: + - Pre-Select Rule + security: + - oauth: + - 'originator:admin:write' + responses: + '204': + description: Success + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + example: + - message: PreSelectRule for ID 2 does not exist + attribute: id + type: invalidIdReference + details: + referenceType: PreSelectRule + specified: 2 + put: + summary: Update a pre-select rule + description: Update a pre-select rule + operationId: updatePreSelectRule + tags: + - Pre-Select Rule + security: + - oauth: + - 'originator:admin:write' + requestBody: + description: A preselect rule object + required: true + content: + application.json: + schema: + $ref: ./schemas/preSelectRule.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/preSelectRule.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + /admin/preSelectRuleSummaries: + get: + summary: Get pre-select rule summaries + description: > + Returns a list of pre-select rule summaries that match the specified + criteria. + operationId: getPreselectRuleSummaries + tags: + - Pre-Select Rule + security: + - oauth: + - 'originator:admin:read' + parameters: + - $ref: '#/components/parameters/id' + - name: offerId + in: query + description: Offer ID + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + - name: nonPreSelectOfferId + in: query + description: Non PreSelect Offer Ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 0 + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - $ref: '#/components/parameters/offset' + - name: sortBy + in: query + schema: + type: string + - $ref: '#/components/parameters/order' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PreSelectRuleSummary' + '400': + $ref: '#/components/responses/InvalidRequest' + /lifeInsurance/searches: + post: + summary: Creates rate table with single life insurance offer + description: |- + - Call leap life API proxy + - Create rate table with single life insurance offer + operationId: createLifeInsuranceSearch + tags: + - Life Insurance + security: + - oauth: + - 'originator:rateTables:create' + requestBody: + description: A leadResponseJson object + required: true + content: + application/json: + schema: + $ref: ../lead/schemas/leadResponseJson.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ../originator/schemas/rateTablePublic.yml + examples: + rateTable: + value: + $ref: ../originator/examples/rateTablePublic.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + /admin/payoutCeilings: + get: + summary: Get payout ceilings + description: Get payout ceilings + operationId: getPayoutCeilings + tags: + - Payout Ceiling + security: + - oauth: + - 'originator:admin:read' + parameters: + - name: id + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: supplySubAccountId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: demandSubAccountId + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: createdAtMin + in: query + schema: + type: string + format: date-time + - name: createdAtMax + in: query + schema: + type: string + format: date-time + - name: createdBy + in: query + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtMin + in: query + schema: + type: string + format: date-time + - name: deletedAtMax + in: query + schema: + type: string + format: date-time + - name: isDeleted + in: query + schema: + type: boolean + - name: deletedBy + in: query + schema: + type: array + items: + type: string + format: uuid + - name: offset + in: query + description: > + The number of resources to skip before the first resource in the + results. + schema: + type: integer + format: int64 + - name: limit + in: query + required: true + description: | + The maximum number of resources to include in the results. + schema: + type: integer + format: int32 + minimum: 1 + - name: sortBy + in: query + description: | + The attribute with which to sort the resources. + schema: + type: string + - name: order + in: query + description: | + The direction to use for ordering resources. + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/payoutCeiling.yml + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + post: + summary: Create a payout ceiling + description: Create a payout ceiling + operationId: createPayoutCeiling + tags: + - Payout Ceiling + security: + - oauth: + - 'originator:admin:write' + requestBody: + content: + application/json: + schema: + $ref: ./schemas/payoutCeiling.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/payoutCeiling.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + '/admin/payoutCeilings/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + put: + summary: Update a payout ceiling + description: Update a payout ceiling + operationId: updatePayoutCeiling + tags: + - Payout Ceiling + security: + - oauth: + - 'originator:admin:write' + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: ./schemas/payoutCeiling.yml + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + '422': + $ref: '#/components/responses/InvalidRequest' + delete: + summary: Delete a payout ceiling + description: Delete a payout ceiling + operationId: deletePayoutCeiling + tags: + - Payout Ceiling + security: + - oauth: + - 'originator:admin:write' + responses: + '204': + description: Success + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '404': + description: Unknown ID + /admin/offerDeactivations: + get: + summary: Get offer deactivations + description: Return offer deactivations based upon request parameters + operationId: getOfferDeactivations + security: + - oauth: + - 'originator:admin:read' + tags: + - Offer Deactivation + parameters: + - name: id + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: offerId + in: query + schema: + type: array + items: + type: integer + format: int32 + - name: createdAtMin + in: query + schema: + type: string + format: date-time + - name: createdAtMax + in: query + schema: + type: string + format: date-time + - name: createdBy + in: query + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtMin + in: query + schema: + type: string + format: date-time + - name: deletedAtMax + in: query + schema: + type: string + format: date-time + - name: isDeleted + in: query + schema: + type: boolean + - name: deletedBy + in: query + schema: + type: array + items: + type: string + format: uuid + - name: offset + in: query + description: > + The number of resources to skip before the first resource in the + results. + schema: + type: integer + format: int64 + - name: limit + in: query + required: true + description: | + The maximum number of resources to include in the results. + schema: + type: integer + format: int32 + minimum: 1 + - name: sortBy + in: query + description: | + The attribute with which to sort the resources. + schema: + type: string + - name: order + in: query + description: | + The direction to use for ordering resources. + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OfferDeactivation' + '400': + description: Invalid request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + post: + summary: Create offer deactivations + description: Create offer deactivations + operationId: createOfferDeactivation + security: + - oauth: + - 'originator:admin:write' + tags: + - Offer Deactivation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OfferDeactivationCreateData' + responses: + '202': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OfferDeactivation' + '422': + $ref: '#/components/responses/InvalidRequest' + '/admin/offerDeactivations/{id}': + delete: + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + summary: Delete a offer deactivation + description: Delete a offer deactivation + operationId: deleteOfferDeactivation + security: + - oauth: + - 'originator:admin:write' + tags: + - Offer Deactivation + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OfferDeactivation' + '404': + description: Unknown ID + /admin/pricingControlSummaries: + get: + summary: Get pricing control summaries + description: > + Returns a list of pricing control summaries summaries that match the + specified criteria. + operationId: getPricingControlSummaries + tags: + - Pricing Control + security: + - oauth: + - 'originator:admin:read' + parameters: + - $ref: '#/components/parameters/id' + - name: demandSubAccountId + in: query + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: productType + in: query + schema: + type: array + items: + $ref: '#/components/schemas/ProductType' + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - $ref: '#/components/parameters/offset' + - name: sortBy + in: query + schema: + type: string + - $ref: '#/components/parameters/order' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/PricingControlSummary' + '400': + $ref: '#/components/responses/InvalidRequest' diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeature.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeature.yml new file mode 100644 index 0000000..2a44322 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeature.yml @@ -0,0 +1,42 @@ +type: object +required: + - id + - subAccountId + - feature + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + description: | + A unique, internal identifier for this resource. + subAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Sub Account + feature: + $ref: ./partnerFeature.yml + description: | + The name of the feature + createdAt: + type: string + format: date-time + description: | + When the resource was created. + createdBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureCreateData.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureCreateData.yml new file mode 100644 index 0000000..26945b0 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureCreateData.yml @@ -0,0 +1,14 @@ +type: object +required: + - subAccountId + - feature +properties: + subAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Sub Account + feature: + $ref: ./partnerFeature.yml + description: | + The name of the feature diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureSortBy.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureSortBy.yml new file mode 100644 index 0000000..489c995 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/activePartnerFeatureSortBy.yml @@ -0,0 +1,5 @@ +type: string +enum: + - id + - subAccountId + - feature diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/availableDemandPartner.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/availableDemandPartner.yml new file mode 100644 index 0000000..f0d87ed --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/availableDemandPartner.yml @@ -0,0 +1,54 @@ +type: object +required: + - id + - supplySubAccountId + - demandSubAccountId + - demandSubAccountLogoUrl + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + supplySubAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Supply Sub Account + demandSubAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Demand Sub Account + demandSubAccountLogoUrl: + type: string + format: url + description: | + An image url pointing to the logo of the Available Demand Partner + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. + createdBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartner.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartner.yml new file mode 100644 index 0000000..edee2ab --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartner.yml @@ -0,0 +1,54 @@ +type: object +required: + - id + - supplySubAccountId + - demandSubAccountId + - demandSubAccountLogoUrl + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + supplySubAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Supply Sub Account + demandSubAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Demand Sub Account + demandSubAccountLogoUrl: + type: string + format: url + description: | + An image url pointing to the logo of the Featured Demand Partner + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. + createdBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to create this resource. + deletedAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was deleted. + deletedBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to delete this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartnersCreate.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartnersCreate.yml new file mode 100644 index 0000000..796561e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredDemandPartnersCreate.yml @@ -0,0 +1,13 @@ +type: object +required: + - supplySubAccountId + - demandSubAccountIds +properties: + supplySubAccountId: + type: integer + format: int64 + demandSubAccountIds: + type: array + items: + type: integer + format: int64 \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredFinancialInstitution.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredFinancialInstitution.yml new file mode 100644 index 0000000..70724aa --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/featuredFinancialInstitution.yml @@ -0,0 +1,24 @@ +type: object +required: + - uuid + - name + - logoUrl +properties: + uuid: + type: string + format: uuid + readOnly: true + description: | + A unique identifier for the financial institution. + name: + type: string + readOnly: true + description: | + The name of the financial institution. This value is subject to + change, so `financialInstitutionUuid` should be used for grouping. + logoUrl: + type: string + format: url + readOnly: true + description: | + The URL of an image logo for the associated financial institution. \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsuranceCarrierDetail.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsuranceCarrierDetail.yml new file mode 100644 index 0000000..df4c8d4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsuranceCarrierDetail.yml @@ -0,0 +1,29 @@ +type: object +properties: + subAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Demand Sub Account + foundedYear: + type: integer + description: | + the founded year of the demand partner + amBestRating: + type: string + description: | + AM Best rating of the demand partner + headQuarters: + type: string + description: | + the location of the headquarters of the demand partner + assets: + type: string + description: | + assets of the demand partner + policies: + type: array + description: > + The policies belonging to the demand partner + items: + $ref: ./lifeInsurancePolicyDetail.yml diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDeliveryMethod.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDeliveryMethod.yml new file mode 100644 index 0000000..f8abc12 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDeliveryMethod.yml @@ -0,0 +1,6 @@ +type: string +enum: + - paper + - electronic +description: > + Delivery method of the policy diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDetail.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDetail.yml new file mode 100644 index 0000000..4a35d94 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/lifeInsurancePolicyDetail.yml @@ -0,0 +1,25 @@ +type: object +properties: + subAccountId: + type: integer + format: int64 + description: | + The id belonging to the associated Demand Sub Account + key: + type: string + description: | + a key unique on the subAccount. A subAccount/carrier can have more than type of Policy. + convertToPermanent: + type: boolean + childRider: + type: string + acceleratedDeathBenefit: + type: boolean + waiverOfPremium: + type: string + isOnlineApplication: + type: boolean + deliveryMethod: + $ref: ./lifeInsurancePolicyDeliveryMethod.yml + examRequired: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/partnerFeature.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/partnerFeature.yml new file mode 100644 index 0000000..ab2bc40 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/schemas/partnerFeature.yml @@ -0,0 +1,3 @@ +type: string +enum: + - no_remarketing diff --git a/Tests/Fixtures/acme/birch-catalog/partner-data/spec.yml b/Tests/Fixtures/acme/birch-catalog/partner-data/spec.yml new file mode 100644 index 0000000..c33802a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-data/spec.yml @@ -0,0 +1,379 @@ +openapi: 3.0.3 +info: + title: partner-data + description: >- + For managing partner-related data such as lists of featured demand partners + for supply sub accounts, logos, etc. + version: 1.4.0-rc.0 + contact: + name: Verticals Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/partnerData' + description: Prod + - url: 'https://dev-api.example.com/partnerData' + description: Dev +tags: + - name: Available Demand Partners + description: > + Indicates a list of demand partners available to be featured on supply + channel partner pages + - name: Featured Demand Partners + description: | + The actual list of featured demand partners + - name: Life Insurance Policy Details + description: | + Policy details of demand partners + - name: Active Partner Features + description: | + List of features active on a partner +components: + securitySchemes: + internal: + type: http + scheme: bearer + schemas: + ActivePartnerFeature: + $ref: ./schemas/activePartnerFeature.yml + ActivePartnerFeatureCreateData: + $ref: ./schemas/activePartnerFeatureCreateData.yml + ActivePartnerFeatureSortBy: + $ref: ./schemas/activePartnerFeatureSortBy.yml + ApiError: + $ref: ../core/schemas/apiError.yml + AvailableDemandPartner: + $ref: ./schemas/availableDemandPartner.yml + FeaturedDemandPartner: + $ref: ./schemas/featuredDemandPartner.yml + FeaturedDemandPartnersCreate: + $ref: ./schemas/featuredDemandPartnersCreate.yml + FeaturedFinancialInstitution: + $ref: ./schemas/featuredFinancialInstitution.yml + LifeInsuranceCarrierDetail: + $ref: ./schemas/lifeInsuranceCarrierDetail.yml + LifeInsurancePolicyDetail: + $ref: ./schemas/lifeInsurancePolicyDetail.yml + LifeInsurancePolicyDeliveryMethod: + $ref: ./schemas/lifeInsurancePolicyDeliveryMethod.yml + PartnerFeature: + $ref: ./schemas/partnerFeature.yml + Order: + $ref: ../core/schemas/order.yml + responses: + InvalidRequest: + $ref: ../core/responses/invalidRequest.yml + UnknownId: + $ref: ../core/responses/unknownId.yml +security: + - internal: [] +paths: + /availableDemandPartners: + get: + summary: Retrieve a list of available demand partners + description: >- + A list of partners whose offers can be served to leads from the given + supply sub account + operationId: getAvailableDemandPartners + tags: + - Available Demand Partners + parameters: + - name: supplySubAccountId + in: query + required: true + description: A comma separated list of Supply Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + style: form + responses: + '200': + description: Available demand providers found + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/availableDemandPartner.yml + '400': + description: Invalid request provided + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + /featuredDemandPartners: + get: + summary: Get featured demand partners + operationId: getFeaturedDemandPartners + tags: + - Featured Demand Partners + parameters: + - name: supplySubAccountId + in: query + required: true + description: A comma separated list of Supply Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + style: form + responses: + '200': + description: The Featured Demand Partners matching the query parameters + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/featuredDemandPartner.yml + '400': + description: Invalid request provided + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + post: + summary: Set a supply partner's list of featured demand partners + description: > + A supply partner's featuredDemandPartners list. Overwrites the existing + list if present. The order will be preserved, with the first given id + being associated with the top 'ranked' demand partner, and so on. + operationId: setFeaturedDemandPartners + tags: + - Featured Demand Partners + requestBody: + required: true + content: + application/json: + schema: + $ref: ./schemas/featuredDemandPartnersCreate.yml + responses: + '201': + description: The featured demand partner records were created successfully + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/featuredDemandPartner.yml + '400': + description: Invalid Supply Featured Deamnd Partner Create Json + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '/featuredDemandPartners/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + description: The id matching the featuredDemandPartner record to be deleted + delete: + summary: Delete featured demand partner + operationId: deleteFeaturedDemandPartner + tags: + - Featured Demand Partners + responses: + '204': + description: The Featured Demand Partner was deleted successfully + '404': + description: No Featured Demand Partner matching the id was found + /lifeInsurancePolicyDetails: + get: + summary: Get available life insurance policy details of demand partners + operationId: getLifeInsurancePolicyDetails + tags: + - Life Insurance Policy Details + parameters: + - name: subAccountId + in: query + required: true + description: A comma separated list of Demand Sub Account ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + style: form + responses: + '200': + description: The life insurance policy details matching the query parameters + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/lifeInsuranceCarrierDetail.yml + /activePartnerFeatures: + get: + summary: Get currently active features + operationId: getActivePartnerFeatures + tags: + - Active Partner Features + parameters: + - name: id + in: query + schema: + type: integer + format: int64 + - name: uuid + in: query + schema: + type: string + format: uuid + - name: subAccountIds + in: query + schema: + type: array + items: + type: integer + format: int64 + - name: feature + in: query + schema: + $ref: '#/components/schemas/PartnerFeature' + - name: createdAtMin + in: query + schema: + type: string + format: date-time + - name: createdAtMax + in: query + schema: + type: string + format: date-time + - name: createdBy + in: query + schema: + type: string + format: uuid + - name: deletedAtMin + in: query + schema: + type: string + format: date-time + - name: deletedAtMax + in: query + schema: + type: string + format: date-time + - name: isDeleted + in: query + schema: + type: boolean + - name: offset + in: query + schema: + type: integer + format: int64 + default: 0 + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + - name: sortBy + in: query + schema: + $ref: '#/components/schemas/ActivePartnerFeatureSortBy' + - name: order + in: query + schema: + $ref: '#/components/schemas/Order' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ActivePartnerFeature' + '400': + $ref: '#/components/responses/InvalidRequest' + post: + summary: Activate a feature for a partner + operationId: activatePartnerFeature + tags: + - Active Partner Features + requestBody: + description: A Partner Feature activation + content: + application/json: + schema: + $ref: '#/components/schemas/ActivePartnerFeatureCreateData' + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ActivePartnerFeature' + '422': + $ref: '#/components/responses/InvalidRequest' + '/activePartnerFeatures/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + delete: + summary: Deactive a feature for a partner + operationId: deactivatePartnerFeature + tags: + - Active Partner Features + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ActivePartnerFeature' + '404': + $ref: '#/components/responses/UnknownId' diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/examples/partnerPageV8.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/partnerPageV8.yml new file mode 100644 index 0000000..1bc6ff2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/partnerPageV8.yml @@ -0,0 +1,38 @@ +summary: A v8 Partner Page +value: + { + "id": "2", + "version": "8", + "partner": "even", + "eventHandlers": [], + "brand": "fiona", + "app.purpose": "debt_consolidation", + "productType": "savings", + "eventScripts": [], + "partner_name": "Fiona Publisher", + "ui.maxResults": 3, + "app.loanAmount": 5000, + "theme.colorCta": "#3fea90", + "theme.colorError": "#ff7200", + "theme.colorBorder": "#e2e5e9", + "theme.partnerLogo": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iOTRweCIgaGVpZ2h0PSIyOHB4IiB2aWV3Qm94PSIwIDAgOTQgMjgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI", + "partnerDisplayName": "Fiona", + "shouldAutoRedirect": true, + "theme.colorPrimary": "#4b2372", + "theme.fontSizeBase": "16px", + "theme.colorSecondary": "#ff7200", + "theme.partnerLogoLink": "/", + "ui.maxResultsPerLender": 2, + "shouldDisplayNavigation": false, + "theme.borderRadiusLarge": "14px", + "theme.borderRadiusSmall": "4px", + "theme.fontFamilyPrimary": "BrandonGrotesque", + "app.providedCreditRating": "good", + "credentials.access_token": "0ff3f4a0-092f-4016-bf58-4da96446fada_3c72683a-bbac-446f-9eac-0f4806b86b17", + "credentials.company_uuid": "f4f363d7-086b-4fcf-86e5-58a4284e05b6", + "shouldShowSecondaryPages": false, + "theme.fontFamilySecondary": "Open Sans", + "shouldShowPartnershipHeading": false, + "theme.colorBackgroundPrimary": "#ffffff", + "theme.colorBackgroundSecondary": "#f4f4f4" +} \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV7.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV7.yml new file mode 100644 index 0000000..f9754c2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV7.yml @@ -0,0 +1,253 @@ +summary: A v7 Partner Page Template +value: + { + "version" : "7", + "fields" : [ + { + "key" : "productType", + "label" : "Product Type (one of loan, mortgage, savings, or credit_card)", + "dataType" : "string", + "required" : true + }, + { + "key" : "partner", + "label" : "Partner Key", + "dataType" : "string", + "required" : true + }, + { + "key" : "partnerDisplayName", + "label" : "Partner Display Name", + "dataType" : "string", + "required" : true + }, + { + "key" : "headerText", + "label" : "Partner Page Header Text", + "dataType" : "string", + "required" : false + }, + { + "key" : "theme.partnerLogo", + "label" : "Partner Logo", + "dataType" : "string", + "required" : true + }, + { + "key" : "theme.partnerLogoLink", + "label" : "Partner Logo Link URL", + "dataType" : "string", + "required" : true + }, + { + "key" : "step", + "label" : "Initial Step (one of preview, application, results)", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.loanAmount", + "label" : "Default Loan Amount", + "dataType" : "number", + "required" : false + }, + { + "key" : "app.providedCreditRating", + "label" : "Default Credit Rating (one of poor, fair, good, excellent)", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.zipcode", + "label" : "Fall-Back ZIP Code", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.purpose", + "label" : "Default Loan Purpose", + "dataType" : "string", + "required" : false, + "defaultValue" : "debt_consolidation" + }, + { + "key": "ui.defaultSort", + "label": "Default Sort By", + "dataType": "string", + "required": false + }, + { + "key": "ui.generic_offer_index", + "label": "Generic CTA Location", + "dataType": "number", + "required": false + }, + { + "key" : "ui.maxResults", + "label" : "Maximum Number of Results", + "dataType" : "number", + "required" : true, + "defaultValue": 3 + }, + { + "key" : "theme.colorPrimary", + "label" : "Primary Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#66a9f4" + }, + { + "key" : "theme.colorSecondary", + "label" : "Secondary Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#66a9f4" + }, + { + "key" : "theme.colorCta", + "label" : "CTA Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#36d386" + }, + { + "key" : "theme.colorError", + "label" : "Error Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#e69575" + }, + { + "key" : "theme.colorBackgroundPrimary", + "label" : "Primary Background Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#ffffff" + }, + { + "key" : "theme.colorBackgroundSecondary", + "label" : "Secondary Background Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#f8f7fc" + }, + { + "key" : "theme.colorBorder", + "label" : "Border Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#e2e5e9" + }, + { + "key" : "theme.fontFamilyPrimary", + "label" : "Primary Font Family (Open Sans unless fully Fiona Branded, then use BrandonGrotesque)", + "dataType" : "string", + "required" : true, + "defaultValue" : "Open Sans" + }, + { + "key" : "theme.fontFamilySecondary", + "label" : "Secondary Font Family (Open Sans unless fully Fiona Branded, then use BrandonText)", + "dataType" : "string", + "required" : true, + "defaultValue" : "Open Sans" + }, + { + "key" : "theme.fontSizeBase", + "label" : "Primary Font Size (postfix with 'px')", + "dataType" : "string", + "required" : true, + "defaultValue" : "16px" + }, + { + "key" : "clientTags", + "label" : "Preset Client Tags", + "dataType" : "key_values", + "required" : false, + "defaultValue": {} + }, + { + "key" : "shouldAutoRedirect", + "label" : "Auto-redirect User To Pre-approved Offer", + "dataType" : "boolean", + "required" : false, + "defaultValue" : true + }, + { + "key" : "shouldShowPartnershipHeading", + "label" : "Show 'In Partnership With' Heading", + "dataType" : "boolean", + "required" : false, + "defaultValue" : true + }, + { + "key" : "shouldDisplayNavigation", + "label" : "Show Even/Fiona Header and Branding", + "dataType" : "boolean", + "required" : false, + "defaultValue" : false + }, + { + "key" : "shouldShowSecondaryPages", + "label" : "Show Secondary Pages (Home, About, Contact, etc.)", + "dataType" : "boolean", + "required" : false, + "defaultValue" : false + }, + { + "key": "shouldAllowLoanCoApplicant", + "label": "Allow Loan Co-Applicant", + "dataType": "boolean", + "required": false, + "defaultValue": false + }, + { + "key": "pw_fiona", + "label" : "Powered By Fiona", + "dataType": "boolean", + "required": false + }, + { + "key" : "partnerDisclaimer", + "label" : "Additional Disclaimer from Partner (can include HTML)", + "dataType" : "string", + "required" : false + }, + { + "key" : "embedScripts", + "label" : "Script that Should be Included on the Page (this does not fire on any event)", + "dataType" : "string", + "required" : false + }, + { + "key" : "headScripts", + "label" : "Script URL to include in tag", + "dataType" : "string", + "required" : false + }, + { + "key" : "credentials.company_uuid", + "label" : "CLA Company UUID", + "dataType" : "string", + "required" : true + }, + { + "key" : "credentials.access_token", + "label" : "CLA Access Token", + "dataType" : "string", + "required" : true + }, + { + "key" : "credit_card_flow", + "label" : "Credit Card Flow Type (redirect, pre-select, or remarketing)", + "dataType" : "string", + "required" : false + }, + { + "key" : "featureFlags", + "label" : "MPS Feature Inclusions (one or many comma separated strings)", + "dataType" : "string", + "required" : false + } + ] +} diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV8.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV8.yml new file mode 100644 index 0000000..f14b447 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/examples/versionV8.yml @@ -0,0 +1,267 @@ +summary: A v8 Partner Page Template +value: + { + "version" : "8", + "fields" : [ + { + "key" : "productType", + "label" : "Product Type (one of loan, mortgage, savings, or credit_card)", + "dataType" : "string", + "required" : true + }, + { + "key" : "partner", + "label" : "Partner Key", + "dataType" : "string", + "required" : true + }, + { + "key" : "partnerDisplayName", + "label" : "Partner Display Name", + "dataType" : "string", + "required" : true + }, + { + "key" : "headerText", + "label" : "Partner Page Header Text", + "dataType" : "string", + "required" : false + }, + { + "key" : "theme.partnerLogo", + "label" : "Partner Logo", + "dataType" : "string", + "required" : true + }, + { + "key" : "theme.partnerLogoLink", + "label" : "Partner Logo Link URL", + "dataType" : "string", + "required" : true + }, + { + "key" : "step", + "label" : "Initial Step (one of preview, application, results)", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.loanAmount", + "label" : "Default Loan Amount", + "dataType" : "number", + "required" : false + }, + { + "key" : "app.providedCreditRating", + "label" : "Default Credit Rating (one of poor, fair, good, excellent)", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.zipcode", + "label" : "Fall-Back ZIP Code", + "dataType" : "string", + "required" : false + }, + { + "key" : "app.purpose", + "label" : "Default Loan Purpose", + "dataType" : "string", + "required" : false, + "defaultValue" : "debt_consolidation" + }, + { + "key": "ui.defaultSort", + "label": "Default Sort By", + "dataType": "string", + "required": false + }, + { + "key": "ui.generic_offer_index", + "label": "Generic CTA Location", + "dataType": "number", + "required": false + }, + { + "key" : "ui.maxResults", + "label" : "Maximum Number of Results", + "dataType" : "number", + "required" : true, + "defaultValue": 3 + }, + { + "key" : "theme.colorPrimary", + "label" : "Primary Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#4b2372" + }, + { + "key" : "theme.colorSecondary", + "label" : "Secondary Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#ff7200" + }, + { + "key" : "theme.colorCta", + "label" : "CTA Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#3fea90" + }, + { + "key" : "theme.colorError", + "label" : "Error Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#ff7200" + }, + { + "key" : "theme.colorBackgroundPrimary", + "label" : "Primary Background Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#ffffff" + }, + { + "key" : "theme.colorBackgroundSecondary", + "label" : "Secondary Background Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#f4f4f4" + }, + { + "key" : "theme.colorBorder", + "label" : "Border Color", + "dataType" : "color", + "required" : true, + "defaultValue" : "#e2e5e9" + }, + { + "key" : "theme.fontFamilyPrimary", + "label" : "Primary Font Family (Open Sans unless fully Fiona Branded, then use BrandonGrotesque)", + "dataType" : "string", + "required" : true, + "defaultValue" : "BrandonGrotesque" + }, + { + "key" : "theme.fontFamilySecondary", + "label" : "Secondary Font Family (Open Sans unless fully Fiona Branded, then use BrandonText)", + "dataType" : "string", + "required" : true, + "defaultValue" : "BrandonText" + }, + { + "key" : "theme.fontSizeBase", + "label" : "Primary Font Size (postfix with 'px')", + "dataType" : "string", + "required" : true, + "defaultValue" : "16px" + }, + { + "key" : "theme.borderRadiusSmall", + "label" : "Small Border Radius (postfix with 'px')", + "dataType" : "string", + "required" : true, + "defaultValue" : "4px" + }, + { + "key" : "theme.borderRadiusLarge", + "label" : "Large Border Radius (postfix with 'px')", + "dataType" : "string", + "required" : true, + "defaultValue" : "14px" + }, + { + "key" : "clientTags", + "label" : "Preset Client Tags", + "dataType" : "key_values", + "required" : false, + "defaultValue" : {} + }, + { + "key" : "shouldAutoRedirect", + "label" : "Auto-redirect User To Pre-approved Offer", + "dataType" : "boolean", + "required" : false, + "defaultValue" : true + }, + { + "key" : "shouldShowPartnershipHeading", + "label" : "Show 'In Partnership With' Heading", + "dataType" : "boolean", + "required" : false, + "defaultValue" : true + }, + { + "key" : "shouldDisplayNavigation", + "label" : "Show Even/Fiona Header and Branding", + "dataType" : "boolean", + "required" : false, + "defaultValue" : false + }, + { + "key" : "shouldShowSecondaryPages", + "label" : "Show Secondary Pages (Home, About, Contact, etc.)", + "dataType" : "boolean", + "required" : false, + "defaultValue" : false + }, + { + "key": "shouldAllowLoanCoApplicant", + "label": "Allow Loan Co-Applicant", + "dataType": "boolean", + "required": false, + "defaultValue": false + }, + { + "key": "pw_fiona", + "label" : "Powered By Fiona", + "dataType": "boolean", + "required": false + }, + { + "key" : "partnerDisclaimer", + "label" : "Additional Disclaimer from Partner (can include HTML)", + "dataType" : "string", + "required" : false + }, + { + "key" : "embedScripts", + "label" : "Script that Should be Included on the Page (this does not fire on any event)", + "dataType" : "string", + "required" : false + }, + { + "key" : "headScripts", + "label" : "Script URL to include in tag", + "dataType" : "string", + "required" : false + }, + { + "key" : "credentials.company_uuid", + "label" : "CLA Company UUID", + "dataType" : "string", + "required" : true + }, + { + "key" : "credentials.access_token", + "label" : "CLA Access Token", + "dataType" : "string", + "required" : true + }, + { + "key" : "credit_card_flow", + "label" : "Credit Card Flow Type (redirect, pre-select, or remarketing)", + "dataType" : "string", + "required" : false + }, + { + "key" : "featureFlags", + "label" : "MPS Feature Inclusions (one or many comma separated strings)", + "dataType" : "string", + "required" : false + } + ] +} diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/partnerKey.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/partnerKey.yml new file mode 100644 index 0000000..c19fe7e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/partnerKey.yml @@ -0,0 +1,7 @@ +name: partnerKey +in: path +schema: + type: string +example: beaconTest +description: The partner key associated with a partner +required: true diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/uuid.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/uuid.yml new file mode 100644 index 0000000..5e04117 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/parameters/uuid.yml @@ -0,0 +1,7 @@ +name: uuid +in: path +required: true +schema: + type: string +description: The universally unique identifier of the resource. +example: 00000000-0000-0000-0000-000000000000 diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/responses/400.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/400.yml new file mode 100644 index 0000000..ec244d1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/400.yml @@ -0,0 +1,8 @@ +description: Bad Request +content: + application/json: + schema: + $ref: ./../schemas/error.yml + example: + message: Bad request. + type: BadRequestException diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/responses/401.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/401.yml new file mode 100644 index 0000000..349044c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/401.yml @@ -0,0 +1,8 @@ +description: Not Authenticated +content: + application/json: + schema: + $ref: ./../schemas/error.yml + example: + message: Authentication is required to access this resource. + type: AuthenticationException diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/responses/404.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/404.yml new file mode 100644 index 0000000..8c85529 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/404.yml @@ -0,0 +1,8 @@ +description: Resource Not Found +content: + application/json: + schema: + $ref: ./../schemas/error.yml + example: + type: NotFoundException + message: Requested resource not found. diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/responses/500.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/500.yml new file mode 100644 index 0000000..eb75292 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/responses/500.yml @@ -0,0 +1,8 @@ +description: Unknown Error +content: + application/json: + schema: + $ref: ./../schemas/error.yml + example: + message: Database "partnerpage_dev" does not exist. + type: UnknownError diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/aloomaMap.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/aloomaMap.yml new file mode 100644 index 0000000..8863e8e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/aloomaMap.yml @@ -0,0 +1,13 @@ +type: object +properties: + id: + type: string + version: + type: string + partner_key: + type: string + product: + type: string + companyUuid: + type: string + format: UUID diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/error.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/error.yml new file mode 100644 index 0000000..80d73d7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/error.yml @@ -0,0 +1,6 @@ +type: object +properties: + message: + type: string + type: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/page.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/page.yml new file mode 100644 index 0000000..90ad5c7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/page.yml @@ -0,0 +1,8 @@ +type: object +properties: + id: + type: string + version: + type: string + partner: + type: string diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerKey.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerKey.yml new file mode 100644 index 0000000..4d67d98 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerKey.yml @@ -0,0 +1,38 @@ +type: object +required: + - id + - version + - partnerKey + - product + - companyUuid + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + description: | + A unique, internal identifier for this resource. + version: + type: integer + format: int32 + partnerKey: + type: string + product: + $ref: ../../core/schemas/productType.yml + companyUuid: + type: string + format: uuid + createdAt: + type: string + format: date-time + readOnly: true + description: | + When the resource was created. + createdBy: + type: string + format: uuid + readOnly: true + description: | + The UUID of the access token that was used to create this resource. diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV7.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV7.yml new file mode 100644 index 0000000..8ca70d1 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV7.yml @@ -0,0 +1,179 @@ +type: object +title: v7 PartnerPage Template +required: + - credentials.access_token + - credentials.company_uuid + - partner + - partnerDisplayName + - productType + - theme.colorBackgroundPrimary + - theme.colorBackgroundSecondary + - theme.colorBorder + - theme.colorCta + - theme.colorError + - theme.colorPrimary + - theme.colorSecondary + - theme.fontFamilyPrimary + - theme.fontFamilySecondary + - theme.fontSizeBase + - theme.partnerLogo + - theme.partnerLogoLink + - ui.maxResults +properties: + app: + type: object + properties: + loanAmount: + title: Default Loan Amount + type: number + providedCreditRating: + title: Default Credit Rating (one of poor, fair, good, excellent) + type: string + purpose: + title: Default Loan Purpose + type: string + default: debt_consolidation + zipcode: + title: Fall-Back ZIP code + type: string + clientTags: + title: Present Client Tags + type: object + format: key_values + default: {} + credentials: + type: object + properties: + access_token: + title: CLA Access Token + type: string + format: uuid + company_uuid: + title: CLA Company UUID + type: string + format: uuid + credit_card_flow: + title: Credit Card Flow Type (redirect, pre-select, or remarketing) + type: string + embedScripts: + title: Script that Should be Included on the Page (this does not fire on any event) + type: string + featureFlags: + title: MPS Feature Inclusions (one or many comma separated strings) + type: string + headScripts: + title: Script URL to include in tag + type: string + format: uri + headerText: + title: Partner Page Header Text + type: string + partner: + title: Partner Key + type: string + partnerDisclaimer: + title: Additional Disclaimer from Partner (can include HTML) + type: string + partnerDisplayName: + title: Partner Display Name + type: string + productType: + title: Product Type (one of loan, mortgage, savings, or credit_card) + type: string + pw_fiona: + title: Powered By Fiona + type: boolean + shouldAllowLoanCoApplicant: + title: Allow Loan Co-Applicant + type: boolean + default: false + shouldAutoRedirect: + title: Auto-redirect user To Pre-approved Offer + type: boolean + default: true + shouldDisplayNavigation: + title: Show Even/Fiona Header and Branding + type: boolean + default: false + shouldShowPartnershipHeading: + title: Show 'In Partnership With' Heading + type: boolean + default: true + shouldShowSecondaryPages: + title: Show Secondary pages (Home, About, Contact, etc.) + type: boolean + default: false + step: + title: Initial Step (one of preview, application, results) + type: string + theme: + type: object + properties: + colorBackgroundPrimary: + title: Primary Background Color + type: string + format: color + default: '#ffffff' + colorBackgroundSecondary: + title: Seconfary Background Color + type: string + format: color + default: '#f8f7fc' + colorBorder: + title: Border Color + type: string + format: color + default: '#e2e5e9' + colorCta: + title: CTA color + type: string + format: color + default: '#36d386' + colorError: + title: Error Color + type: string + format: color + default: '#e69575' + colorPrimary: + title: Primary Color + type: string + format: color + default: '#66a9f4' + colorSecondary: + title: Secondary Color + type: string + format: color + default: '#66a9f4' + fontFamilyPrimary: + title: Primary Font Family (Open Sans unless fully Fiona Branded, then use BrandonGrotesque) + type: string + default: Open Sans + fontFamilySecondary: + title: Secondary Font Family (Open Sans unless fully Fiona Branded, then use BrandonText) + type: string + default: Open Sans + fontSizeBase: + title: Primary Font Size (postfix with 'px') + type: string + default: 16px + partnerLogo: + title: Partner Logo + type: string + partnerLogoLink: + title: Partner Logo Link URL + type: string + format: uri + ui: + type: object + properties: + defaultSort: + title: Default Sort By + type: string + generic_offer_index: + title: Generic CTA Location + type: number + maxResults: + title: Maximum Number of Results + type: number + default: 3 + diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8.yml new file mode 100644 index 0000000..c32c136 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8.yml @@ -0,0 +1,193 @@ +type: object +title: v8 PartnerPage Template +required: + - credentials.access_token + - credentials.company_uuid + - partner + - partnerDisplayName + - productType + - theme.borderRediusLarge + - theme.borderRadiusSmall + - theme.colorBackgroundPrimary + - theme.colorBackgroundSecondary + - theme.colorBorder + - theme.colorCta + - theme.colorError + - theme.colorPrimary + - theme.colorSecondary + - theme.fontFamilyPrimary + - theme.fontFamilySecondary + - theme.fontSizeBase + - theme.partnerLogo + - theme.partnerLogoLink + - ui.maxResults + - version +properties: + app: + type: object + properties: + loanAmount: + title: Default Loan Amount + type: number + providedCreditRating: + title: Default Credit Rating (one of poor, fair, good, excellent) + type: string + purpose: + title: Default Loan Purpose + type: string + default: debt_consolidation + zipcode: + title: Fall-Back ZIP code + type: string + clientTags: + title: Present Client Tags + type: object + format: key_values + default: {} + credentials: + type: object + properties: + access_token: + title: CLA Access Token + type: string + format: uuid + company_uuid: + title: CLA Company UUID + type: string + format: uuid + credit_card_flow: + title: Credit Card Flow Type (redirect, pre-select, or remarketing) + type: string + embedScripts: + title: Script that Should be Included on the Page (this does not fire on any event) + type: string + featureFlags: + title: MPS Feature Inclusions (one or many comma separated strings) + type: string + headScripts: + title: Script URL to include in tag + type: string + format: uri + headerText: + title: Partner Page Header Text + type: string + partner: + title: Partner Key + type: string + partnerDisclaimer: + title: Additional Disclaimer from Partner (can include HTML) + type: string + partnerDisplayName: + title: Partner Display Name + type: string + productType: + title: Product Type (one of loan, mortgage, savings, or credit_card) + type: string + pw_fiona: + title: Powered By Fiona + type: boolean + shouldAllowLoanCoApplicant: + title: Allow Loan Co-Applicant + type: boolean + default: false + shouldAutoRedirect: + title: Auto-redirect user To Pre-approved Offer + type: boolean + default: true + shouldDisplayNavigation: + title: Show Even/Fiona Header and Branding + type: boolean + default: false + shouldShowPartnershipHeading: + title: Show 'In Partnership With' Heading + type: boolean + default: true + shouldShowSecondaryPages: + title: Show Secondary pages (Home, About, Contact, etc.) + type: boolean + default: false + step: + title: Initial Step (one of preview, application, results) + type: string + theme: + type: object + properties: + borderRediusLarge: + title: Large Border Radius (postfix with 'px') + type: string + default: 14px + borderRadiusSmall: + title: Small Border Radius (postfix with 'px') + type: string + default: 4px + colorBackgroundPrimary: + title: Primary Background Color + type: string + format: color + default: '#ffffff' + colorBackgroundSecondary: + title: Seconfary Background Color + type: string + format: color + default: '#f8f7fc' + colorBorder: + title: Border Color + type: string + format: color + default: '#e2e5e9' + colorCta: + title: CTA color + type: string + format: color + default: '#36d386' + colorError: + title: Error Color + type: string + format: color + default: '#e69575' + colorPrimary: + title: Primary Color + type: string + format: color + default: '#66a9f4' + colorSecondary: + title: Secondary Color + type: string + format: color + default: '#66a9f4' + fontFamilyPrimary: + title: Primary Font Family (Open Sans unless fully Fiona Branded, then use BrandonGrotesque) + type: string + default: Open Sans + fontFamilySecondary: + title: Secondary Font Family (Open Sans unless fully Fiona Branded, then use BrandonText) + type: string + default: Open Sans + fontSizeBase: + title: Primary Font Size (postfix with 'px') + type: string + default: 16px + partnerLogo: + title: Partner Logo + type: string + partnerLogoLink: + title: Partner Logo Link URL + type: string + format: uri + ui: + type: object + properties: + defaultSort: + title: Default Sort By + type: string + generic_offer_index: + title: Generic CTA Location + type: number + maxResults: + title: Maximum Number of Results + type: number + default: 3 + version: + type: string + title: Partner page template version + diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8All.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8All.yml new file mode 100644 index 0000000..cc5abc7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/partnerPageTemplateV8All.yml @@ -0,0 +1,6 @@ +type: object +properties: + productType: + type: array + items: + $ref: ./partnerPageTemplateV8.yml diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/template.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/template.yml new file mode 100644 index 0000000..656efd7 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/template.yml @@ -0,0 +1,48 @@ +type: object +allOf: + - type: object + required: + - id + - uuid + properties: + id: + type: integer + example: 707 + uuid: + type: string + description: 'The UUID' + example: 00000000-0000-0000-0000-000000000000 + + - $ref: ./../schemas/templateCreateData.yml + + - type: object + required: + - created_at + - created_by + - last_edited_at + - last_edited_by + properties: + created_at: + type: integer + description: The timestamp of when the template was created. + example: 1600190562 + created_by: + type: string + description: The UUID of the user who created the template. + example: 00000000-0000-0000-0000-000000000000 + deleted_at: + type: integer + description: The timestamp of when the template was deleted. + example: 1600190563 + deleted_by: + type: string + description: The UUID of the user who deleted the template. + example: 00000000-0000-0000-0000-000000000000 + last_edited_at: + type: integer + description: The timestamp of when the template was last edited. + example: 1600190563 + last_edited_by: + type: string + description: The UUID of the last user to edit the template. + example: 00000000-0000-0000-0000-000000000000 diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateCreateData.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateCreateData.yml new file mode 100644 index 0000000..f6b312d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateCreateData.yml @@ -0,0 +1,29 @@ +type: object +required: + - name + - type + - definition + - data +properties: + name: + type: string + description: 'The display name of the template' + example: Personal Loans Partner Page + type: + type: string + $ref: ./../schemas/templateType.yml + definition: + type: string + description: The version definition to be used for this template. + example: 8 + data: + $ref: ./../schemas/partnerPageTemplateV8.yml + description: Partner page template configuration. + example: + product: loan + step: application + loan_flow: stepbystep-application + loanPurposeOptions: null + shouldAllowLoanCoApplicant: false + shouldAutoRedirect: true + theme.headerCopy: standard diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateType.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateType.yml new file mode 100644 index 0000000..b8a09d2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/templateType.yml @@ -0,0 +1,5 @@ +type: string +enum: + - configuration + - theme +example: configuration diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/version.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/version.yml new file mode 100644 index 0000000..e5adac5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/schemas/version.yml @@ -0,0 +1,17 @@ +type: object +properties: + version: + type: integer + fields: + type: array + items: + type: object + properties: + key: + type: string + label: + type: string + dataType: + type: string + required: + type: boolean diff --git a/Tests/Fixtures/acme/birch-catalog/partner-page/spec.yml b/Tests/Fixtures/acme/birch-catalog/partner-page/spec.yml new file mode 100644 index 0000000..6f3f017 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/partner-page/spec.yml @@ -0,0 +1,729 @@ +openapi: 3.0.3 +info: + title: partner-page + description: A set of easily-configurable landing pages for our publisher partners + version: 1.2.0 + contact: + name: Consumer Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/partnerpage' + description: Prod + - url: 'https://dev-api.example.com/partnerpage' + description: Dev +tags: + - name: Page + description: The partner page configuration object + - name: Template + description: Endpoints relating to partner page templates. + - name: Version + description: Endpoint relating to partner page version definitions. +components: + x-lint-skip: + - inline-schema-is-scalar + securitySchemes: + api-bearer-auth: + type: http + scheme: bearer + bearerFormat: 'Bearer ' + schemas: + AloomaMap: + $ref: ./schemas/aloomaMap.yml + ApiError: + $ref: ./schemas/error.yml + Page: + $ref: ./schemas/page.yml + PartnerPageTemplateV7: + $ref: ./schemas/partnerPageTemplateV7.yml + PartnerPageTemplateV8: + $ref: ./schemas/partnerPageTemplateV8.yml + PartnerPageTemplateV8All: + $ref: ./schemas/partnerPageTemplateV8All.yml + TemplateCreateData: + $ref: ./schemas/templateCreateData.yml + Template: + $ref: ./schemas/template.yml + TemplateType: + $ref: ./schemas/templateType.yml + Version: + $ref: ./schemas/version.yml +paths: + /pages: + get: + summary: Get all partner pages + description: Get all partner pages + operationId: getPartnerPages + tags: + - Page + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Page' + example: + - id: '123' + version: '8' + partner: even + - id: '456' + version: '8' + partner: fiona + '500': + $ref: ./responses/500.yml + post: + summary: Create a partner page + description: Create a partner page + operationId: createPartnerPage + tags: + - Page + parameters: + - name: deviceType + description: The desired config for deviceType. Defaults to 'other'. + in: query + schema: + type: string + example: mobile + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + example: + $ref: ./examples/partnerPageV8.yml + responses: + '201': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + example: + id: '2' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: savings + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + '404': + description: Bad request + content: + application/json: + schema: + $ref: ./schemas/error.yml + example: + message: >- + Partner page with productType {productType} already exists for + this partner. + type: BadRequestException + '500': + $ref: ./responses/500.yml + '/pages/admin/{partnerKey}/all': + x-lint-skip: + - path-resource-is-plural + parameters: + - $ref: ./parameters/partnerKey.yml + get: + summary: Get admin partner pages for partner + description: Get admin partner pages for partner + operationId: getPagesForPartner + tags: + - Page + x-lint-skip: + - index-endpoint-has-limit + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + example: + savings: + - id: '2' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: savings + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + - id: '4' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: loan + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + '400': + $ref: ./responses/400.yml + '404': + $ref: ./responses/404.yml + '500': + $ref: ./responses/500.yml + '/pages/{partnerKey}/all': + x-lint-skip: + - path-resource-is-plural + get: + summary: Get partner pages for partner + description: >- + Get the partner pages for all products for the specified partner with + the deviceType specified in the query string + operationId: getPagesForPartnerAndDeviceType + tags: + - Page + x-lint-skip: + - index-endpoint-has-limit + parameters: + - $ref: ./parameters/partnerKey.yml + - name: deviceType + in: query + schema: + type: string + example: mobile + description: The desired config for deviceType. Defaults to 'other'. + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8All' + example: + savings: + - id: '2' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: savings + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + - id: '4' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: savings + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + '400': + $ref: ./responses/400.yml + '404': + $ref: ./responses/404.yml + '500': + $ref: ./responses/500.yml + '/pages/{partnerKey}/{productType}': + parameters: + - $ref: ./parameters/partnerKey.yml + - name: productType + in: path + schema: + type: string + example: savings + description: The specific product configuration desired + required: true + get: + summary: Get partner pages for partner and product type + description: >- + Get a list of available product configurations for the specified Partner + with the specified deviceType query string + operationId: partnerPage.get.productType + tags: + - Page + parameters: + - in: query + name: deviceType + description: The desired config for deviceType. Defaults to 'other'. + schema: + type: string + example: mobile + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/partnerPageTemplateV8.yml + example: + id: '2' + version: '8' + partner: even + eventHandlers: [] + brand: fiona + app.purpose: debt_consolidation + productType: savings + ui.maxResults: 3 + theme.colorCta: '#f8f7fc' + theme.colorError: '#f8f7fc' + theme.colorBorder: '#f8f7fc' + theme.partnerLogo: string + partnerDisplayName: even + shouldAutoRedirect: true + theme.colorPrimary: '#f8f7fc' + theme.fontSizeBase: 12px + theme.colorSecondary: '#f8f7fc' + theme.partnerLogoLink: 'http://test.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 16px + theme.borderRadiusSmall: 5px + theme.fontFamilyPrimary: Open Sans + credentials.access_token: >- + 445c04e1-cc8d-4d77-a0ed-c9b4d2909f41_9a442418-8b8d-4839-8cd8-4b8efc1d77d8 + credentials.company_uuid: 40c2d6c9-3d26-4b60-94af-d4f7737d31ce + shouldShowSecondaryPages: false + theme.fontFamilySecondary: Open Sans + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#f8f7fc' + theme.colorBackgroundSecondary: '#f8f7fc' + eventScripts: [] + '400': + $ref: ./responses/400.yml + '404': + $ref: ./responses/404.yml + '500': + $ref: ./responses/500.yml + '/pages/{partnerKey}/overrides': + parameters: + - $ref: ./parameters/partnerKey.yml + get: + summary: Get partner page overrides + description: Get partner page overrides + operationId: getPageOverrides + tags: + - Page + responses: + '200': + description: Success + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/PartnerPageTemplateV7' + - $ref: '#/components/schemas/PartnerPageTemplateV8' + examples: + v8: + $ref: ./examples/partnerPageV8.yml + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + /versions: + get: + summary: Get partner page versions + description: Get partner page versions + operationId: getVersions + tags: + - Version + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Version' + example: + version: '8' + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + '500': + $ref: ./responses/500.yml + '/versions/{version}': + parameters: + - in: path + name: version + required: true + description: Version number of the Partner Page template to return + schema: + type: string + example: 8 + get: + summary: Get partner page version + description: Get partner page version + operationId: getVersion + tags: + - Version + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Version' + examples: + v7_template: + $ref: ./examples/versionV7.yml + v8_template: + $ref: ./examples/versionV8.yml + '404': + description: Bad request + content: + application/json: + schema: + $ref: ./schemas/error.yml + example: + message: 'Partner page template version {version} not found.' + type: NotFoundException + '500': + $ref: ./responses/500.yml + '/pages/{id}': + parameters: + - name: id + in: path + schema: + type: string + required: true + description: The id of the partner page in the database + put: + summary: Update partner page + description: >- + Adds deleted_at/deleted_by to the entry of the supplied ID, and creates + a new Partner Page for that Partner + operationId: updatePage + tags: + - Page + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: ./schemas/error.yml + example: + message: Partner page already exists for this partner. + type: BadRequestException + '500': + $ref: ./responses/500.yml + delete: + summary: Delete partner page + description: Delete partner page + operationId: deletePage + tags: + - Page + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/PartnerPageTemplateV8' + example: + id: '1795' + version: '8' + partner: test-partnerpage + eventHandlers: [] + brand: fiona + clientTags: {} + app.purpose: debt_consolidation + productType: loan + ui.maxResults: 3 + theme.colorCta: '#3fea90' + theme.colorError: '#ff7200' + theme.colorBorder: '#e2e5e9' + theme.partnerLogo: >- + //partnerpage-static.example.com/assets/fiona-content-logo-c5c9b55c.png + partnerDisplayName: supply-demo + shouldAutoRedirect: true + theme.colorPrimary: '#4b2372' + theme.fontSizeBase: 16px + theme.colorSecondary: '#ff7200' + theme.partnerLogoLink: 'https://hifiona.com' + shouldDisplayNavigation: false + theme.borderRadiusLarge: 14px + theme.borderRadiusSmall: 4px + theme.fontFamilyPrimary: BrandonGrotesque + credentials.access_token: >- + 3bb8c816-d3d0-4bd0-8408-b244e000a843_4c840aa7-3451-4552-9338-678a4323a9a2 + credentials.company_uuid: 6f1e2bf2-8bf7-4345-9a78-3673be161a4b + shouldShowSecondaryPages: false + theme.fontFamilySecondary: BrandonText + shouldAllowLoanCoApplicant: false + shouldShowPartnershipHeading: true + theme.colorBackgroundPrimary: '#ffffff' + theme.colorBackgroundSecondary: '#f4f4f4' + /pages/alooma: + x-lint-skip: + - path-resource-is-plural + get: + summary: Get partner pages as mapped in Alooma + description: Get partner pages as mapped in Alooma + operationId: partnerPage.getAloomaMaps + tags: + - Page + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/aloomaMap.yml + '500': + description: Unknown Error + content: + application/json: + schema: + $ref: ./schemas/error.yml + /templates: + get: + summary: Get templates + operationId: getTemplates + tags: + - Template + x-lint-skip: + - index-endpoint-has-limit + parameters: + - in: query + name: type + schema: + $ref: ./schemas/templateType.yml + description: Filter templates by the type of template + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: ./schemas/template.yml + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + '/templates/{uuid}': + parameters: + - $ref: ./parameters/uuid.yml + get: + description: Get a template + summary: Get a template + operationId: getTemplate + tags: + - Template + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/template.yml + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + post: + description: Create a template + summary: Create a template + operationId: createTemplate + tags: + - Template + parameters: + - $ref: ./parameters/uuid.yml + requestBody: + content: + application/json: + schema: + $ref: ./schemas/templateCreateData.yml + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/template.yml + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + put: + description: Update a template + summary: Update a template + operationId: updateTemplate + tags: + - Template + requestBody: + content: + application/json: + schema: + $ref: ./schemas/templateCreateData.yml + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: ./schemas/template.yml + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml + delete: + description: Delete a template + summary: Delete a template + operationId: deleteTemplate + tags: + - Template + responses: + '200': + description: Success + '400': + $ref: ./responses/400.yml + '401': + $ref: ./responses/401.yml + '404': + $ref: ./responses/404.yml diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/endDate.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/endDate.yml new file mode 100644 index 0000000..208854a --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/endDate.yml @@ -0,0 +1,6 @@ +name: endDate +in: query +required: true +schema: + type: string + format: date diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/groupingKey.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/groupingKey.yml new file mode 100644 index 0000000..58f876e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/groupingKey.yml @@ -0,0 +1,5 @@ +name: groupingKey +in: query +required: true +schema: + $ref: ../schemas/summaryGroupBy.yml diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/startDate.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/startDate.yml new file mode 100644 index 0000000..c344c89 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/startDate.yml @@ -0,0 +1,6 @@ +name: startDate +in: query +required: true +schema: + type: string + format: date diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/subAccountId.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/subAccountId.yml new file mode 100644 index 0000000..6e7614b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/parameters/subAccountId.yml @@ -0,0 +1,6 @@ +name: subAccountId +in: query +required: true +schema: + type: integer + format: int64 diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardFunnelSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardFunnelSummary.yml new file mode 100644 index 0000000..84362b3 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardFunnelSummary.yml @@ -0,0 +1,56 @@ +type: object +required: + - groupBy + - groupKey + - numLeads + - numLeadsSubmittedApp + - numLeadsMatched + - numLeadsClicked + - numLeadsApproved + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + description: | + The requested bucketing criteria, for example "day". + groupKey: + type: string + description: | + The value of the bucketing criteria. For example, if "day" was + requested as a groupBy, groupKeys could be "2020-07-01" or "2020-07-02" + numLeads: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + for the credit card vertical. + numLeadsSubmittedApp: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + that applied for a credit card. + numLeadsMatched: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + that were matched + numLeadsClicked: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + that clicked on a credit card application. + numLeadsApproved: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + that were approved for a credit card application. + totalPayout: + type: number + format: double + description: | + Payout to the partner, in dollars, attributable + to the leads that were created in this bucket. \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardPayoutSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardPayoutSummary.yml new file mode 100644 index 0000000..92da2c6 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/creditCardPayoutSummary.yml @@ -0,0 +1,21 @@ +type: object +required: + - groupBy + - groupKey + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + description: | + The requested bucketing criteria, for example "day". + groupKey: + type: string + description: | + The value of the bucketing criteria. For example, if "day" was + requested as a groupBy, groupKeys could be "2020-07-01" or "2020-07-02" + totalPayout: + type: number + format: double + description: | + Payout to the partner, in dollars, corresponding + to the actual "booked" payout time. diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsuranceFunnelSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsuranceFunnelSummary.yml new file mode 100644 index 0000000..5ba1fc5 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsuranceFunnelSummary.yml @@ -0,0 +1,37 @@ +type: object +required: + - groupBy + - groupKey + - numPageLoads + - numLeads + - numLeadsSubmittedQuoteApp + - numLeadsSubmittedLeadApp + - numLeadsSubmittedAppToCarrier + - numLeadsWithPolicy + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + groupKey: + type: string + numPageLoads: + type: integer + format: int32 + numLeads: + type: integer + format: int32 + numLeadsSubmittedQuoteApp: + type: integer + format: int32 + numLeadsSubmittedLeadApp: + type: integer + format: int32 + numLeadsSubmittedAppToCarrier: + type: integer + format: int32 + numLeadsWithPolicy: + type: integer + format: int32 + totalPayout: + type: number + format: double diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsurancePayoutSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsurancePayoutSummary.yml new file mode 100644 index 0000000..f9edce9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/lifeInsurancePayoutSummary.yml @@ -0,0 +1,13 @@ +type: object +required: + - groupBy + - groupKey + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + groupKey: + type: string + totalPayout: + type: number + format: double diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanFunnelSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanFunnelSummary.yml new file mode 100644 index 0000000..44c954b --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanFunnelSummary.yml @@ -0,0 +1,37 @@ +type: object +required: + - groupBy + - groupKey + - numLeads + - numLeadsSubmittedApp + - numLeadsCompletedApp + - numLeadsPreapproved + - numLeadsClicked + - numLeadsFunded + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + groupKey: + type: string + numLeads: + type: integer + format: int32 + numLeadsSubmittedApp: + type: integer + format: int32 + numLeadsCompletedApp: + type: integer + format: int32 + numLeadsPreapproved: + type: integer + format: int32 + numLeadsClicked: + type: integer + format: int32 + numLeadsFunded: + type: integer + format: int32 + totalPayout: + type: number + format: double diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanPayoutSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanPayoutSummary.yml new file mode 100644 index 0000000..f9edce9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/loanPayoutSummary.yml @@ -0,0 +1,13 @@ +type: object +required: + - groupBy + - groupKey + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + groupKey: + type: string + totalPayout: + type: number + format: double diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsFunnelSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsFunnelSummary.yml new file mode 100644 index 0000000..ee4f1b8 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsFunnelSummary.yml @@ -0,0 +1,40 @@ +type: object +required: + - groupBy + - groupKey + - numLeads + - numClicks + - numOpened + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + description: | + The requested bucketing criteria, for example "day". + groupKey: + type: string + description: | + The value of the bucketing criteria. For example, if "day" was + requested as a groupBy, groupKeys could be "2020-07-01" or "2020-07-02" + numLeads: + type: integer + format: int32 + description: | + Number of unique leads from a supply partner created + for a savings account. + numClicks: + type: integer + format: int32 + description: | + Number of unique leads who clicked an offer + numOpened: + type: integer + format: int32 + description: | + Number of unique leads who opened an account + totalPayout: + type: number + format: double + description: | + Payout to the partner, in dollars, attributable + to the leads that were created in this bucket. \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsPayoutSummary.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsPayoutSummary.yml new file mode 100644 index 0000000..92da2c6 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/savingsPayoutSummary.yml @@ -0,0 +1,21 @@ +type: object +required: + - groupBy + - groupKey + - totalPayout +properties: + groupBy: + $ref: ./summaryGroupBy.yml + description: | + The requested bucketing criteria, for example "day". + groupKey: + type: string + description: | + The value of the bucketing criteria. For example, if "day" was + requested as a groupBy, groupKeys could be "2020-07-01" or "2020-07-02" + totalPayout: + type: number + format: double + description: | + Payout to the partner, in dollars, corresponding + to the actual "booked" payout time. diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/summaryGroupBy.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/summaryGroupBy.yml new file mode 100644 index 0000000..9573804 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/schemas/summaryGroupBy.yml @@ -0,0 +1,5 @@ +type: string +enum: + - day + - credit_rating + - loan_purpose diff --git a/Tests/Fixtures/acme/birch-catalog/supply-analytics/spec.yml b/Tests/Fixtures/acme/birch-catalog/supply-analytics/spec.yml new file mode 100644 index 0000000..323cef2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/supply-analytics/spec.yml @@ -0,0 +1,317 @@ +openapi: 3.0.3 +info: + title: supply-analytics + description: description + version: 1.7.0 + contact: + name: Platform Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/supplyAnalytics' + description: Prod + - url: 'https://dev-api.example.com/supplyAnalytics' + description: Dev +components: + parameters: + subAccountId: + $ref: ./parameters/subAccountId.yml + endDate: + $ref: ./parameters/endDate.yml + startDate: + $ref: ./parameters/startDate.yml + groupingKey: + $ref: ./parameters/groupingKey.yml + responses: + InvalidRequest: + $ref: ../core/responses/invalidRequest.yml + MalformedRequest: + $ref: ../core/responses/malformedRequest.yml + UnauthorizedRequest: + $ref: ../core/responses/unauthorizedRequest.yml + schemas: + ApiError: + $ref: ../core/schemas/apiError.yml + SummaryGroupBy: + $ref: ./schemas/summaryGroupBy.yml + LifeInsuranceFunnelSummary: + $ref: ./schemas/lifeInsuranceFunnelSummary.yml + LifeInsurancePayoutSummary: + $ref: ./schemas/lifeInsurancePayoutSummary.yml + LoanFunnelSummary: + $ref: ./schemas/loanFunnelSummary.yml + LoanPayoutSummary: + $ref: ./schemas/loanPayoutSummary.yml + SavingsFunnelSummary: + $ref: ./schemas/savingsFunnelSummary.yml + SavingsPayoutSummary: + $ref: ./schemas/savingsPayoutSummary.yml + CreditCardFunnelSummary: + $ref: ./schemas/creditCardFunnelSummary.yml + CreditCardPayoutSummary: + $ref: ./schemas/creditCardPayoutSummary.yml + securitySchemes: + internal: + type: http + scheme: bearer + description: An internal bearer token. + channelManagement: + type: http + scheme: bearer + description: A channel management bearer token. +security: + - internal: [] +tags: + - name: Life Insurance Analytics + - name: Loan Analytics + - name: Savings Analytics + - name: Credit Card Analytics +paths: + /lifeInsuranceFunnelSummaries: + get: + summary: Get life insurance funnel summaries + description: Get life insurance funnel summaries + operationId: getLifeInsuranceFunnelSummaries + tags: + - Life Insurance Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LifeInsuranceFunnelSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /lifeInsurancePayoutSummaries: + get: + summary: Get life insurance payout summaries + description: Get life insurance payout summaries + operationId: getLifeInsurancePayoutSummaries + tags: + - Life Insurance Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LifeInsurancePayoutSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /loanFunnelSummaries: + get: + summary: Get loan funnel summaries + description: Get loan funnel summaries + operationId: getLoanFunnelSummaries + tags: + - Loan Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LoanFunnelSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /loanPayoutSummaries: + get: + summary: Get loan payout summaries + description: Get loan payout summaries + operationId: getLoanPayoutSummaries + tags: + - Loan Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LoanPayoutSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /savingsFunnelSummaries: + get: + summary: Get savings funnel summaries + description: Get savings funnel summaries + operationId: getSavingsFunnelSummaries + tags: + - Savings Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SavingsFunnelSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /savingsPayoutSummaries: + get: + summary: Get savings payout summaries + description: Get savings payout summaries + operationId: getSavingsPayoutSummaries + tags: + - Savings Analytics + security: + - internal: [] + - channelManagement: [] + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SavingsPayoutSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /creditCardFunnelSummaries: + get: + summary: Get credit card funnel summaries + description: Return credit card funnel summaries based upon request parameters + operationId: getCreditCardFunnelSummaries + security: + - internal: [] + - channelManagement: [] + tags: + - Credit Card Analytics + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CreditCardFunnelSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit + /creditCardPayoutSummaries: + get: + summary: Get credit card payout summaries + description: Return credit card payout summaries based upon request parameters + operationId: getCreditCardPayoutSummaries + security: + - internal: [] + - channelManagement: [] + tags: + - Credit Card Analytics + parameters: + - $ref: '#/components/parameters/subAccountId' + - $ref: '#/components/parameters/groupingKey' + - $ref: '#/components/parameters/startDate' + - $ref: '#/components/parameters/endDate' + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CreditCardPayoutSummary' + '400': + $ref: '#/components/responses/MalformedRequest' + '401': + $ref: '#/components/responses/UnauthorizedRequest' + '422': + $ref: '#/components/responses/InvalidRequest' + x-lint-skip: index-endpoint-has-limit diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/request-bodies/createTransUnionSupplierConfiguration.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/request-bodies/createTransUnionSupplierConfiguration.yml new file mode 100644 index 0000000..766c0cb --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/request-bodies/createTransUnionSupplierConfiguration.yml @@ -0,0 +1,5 @@ +description: Create a transunion supplier configuration +content: + application/json: + schema: + $ref: ../schemas/transUnionSupplierConfiguration.yml diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/badRequest.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/badRequest.yml new file mode 100644 index 0000000..365a896 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/badRequest.yml @@ -0,0 +1,10 @@ +type: object +required: + - message +properties: + message: + type: string + example: Bad Request + details: + type: string + example: Invalid input \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/internalServerError.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/internalServerError.yml new file mode 100644 index 0000000..bd28af9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/internalServerError.yml @@ -0,0 +1,10 @@ +type: object +required: + - message +properties: + message: + type: string + example: A server error occurred + details: + type: string + example: Timed out waiting for TransUnion response \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/invalidRequestJson.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/invalidRequestJson.yml new file mode 100644 index 0000000..2c2b0dd --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/invalidRequestJson.yml @@ -0,0 +1,12 @@ +type: object +required: + - message + - details +properties: + message: + type: string + example: Bad Request + details: + type: array + items: + type: string \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/notFound.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/notFound.yml new file mode 100644 index 0000000..5b864c2 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/errors/notFound.yml @@ -0,0 +1,7 @@ +type: object +required: + - message +properties: + message: + type: string + example: The resource is not found \ No newline at end of file diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transUnionSupplierConfiguration.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transUnionSupplierConfiguration.yml new file mode 100644 index 0000000..8df082c --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transUnionSupplierConfiguration.yml @@ -0,0 +1,51 @@ +type: object +required: + - id + - subAccountId + - enableExcellentCreditBucket + - enableGoodCreditBucket + - enableFairCreditBucket + - enablePoorCreditBucket + - enableLimitedCreditBucket + - enableUnknownCreditBucket + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + format: uuid + readOnly: true + enableExcellentCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'excellent' credit scores + enableGoodCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'good' credit scores + enableFairCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'fair' credit scores + enablePoorCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'poor' credit scores + enableLimitedCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'limited' credit scores + enableUnknownCreditBucket: + type: boolean + description: Boolean value indicating if transunion enhancement is enabled for leads for the supplier that have 'unknown' credit scores + deletedAt: + type: string + format: date-time + readOnly: true + deletedBy: + type: string + format: uuid + readOnly: true diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/comp.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/comp.yml new file mode 100644 index 0000000..c747555 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/comp.yml @@ -0,0 +1,40 @@ +type: object +description: > + Information that must be returned with a service for compliance reasons when certain conditions exist on a consumer’s file. + (TU41 User Guide March 30, 2019 page 631/632). + Only one set of -Source, -Account, -Code will be populated at a time. +properties: + tradeSource: + type: string + description: > + The name of the source of the information. For example, if the information is a trade account, + the name of the reporting subscriber is returned. + (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Trade Account' + tradeAccount: + type: string + description: > + The number of the account (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Trade Account' + tradeCode: + type: string + description: > + The affiliate (consumer) remark code, refer to 'Appendix C: Account codes' (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Trade Account' + pubRecordSource: + type: string + description: > + The name of the source of the information. For example, if the information is a trade account, + the name of the reporting subscriber is returned. + (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Public Record' + pubRecordAccount: + type: string + description: > + The public record docket number (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Public Record' + pubRecordCode: + type: string + description: > + The public record type code, refer to 'Appendix C: Account codes' (TU41 User Guide March 30, 2019 page 631/632). + This field is only set if the information type is a 'Trade Account' diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummary.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummary.yml new file mode 100644 index 0000000..cc34a6f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummary.yml @@ -0,0 +1,29 @@ +type: object +properties: + percentAvailable: + type: string + description: > + The percent of credit available to the subject in revolving, check credit, or open accounts. + If the account type is installment, mortgage, closed with balance, unspecified, or totals, this field is blank. + (TU41 User Guide March 30, 2019 page 704/705) + highCredit: + type: integer + format: int32 + description: > + The maximum amount of credit that the subject incurred in this account type. + (TU41 User Guide March 30, 2019 page 704/705) + creditLimit: + type: integer + format: int32 + balance: + type: integer + format: int32 + pastDue: + type: integer + format: int32 + monthlyPayment: + type: integer + format: int32 + description: > + The minimum monthly payment required of the subject for this account type. + (TU41 User Guide March 30, 2019 page 704/705) diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummaryCounts.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummaryCounts.yml new file mode 100644 index 0000000..7e71a1f --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/creditSummaryCounts.yml @@ -0,0 +1,42 @@ +type: object +description: > + Contains the totals of the public records, inquiries, and different types of + accounts included in this consumer file +properties: + publicCount: + type: integer + format: int32 + collectionCount: + type: integer + format: int32 + totalTradeCount: + type: integer + format: int32 + negativeTradeCount: + type: integer + format: int32 + historicalNegativeTradeCount: + type: integer + format: int32 + historicalNegativeOccurrencesCount: + type: integer + format: int32 + revolvingTradeCount: + type: integer + format: int32 + installmentTradeCount: + type: integer + format: int32 + mortgageTradeCount: + type: integer + format: int32 + openTradeCount: + type: integer + format: int32 + unspecifiedTradeCount: + type: integer + format: int32 + description: The number of accounts with an unspecified (blank) portfolio type contained in this file. + totalInquiryCount: + type: integer + format: int32 diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/mismatch.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/mismatch.yml new file mode 100644 index 0000000..9083631 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/mismatch.yml @@ -0,0 +1,27 @@ +type: object +description: Indicates whether the input data conflicts with transunion info on file +properties: + addressCondition: + type: string + description: > + Indicates the condition that invoked the ID Mismatch Alert message. Possible values are: + '1' - input does not match file and '2' - Invalid information + (TU41 User Guide March 30, 2019 page 730/731) + addressStatus: + type: string + description: > + Indicates the condition that invoked the ID Mismatch Alert message. Possible values are: + '1' - input does not match file and '2' - Invalid information + (TU41 User Guide March 30, 2019 page 730/731) + zipcodeCondition: + type: string + description: > + Indicates the condition that invoked the ID Mismatch Alert message. Possible values are: + '1' - Mismatch input does not match file and '2' - Invalid information + (TU41 User Guide March 30, 2019 page 730/731) + zipcodeStatus: + type: string + description: > + Indicates whether the ID Mismatch Alert message refers to a current address or a previous address. + Possible values are: 'C' - Current address and 'P' Previous address + (TU41 User Guide March 30, 2019 page 730/731) diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/vscore.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/vscore.yml new file mode 100644 index 0000000..397699e --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunion/vscore.yml @@ -0,0 +1,27 @@ +type: object +description: VantageScore® 3.0 results +properties: + result: + type: string + description: > + The results of the scoring process. If the file is not scored, this element is not returned. + Contains a plus sign (+) or a minus sign (-) to indicate whether the score is positive or negative. + A score of zero is always positive. + rank1Code: + type: string + description: See VantageScore® 3.0 factor codes (TU41 User Guide March 30, 2019 page 505+) + rank2Code: + type: string + description: See VantageScore® 3.0 factor codes (TU41 User Guide March 30, 2019 page 505+) + rank3Code: + type: string + description: See VantageScore® 3.0 factor codes (TU41 User Guide March 30, 2019 page 505+) + rank4Code: + type: string + description: See VantageScore® 3.0 factor codes (TU41 User Guide March 30, 2019 page 505+) + noScoreReason: + type: string + description: > + The reason a file could not be scored. Possible values are: + `subjectDeceased`, `insufficientCredit`, `notProcessed`, `requirementsNotMet`, + `cascadingModel`, `missingRequiredRiskModels` diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionProfile.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionProfile.yml new file mode 100644 index 0000000..fa4bbfc --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionProfile.yml @@ -0,0 +1,69 @@ +type: object +required: + - id + - createdAt + - key + - transunionResponseId + - comp + - mismatch + - vscore + - csRevolving + - csInstallment + - csMortgage + - csOpen + - csClosedWithBalance + - csUnspecified + - csTotal + - csRecord +properties: + id: + type: integer + format: int64 + createdAt: + type: string + format: date-time + key: + type: string + format: string + description: Unique identifier specific to this person's personal information + transunionResponseId: + type: integer + format: int64 + isMinor: + type: boolean + isFrozen: + type: boolean + isDisputed: + type: boolean + comp: + $ref: ./transunion/comp.yml + mismatch: + $ref: ./transunion/mismatch.yml + visionAlertCode: + type: string + format: string + vscore: + $ref: ./transunion/vscore.yml + csRevolving: + $ref: ./transunion/creditSummary.yml + description: Credit summary for revolving or check credit accounts (TU41 User Guide March 30, 2019 page 704/705) + csInstallment: + $ref: ./transunion/creditSummary.yml + description: Credit summary for installment accounts (TU41 User Guide March 30, 2019 page 704/705) + csMortgage: + $ref: ./transunion/creditSummary.yml + description: Credit summary for mortgage accounts (TU41 User Guide March 30, 2019 page 704/705) + csOpen: + $ref: ./transunion/creditSummary.yml + description: Credit summary for open lines of credit (TU41 User Guide March 30, 2019 page 704/705) + csClosedWithBalance: + $ref: ./transunion/creditSummary.yml + description: Credit summary for closed credit lines (TU41 User Guide March 30, 2019 page 704/705) + csUnspecified: + $ref: ./transunion/creditSummary.yml + description: Credit summary for unspecified (blank) accounts (TU41 User Guide March 30, 2019 page 704/705) + csTotal: + $ref: ./transunion/creditSummary.yml + description: Total credit summary (TU41 User Guide March 30, 2019 page 704/705) + csRecord: + $ref: ./transunion/creditSummaryCounts.yml diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionRequest.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionRequest.yml new file mode 100644 index 0000000..9edf327 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/schemas/transunionRequest.yml @@ -0,0 +1,47 @@ +type: object +required: + - leadUuid + - email + - firstName + - lastName + - address + - city + - state + - zipcode + - subAccountId +properties: + leadUuid: + type: string + format: uuid + email: + $ref: ../../core/schemas/email.yml + firstName: + type: string + format: string + lastName: + type: string + format: string + address: + type: string + format: string + address2: + type: string + format: string + city: + type: string + format: string + state: + type: string + format: string + zipcode: + type: string + format: string + dateOfBirth: + type: string + format: Date + subAccountId: + type: integer + format: int64 + description: Supply sub account id + ssn: + $ref: ../../core/schemas/ssn.yml diff --git a/Tests/Fixtures/acme/birch-catalog/third-party-data/spec.yml b/Tests/Fixtures/acme/birch-catalog/third-party-data/spec.yml new file mode 100644 index 0000000..413933d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/third-party-data/spec.yml @@ -0,0 +1,292 @@ +openapi: 3.0.3 +info: + title: third-party-data + description: For retrieving user data from various 3rd-party sources + version: 1.4.0 + contact: + name: Knowledge Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/third-party-data' + description: Prod + - url: 'https://dev-api.example.com/third-party-data' + description: Dev +components: + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'svc-third-party-data:create': Allows recording third party data + 'svc-third-party-data:read': Allows reading third party data + schemas: + TransunionComp: + $ref: ./schemas/transunion/comp.yml + TransunionCreditSummary: + $ref: ./schemas/transunion/creditSummary.yml + TransunionCreditSummaryCounts: + $ref: ./schemas/transunion/creditSummaryCounts.yml + TransunionMismatch: + $ref: ./schemas/transunion/mismatch.yml + TransunionVscore: + $ref: ./schemas/transunion/vscore.yml + TransunionProfile: + $ref: ./schemas/transunionProfile.yml + TransunionRequest: + $ref: ./schemas/transunionRequest.yml + TransUnionSupplierConfiguration: + $ref: ./schemas/transUnionSupplierConfiguration.yml + BadRequestError: + $ref: ../core/schemas/errors/badRequest.yml + ApiError: + $ref: ../core/schemas/apiError.yml +tags: + - name: TransUnion + description: | + Get TransUnion profles +paths: + /sources/transunion/profile: + x-lint-skip: + - path-resource-is-plural + post: + summary: Retrieve a TransUnion profile + description: > + Create a TransUnion profile containing a VantageScore® 3.0 score. Input + data is passed onto the transunion API, the API result is then passed + through as the response of this operation. + operationId: createTransunionProfile + tags: + - TransUnion + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TransunionRequest' + examples: + ross: + value: + leadUuid: 177d6156-8dea-4ba9-bd4e-40d7632a1555 + email: rossypoo@example.com + firstName: Cranberry + lastName: Saucey + address: 806 Turkey + city: Fantasy Island + state: IL + zipcode: '60750' + ssn: 666-22-2525 + subAccountId: 969 + responses: + '200': + description: TU profile retrieved successfully + content: + application/json: + schema: + $ref: '#/components/schemas/TransunionProfile' + '400': + description: Invalid request format + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/errors/badRequest.yml + '404': + description: TU profile not found + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + '500': + description: Internal server error + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + security: + - oauth: + - 'svc-third-party-data:create' + /transUnionSupplierConfigurations: + get: + summary: Get a list of transunion configuration according to the parameters + description: Get a list of transunion configuration according to the parameters + operationId: TransUnionSupplierConfiguration.getTransUnionSupplierConfigurations + tags: + - SubAccount TransUnion Configuration + security: + - oauth: + - 'svc-third-party-data:read' + parameters: + - name: id + in: query + description: A comma separated list of transunion supplier configuration ids + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: subAccountId + in: query + description: >- + A comma separated list of sub account ids associated with the + transunion supplier configuration + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + style: form + explode: false + - name: createdAtMax + in: query + description: end of the createdAt range + schema: + type: string + format: date-time + - name: createdAtMin + in: query + description: start of the createdAt range + schema: + type: string + format: date-time + - name: createdBy + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: deletedAtMin + in: query + description: beginning of range for deletedAt + schema: + type: string + format: date-time + - name: deletedAtMax + in: query + description: end of range for deletedAt + schema: + type: string + format: date-time + - name: deletedBy + in: query + description: comma separated list of uuids + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + description: 'limit the results, default 100' + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + description: 'at what offset do you want to start looking at, default 0' + required: true + schema: + type: integer + format: int64 + minimum: 0 + - name: excludeDeleted + description: 'exclude deleted values, default true' + in: query + schema: + type: boolean + - name: enableLeadEnhancement + in: query + description: >- + A boolean to indicate if transunion lead enhancement is enabled for + the supplier + schema: + type: boolean + - name: enableExcellentCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the excellent credit bucket for the supplier + schema: + type: boolean + - name: enableGoodCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the good credit bucket for the supplier + schema: + type: boolean + - name: enableFairCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the fair credit bucket for the supplier + schema: + type: boolean + - name: enablePoorCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the poor credit bucket for the supplier + schema: + type: boolean + - name: enableLimitedCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the limited credit bucket for the supplier + schema: + type: boolean + - name: enableUnknownCreditBucket + in: query + description: >- + A boolean to indicate if transunion enhancement is enabled for leads + in the unknown credit bucket for the supplier + schema: + type: boolean + responses: + '200': + description: transunion supplier configuration found + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TransUnionSupplierConfiguration' + post: + summary: Create a new transunion supplier configuration + description: Create a new transunion supplier configuration + operationId: TransUnionSupplierConfiguration.createTransUnionSupplierConfiguration + tags: + - SubAccount TransUnion Configuration + security: + - oauth: + - 'svc-third-party-data:create' + requestBody: + $ref: ./request-bodies/createTransUnionSupplierConfiguration.yml + responses: + '201': + description: The transunion configuration was succesfully created + content: + application/json: + schema: + $ref: '#/components/schemas/TransUnionSupplierConfiguration' diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/offerDisplay.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/offerDisplay.yml new file mode 100644 index 0000000..efe05b4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/offerDisplay.yml @@ -0,0 +1,4 @@ +content: + application/json: + schema: + $ref: ../schemas/offerDisplay.yml diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/sessionInit.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/sessionInit.yml new file mode 100644 index 0000000..63e73d4 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/request-bodies/sessionInit.yml @@ -0,0 +1,4 @@ +content: + application/json: + schema: + $ref: ../schemas/newSessionInit.yml diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidOfferDisplay.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidOfferDisplay.yml new file mode 100644 index 0000000..031b760 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidOfferDisplay.yml @@ -0,0 +1,18 @@ +description: Invalid request body JSON format +content: + application/json: + schema: + type: array + items: + $ref: ../../core/schemas/apiError.yml + examples: + missingLeadUuid: + summary: The request body did not include 'leadUuid' + value: + [ + { + "attribute": "leadUuid", + "type": "missing", + "message": "leadUuid must be specified" + } + ] diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidSessionInit.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidSessionInit.yml new file mode 100644 index 0000000..2cd5479 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/invalidSessionInit.yml @@ -0,0 +1,21 @@ +description: Invalid request body JSON format +content: + application/json: + schema: + type: array + items: + $ref: ../../core/schemas/apiError.yml + examples: + missingLeadUuid: + summary: The specified uuid was not a UUID + value: + [ + { + "attribute": "uuid", + "type": "notUuid", + "message": "uuid must be a uuid, but is 123", + "details": { + "specified": "123" + } + } + ] diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/responses/offerDisplayCreated.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/offerDisplayCreated.yml new file mode 100644 index 0000000..a7642d9 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/offerDisplayCreated.yml @@ -0,0 +1,5 @@ +description: Offer display event recorded successfully +content: + application/json: + schema: + $ref: ../schemas/offerDisplay.yml diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/responses/sessionInitCreated.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/sessionInitCreated.yml new file mode 100644 index 0000000..b085a3d --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/responses/sessionInitCreated.yml @@ -0,0 +1,5 @@ +description: Session initiated successfully +content: + application/json: + schema: + $ref: ../schemas/sessionInit.yml diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/newSessionInit.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/newSessionInit.yml new file mode 100644 index 0000000..ba6a007 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/newSessionInit.yml @@ -0,0 +1,8 @@ +type: object +properties: + sessionUuid: + type: string + format: uuid + description: > + You may specify the session's UUID; if you don't, one will be generated + for you. diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/offerDisplay.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/offerDisplay.yml new file mode 100644 index 0000000..4a7de49 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/offerDisplay.yml @@ -0,0 +1,35 @@ +type: object +required: + - id + - uuid + - leadUuid + - rateTableUuid + - offerUuid + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + readOnly: true + uuid: + type: string + format: uuid + readOnly: true + leadUuid: + type: string + format: uuid + rateTableUuid: + type: string + format: uuid + offerUuid: + type: string + format: uuid + createdAt: + type: string + format: date-time + readOnly: true + createdBy: + type: string + format: uuid + readOnly: true diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/sessionInit.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/sessionInit.yml new file mode 100644 index 0000000..7239b38 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/schemas/sessionInit.yml @@ -0,0 +1,23 @@ +type: object +required: + - id + - uuid + - sessionUuid + - createdAt + - createdBy +properties: + id: + type: integer + format: int64 + uuid: + type: string + format: uuid + sessionUuid: + type: string + format: uuid + createdAt: + type: string + format: date-time + createdBy: + type: string + format: uuid diff --git a/Tests/Fixtures/acme/birch-catalog/ui-event/spec.yml b/Tests/Fixtures/acme/birch-catalog/ui-event/spec.yml new file mode 100644 index 0000000..cb22327 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/ui-event/spec.yml @@ -0,0 +1,225 @@ +openapi: 3.0.3 +info: + title: ui-event + description: | + For recording events that happen UIs, to aid funnel analysis and meet + compliance requirements + version: 1.0.0 + contact: + name: Finance Team + url: >- + https://example.com/docs/api-team +servers: + - url: 'https://api.example.com/uiEvent' + description: Prod + - url: 'https://dev-api.example.com/uiEvent' + description: Dev +components: + securitySchemes: + oauth: + type: oauth2 + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'ui-event:write': Allows recording UI events + 'ui-event:read': Allows read access to UI event endpoints + schemas: + ApiError: + $ref: ../core/schemas/apiError.yml + ApiErrorDetails: + $ref: ../core/schemas/apiErrorDetails.yml + OfferDisplay: + $ref: ./schemas/offerDisplay.yml + NewSessionInit: + $ref: ./schemas/newSessionInit.yml + OfferDisplaySort: + type: string + enum: + - id + - uuid + - leadUuid + - rateTableUuid + - offerUuid + - createdAt + - createdBy + Order: + $ref: ../core/schemas/order.yml + SessionInit: + $ref: ./schemas/sessionInit.yml +tags: + - name: Offer Display + description: | + Indicates that the specified offer was shown to the user. + - name: Session Init + description: | + Indicates the beginning of a new user session. +paths: + /offerDisplays: + get: + summary: Get multiple offer display events + description: > + Returns a list of offer display events that match the specified + criteria. + operationId: OfferDisplayController.index + tags: + - Offer Display + security: + - oauth: + - 'ui-event:read' + parameters: + - name: id + in: query + style: form + explode: false + schema: + type: array + items: + type: integer + format: int64 + minimum: 1 + - name: leadUuid + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: rateTableUuid + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: createdAtMin + in: query + schema: + type: string + format: date-time + - name: createdAtMax + in: query + schema: + type: string + format: date-time + - name: createdBy + in: query + style: form + explode: false + schema: + type: array + items: + type: string + format: uuid + - name: limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + - name: offset + in: query + required: true + schema: + type: integer + format: int64 + minimum: 0 + - name: sortBy + in: query + schema: + $ref: '#/components/schemas/OfferDisplaySort' + - name: order + in: query + schema: + $ref: ../core/schemas/order.yml + responses: + '200': + description: Valid request + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OfferDisplay' + '400': + description: Missing required query parameter + content: + text/plain: + schema: + type: string + examples: + missingLimit: + summary: The request did not include a 'limit' query parameter + value: Query parameter 'limit' must be defined + missingOffset: + summary: The request did not include an 'offset' query parameter + value: Query parameter 'offset' must be defined + post: + summary: Record an offer display event + operationId: OfferDisplayController.create + tags: + - Offer Display + security: + - oauth: + - 'ui-event:write' + requestBody: + $ref: ./request-bodies/offerDisplay.yml + responses: + '201': + $ref: ./responses/offerDisplayCreated.yml + '400': + $ref: ./responses/invalidOfferDisplay.yml + '/offerDisplays/{id}': + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + get: + summary: Get a single offer display event + description: > + Returns the offer display event corresponding to the specified ID in the + URL path, if one exists. + operationId: OfferDisplayController.get + tags: + - Offer Display + security: + - oauth: + - 'ui-event:read' + responses: + '200': + description: Record found + content: + application/json: + schema: + $ref: ./schemas/offerDisplay.yml + '404': + description: ID not found + content: + text/plain: + schema: + type: string + /sessionInits: + post: + summary: Record the beginning of a new session + operationId: SessionInitController.create + tags: + - Session Init + security: + - oauth: + - 'ui-event:write' + requestBody: + $ref: ./request-bodies/sessionInit.yml + responses: + '201': + $ref: ./responses/sessionInitCreated.yml + '400': + $ref: ./responses/invalidSessionInit.yml diff --git a/Tests/Fixtures/acme/birch-catalog/user-experience/spec.yml b/Tests/Fixtures/acme/birch-catalog/user-experience/spec.yml new file mode 100644 index 0000000..17dee75 --- /dev/null +++ b/Tests/Fixtures/acme/birch-catalog/user-experience/spec.yml @@ -0,0 +1,2003 @@ +openapi: 3.0.3 +info: + title: User Experience API + version: 1.5.0 + description: > + # Overview + + + The User Experience API is centered around submitting a lead in exchange for + a rate + + table. + - **leads** combine information about a user with search criteria for + financial products + - **rate tables** are lists of offers corresponding to leads + + These resources are used to search for any type of financial product + + supported by the API, e.g. personal loans, savings accounts, credit cards, + + etc. + + + The firmness of an offer on a rate table - i.e., pre-approved or + + pre-qualified - can vary depending upon the information on a lead and the + + financial institution making the offer. + + + No fields on a lead are required, but depending on the type of financial + + product requested, you will only get firm offers if some subset of fields + + are specified. + + + A rate table might indicate that we're still awaiting responses from one + + or more financial instutions. In this case, the rate table should be + + reloaded until it indicates that we're no long awaiting responses. + + + # Blocking Rate Table Endpoint + + Clients have the option to request a rate table syncronously via the + + following blocking endpoint: + + + ``` + + POST https://integrations.example.com/blocking/leads/rateTables + + ``` + + + The interface is identical to that of + + `api.example.com/leads/rateTables`, but will only respond when all + + financial institution responses have been received. + + + As a consequence, the `pendingResponses` field on the rate table will + + always be empty, so there's no need to poll for more results. However, the + + response latency will likely be much higher than the asyncronous endpoint. + + + # Loans + + + To search for personal loans, you should set `productTypes` to `["loan"]` + + on the lead. In order to get pre-approved and pre-qualified offers, + + you should also include the following fields: + + + - `personalInformation.firstName` + + - `personalInformation.lastName` + + - `personalInformation.address1` + + - `personalInformation.address2` (when applicable) + + - `personalInformation.city` + + - `personalInformation.state` + + - `personalInformation.zipcode` + + - `personalInformation.email` + + - `personalInformation.primaryPhone` + + - `personalInformation.dateOfBirth` + + - `personalInformation.ssn` + + - `loanInformation.purpose` + + - `loanInformation.loanAmount` + + - `mortgageInformation.propertyStatus` + + - `creditInformation.providedCreditRating` or + `creditInformation.providedNumericCreditScore` + + - `financialInformation.employmentStatus` + + - `financialInformation.employmentPayFrequency` + + - `financialInformation.annualIncome` + + - `educationInformation.educationLevel` + + - `legalInformation.consentsToTcpa` + + - `legalInformation.consentsToFcra` + + - `legalInformation.tcpaLanguage` + + + + If you'd like to potentially also get offers for co-applicant loans, include + + the following fields: + + + - `coApplicantInformation.firstName` + + - `coApplicantInformation.lastName` + + - `coApplicantInformation.address1` + + - `coApplicantInformation.address2` (when applicable) + + - `coApplicantInformation.city` + + - `coApplicantInformation.state` + + - `coApplicantInformation.zipcode` + + - `coApplicantInformation.dateOfBirth` + + - `coApplicantInformation.annualIncome` + + + + **Example**: Search for personal loans + + + + _Request_ + + ``` + + POST /leads/rateTables + + + { + "productTypes": [ + "loan" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "dateOfBirth": "1993-10-09", + "ssn": "111-22-3333" + }, + "loanInformation": { + "purpose": "debt_consolidation", + "loanAmount": 10000 + }, + "mortgageInformation": { + "propertyStatus": "own_with_mortgage" + }, + "creditInformation": { + "providedCreditRating": "excellent" + }, + "financialInformation": { + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "annualIncome": 75000 + }, + "educationInformation": { + "educationLevel": "masters" + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "subId": [ + "aaa053cb" + ] + } + } + + ``` + + + + _Response_ + + ``` + + 200 OK + + + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [ + { + "uuid": "fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "originator": { + "key": "lending-club", + "name": "LendingClub", + "description": "Low fixed rate personal loans from $1,000 to $40,000", + "images": [ + { + "sizeKey": "150", + "url": "aff-tag.example.com/images/lendingclub/lendingclub_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + }, + "originatorId": null, + "termLength": 36, + "termUnit": "month", + "maxAmount": 12000, + "minAmount": 800, + "maxApr": 35.99, + "minApr": 25.01, + "meanApr": 30.5, + "feeRate": null, + "maxFeeRate": null, + "minFeeRate": null, + "feeFixed": null, + "maxFeeFixed": null, + "minFeeFixed": null, + "allowPrepayment": true, + "prepaymentFee": 0, + "monthlyPayment": 119.3, + "maxMonthlyPayment": 137.4, + "minMonthlyPayment": 119.3, + "meanMonthlyPayment": 128.18, + "maxTotalPayment": 4947, + "minTotalPayment": 4295, + "meanTotalPayment": 4615, + "terms": null, + "url": "https://offers.example.com/ref/fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "preQualified": false, + "preApproved": true, + "sponsored": false, + "aprType": "fixed", + "recommendationScore": 95 + }, + ... + ], + "specialOffers": [], + "savingsOffers": [], + "creditCardOffers": [], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Avant", + "description": "Personal loans from $1,000 to $35,000", + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget.", + "imageUrl": "https://images.example.com/old/images/avant/avant_120.png" + }, + "productTypes": [ + "loan" + ] + } + ], + "pendingOriginators": [ + { + "key": "avant", + "name": "Avant", + "description": "Personal loans from $1,000 to $35,000", + "images": [ + { + "sizeKey": "120", + "url": "aff-tag.example.com/images/avant/avant_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + } + ] + } + + ``` + + + # Student Loan Refinancing + + + Searching for student loan refinancing loans is just like searching for + + generic personal loans, but with some additional requirements: + + + - `productSubTypes` must be `["student_loan_refinance"]` + + - `loanInformation.purpose` must be `"student_loan_refi"` + + - `educationInformation.graduationDate` must be specified. + + - `financialInformation.monthlyHousingPayment` must be specified. + + - `financialInformation.availableAssets` must be specified. + + - `personalInformation.citizenshipStatus` must be specified. + + - `educationInformation.universityAttended` must be specified. This is a + + free form text field for the university name, which should be taken from + + the `GET /leads/universities` utility endpoint. + + - if `educationInformation.educationLevel` is `"doctorate"`, then + + `educationInformation.graduateDegreeType` must be specified. + + + _Request_ + + ``` + + POST /leads/rateTables + + + { + "productTypes": [ + "loan" + ], + "productSubTypes": [ + "student_loan_refinance" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10010", + "dateOfBirth": "1993-10-09", + "ssn": "111-22-3333", + "citizenshipStatus": "citizen" + }, + "loanInformation": { + "purpose": "student_loan_refi", + "loanAmount": 10000 + }, + "mortgageInformation": { + "propertyStatus": "own_with_mortgage" + }, + "creditInformation": { + "providedCreditRating": "excellent" + }, + "financialInformation": { + "annualIncome": 75000, + "availableAssets": 10000, + "employmentStatus": "employed", + "employmentPayFrequency": "weekly", + "monthlyHousingPayment": 1000 + }, + "educationInformation": { + "educationLevel": "doctorate", + "graduationDate": "1999-06-30", + "graduateDegreeType": "doctor_of_medicine", + "universityAttended": "New York University" + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "subId": [ + "aaa053cb" + ] + } + } + + ``` + + + _Response_ + + ``` + + 200 OK + + + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [ + { + "uuid": "fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "originator": { + "key": "lendKey", + "name": "Lend Key", + "description": "Low fixed rate personal loans from $1,000 to $40,000", + "images": [ + { + "sizeKey": "150", + "url": "aff-tag.example.com/images/lendKey/lendkey_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + }, + "originatorId": null, + "termLength": 36, + "termUnit": "month", + "maxAmount": 12000, + "minAmount": 800, + "maxApr": 35.99, + "minApr": 25.01, + "meanApr": 30.5, + "feeRate": null, + "maxFeeRate": null, + "minFeeRate": null, + "feeFixed": null, + "maxFeeFixed": null, + "minFeeFixed": null, + "allowPrepayment": true, + "prepaymentFee": 0, + "monthlyPayment": 119.3, + "maxMonthlyPayment": 137.4, + "minMonthlyPayment": 119.3, + "meanMonthlyPayment": 128.18, + "maxTotalPayment": 4947, + "minTotalPayment": 4295, + "meanTotalPayment": 4615, + "terms": null, + "url": "https://offers.example.com/ref/fef16e91-960f-4ac7-a8ec-98d7a6b32c7e", + "preQualified": false, + "preApproved": true, + "sponsored": false, + "aprType": "fixed", + "recommendationScore": 95 + }, + ... + ], + "specialOffers": [], + "savingsOffers": [], + "creditCardOffers": [], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "SoFi", + "description": "Personal loans from $1,000 to $35,000", + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget.", + "imageUrl": "https://images.example.com/old/images/sofi/sofi_120.png" + }, + "productTypes": [ + "loan" + ] + } + ], + "pendingOriginators": [ + { + "key": "sofi", + "name": "SoFi", + "description": "Personal loans from $1,000 to $35,000", + "images": [ + { + "sizeKey": "120", + "url": "aff-tag.example.com/images/sofi/sofi_120.png" + } + ], + "disclaimer": "Suspendisse rhoncus magna erat, nec rhoncus leo elementum eget." + } + ] + } + + ``` + + + # Savings + + + To search for savings accounts, you should set `productTypes` to + + `["savings"]` on the lead. To get the best matching offers, you should + + also specify the following fields: + + + - `personalInformation.zipcode` + + - `creditInformation.providedCreditRating` or + `creditInformation.providedNumericCreditScore` + + - `savingsInformation.minDepositAmount` + + + **Example**: Seach for savings accounts + + + + _Request_ + + ``` + + POST /leads/rateTables + + + { + "productTypes": [ + "savings" + ], + "personalInformation": { + "zipcode": "10010", + }, + "creditInformation": { + "providedCreditRating": "excellent" + }, + "savingsInformation": { + "minDepositAmount": 1000 + }, + "clientTags": { + "subId": [ + "3fdb9596" + ] + } + } + + ``` + + + _Response_ + + ``` + + 200 OK + + + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [], + "specialOffers": [], + "savingsOffers": [ + { + "uuid": "60a32cee-a5aa-4358-a5fe-f8070f8f2a14", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "savings", + "productSubType": "money_market_account", + "url": "https://dev-offers.example.com/ref/1ed2f58e-af3f-409e-a1e6-f7f00f18cd88", + "consumerRating": 80, + "details": { + "name": "Ally Bank", + "description": "Open an Account Today. Ally Bank, Member FDIC.", + "details": "", + "rate": 1.14, + "annualPercentYield": 1.15, + "compoundingMethod": "annually", + "introductoryPeriodMonths": 0, + "introductoryRate": 0, + "minimumDeposit": 0, + "minimumDepositWithFees": 0, + "monthlyFee": 0, + "checkWriting": false, + "effectiveAsOf": 1501113600000 + } + } + ], + "creditCardOffers": [], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Partner Bank 2", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/partnerBank2/partnerBank2Logo.png" + }, + "productTypes": [ + "savings" + ] + } + ], + "pendingOriginators": [] + } + + ``` + + + # Credit Cards + + + To search for credit cards, you should set `productTypes` to + + `["credit_card"]` on the lead. To get the best matching offers, you should + + also specify the following fields: + + + - `personalInformation.firstName` + + - `personalInformation.lastName` + + - `personalInformation.address1` + + - `personalInformation.address2` (when applicable) + + - `personalInformation.city` + + - `personalInformation.state` + + - `personalInformation.zipcode` + + - `personalInformation.email` + + - `personalInformation.dateOfBirth` + + - `creditInformation.providedCreditRating` or + `creditInformation.providedNumericCreditScore` + + - `creditCardInformation.cardPurposes` + + - `creditCardInformation.allowAnnualFee` + + - `legalInformation.consentsToFcra` + + - `legalInformation.consentsToTcpa` + + - `legalInformation.tcpaLanguage` + + + **Example**: Searching for credit cards + + + _Request_ + + ``` + + POST /leads/rateTables + + + { + "productTypes": [ + "credit_card" + ], + "personalInformation": { + "firstName": "John", + "lastName": "Doe", + "email": "john@example.com", + "city": "New York", + "state": "NY", + "primaryPhone": "2125556789", + "address1": "45 West 21st Street", + "address2": "5th Floor", + "zipcode": "10011", + "dateOfBirth": "1993-10-09" + }, + "creditCardInformation": { + "allowAnnualFee": true, + "cardPurposes": [ + "travel_incentives" + ] + }, + "creditInformation": { + "providedCreditRating": "excellent", + }, + "legalInformation": { + "consentsToFcra": true, + "consentsToTcpa": true, + "tcpaLanguage": "I agree to be contacted by Example Co and its partners at the telephone number(s) I have provided above to explore personal loan offers, including contact through automatic dialing systems, artificial or pre-recorded voice messaging, or text message. I understand my consent is not required as a condition to purchasing any goods or services from anyone." + }, + "clientTags": { + "subId": [ + "2ee169ef" + ] + } + } + + ``` + + + _Response_ + + ``` + + 200 OK + + + { + "uuid": "2c6cb6e4-0aa2-4ab5-9109-8679de537e10", + "leadUuid": "f823a7c0-586a-4fc3-9cfa-c38694b80b2c", + "loanOffers": [], + "specialOffers": [], + "savingsOffers": [], + "creditCardOffers": [ + { + "uuid": "6e6a6043-afaf-4c61-971b-a035282548f0", + "partner": { + "uuid": "f7df60e5-13c0-4241-aba0-61a8877e142f", + "name": "Partner Bank", + "description": "Partner Bank Description", + "disclaimer": "Partner Bank Disclaimer", + "supportsPersonalizedOffers": false, + "supportsPreSelect": false, + "imageUrl": "https://dev-admin.example.com/partner_image.gif" + }, + "marketplace": { + "uuid": "7a95da6d-2a03-4f58-beb0-d31eaddcfb15", + "name": "Marketplace", + "description": "Source of offers", + "disclaimer": "Source disclaimer", + "imageUrl": "https://dev-admin.example.com/marketplace_image.gif" + }, + "productType": "credit_card", + "productSubType": "credit_card", + "url": "https://dev-offers.example.com/ref/6bb3ed5c-f1d1-4c69-af1c-d02a4e028b3c", + "details": { + "cardName": "Credit Card", + "cardImageUrl": "https://example.com/image", + "cardPurposes": [ + "travel_incentives" + ], + "ratesUrl": "https://example.com/", + "maxPurchaseApr": 15, + "minPurchaseApr": 15, + "maxPurchaseIntroApr": 0, + "minPurchaseIntroApr": 0, + "purchaseIntroAprTerm": 12, + "purchaseIntroAprTermUnit": "month", + "maxCashAdvanceApr": 15, + "minCashAdvanceApr": 15, + "maxCashAdvanceIntroApr": 0, + "minCashAdvanceIntroApr": 0, + "cashAdvanceIntroAprTerm": 12, + "cashAdvanceIntroAprTermUnit": "month", + "maxBalanceTransferApr": 15, + "minBalanceTransferApr": 15, + "maxBalanceTransferIntroApr": 0, + "minBalanceTransferIntroApr": 0, + "balanceTransferIntroAprTerm": 12, + "balanceTransferIntroAprTermUnit": "month", + "annualFee": 100, + "annualIntroFee": 0, + "annualIntroFeeTerm": 1, + "details": [ + "Credit card detail" + ], + "additionalDetails": [ + "One click away credit card detail" + ], + "cardType": "visa", + "minimumCreditLine": 5000, + "minimumPenaltyApr": 10, + "maximumPenaltyApr": 10, + "balanceTransferFee": 25, + "cashAdvanceFee": 5, + "lateFee": 25, + "foreignExchangeFee": 10, + "accountOpeningFee": 0, + "returnPaymentFee": 0, + "monthlyServiceFee": 0, + "recommendedCreditRatings": [ + "good" + ], + "preQualified": false, + "preApproved": false, + "preSelected": false, + "aprType": "variable" + } + } + ], + "mortgageOffers": [], + "pendingResponses": [ + { + "partner": { + "uuid": "91d08be0-2a8c-4d28-b399-7e1b38e2522e", + "name": "Partner Bank 2", + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + "disclaimer": "Cras vestibulum diam sed tempor sagittis.", + "imageUrl": "https://images.example.com/partnerBank2/partnerBank2Logo.png" + }, + "productTypes": [ + "credit_card" + ] + } + ], + "pendingOriginators": [] + } + + ``` +servers: + - url: 'https://api.example.com' +components: + securitySchemes: + api-auth: + type: oauth2 + description: > + All requests to the Even API are authenticated using a bearer token + + specified in the `Authorization` header. + + + The bearer token corresponds to an access token record, and consists of + + two UUIDs joined by an underscore: + 1. the access token's unique identifier + 2. the access token's secret, which is only available upon access token + creation + + The header value is prefixed with the string "Bearer ", so a properly + + authenticated request will have a header that looks something like this: + + + ``` + + Authorization: Bearer + 0a930e7f-4a96-4388-8c12-c794a161084e_409cc5f2-4008-42aa-84a4-0b68f163f437 + + ``` + + + Requests are authorized using scopes that are associated with the access + + token. Each endpoint defines the scopes required to authorize a request. + flows: + clientCredentials: + tokenUrl: /auth/accessTokens + scopes: + 'analytics:report:read': | + Read data from analytics endpoints. + 'originator:rateTables:read': | + Read rate tables. + 'svc-lead:leads:insert': | + Submit leads. + 'svc-lead:leads:insert-test': > + Any lead submitted using an access token with this scope will be + designated a test lead. + 'svc-lead:leads:readRestricted': | + Read leads. + 'ui-event:write': | + Record UI events. + schemas: + AggregatedSpending: + $ref: ../offer-augmentation/schemas/aggregatedSpending.yml + AnalyticsEventType: + $ref: ../analytics/schemas/eventType.yml + AnalyticsOfferProductType: + $ref: ../analytics/schemas/offerProductType.yml + ApiError: + $ref: ../core/schemas/apiError.yml + ApiErrorDetails: + $ref: ../core/schemas/apiErrorDetails.yml + AprType: + $ref: ../originator/schemas/aprType.yml + BankAccountType: + $ref: ../lead/schemas/bankAccountType.yml + BonusPersonalization: + $ref: ../offer-augmentation/schemas/bonusPersonalization.yml + CardBenefit: + $ref: ../lead/schemas/cardBenefits.yml + CardLevelEarningScheme: + $ref: ../offer-augmentation/schemas/earningBonus.yml + CardLevelEarningSchemeName: + $ref: ../offer-augmentation/schemas/earningBonusName.yml + CardLevelEarningSchemeType: + $ref: ../offer-augmentation/schemas/earningBonusType.yml + CardPurpose: + $ref: ../lead/schemas/cardPurposes.yml + CardType: + $ref: ../originator/schemas/cardType.yml + CitizenshipStatus: + $ref: ../lead/schemas/citizenshipStatus.yml + CompoundingMethod: + $ref: ../originator/schemas/compoundingMethod.yml + CreditCardOffer: + $ref: ../originator/schemas/creditCardOffer.yml + CreditCardOfferDetails: + $ref: ../originator/schemas/creditCardOfferDetails.yml + ClientTags: + $ref: ../lead/schemas/clientTags.yml + EarningGroup: + $ref: ../offer-augmentation/schemas/earningGroup.yml + EarningItem: + $ref: ../offer-augmentation/schemas/earningItem.yml + EarningItemCategory: + $ref: ../offer-augmentation/schemas/category.yml + EarningItemMerchant: + $ref: ../offer-augmentation/schemas/merchant.yml + EarningItemType: + $ref: ../offer-augmentation/schemas/earningItemType.yml + EarningItemPersonalization: + $ref: ../offer-augmentation/schemas/earningItemPersonalization.yml + EarningProgram: + $ref: ../offer-augmentation/schemas/earningProgram.yml + EarningProgramPersonalization: + $ref: ../offer-augmentation/schemas/earningProgramPersonalization.yml + EducationLevel: + $ref: ../lead/schemas/educationLevel.yml + EmploymentPayFrequency: + $ref: ../lead/schemas/employmentPayFrequency.yml + EmploymentStatus: + $ref: ../lead/schemas/employmentStatus.yml + FeaturedFinancialInstitution: + $ref: ../partner-data/schemas/featuredFinancialInstitution.yml + IdType: + $ref: ../lead/schemas/idType.yml + GraduateDegreeType: + $ref: ../lead/schemas/graduateDegreeType.yml + Gender: + $ref: ../lead/schemas/gender.yml + IntroOfferType: + $ref: ../originator/schemas/introOfferType.yml + IpAddress: + $ref: ../core/schemas/ipAddress.yml + Lead: + $ref: ../lead/schemas/leadResponseJson.yml + LeadBestTimeToCall: + $ref: ../lead/schemas/bestTimeToCall.yml + LeadCoApplicantInformation: + $ref: ../lead/schemas/coApplicantInformation.yml + LeadCreditInformation: + $ref: ../lead/schemas/creditInformation.yml + LeadCreditCardInformation: + $ref: ../lead/schemas/creditCardInformation.yml + LeadEducationInformation: + $ref: ../lead/schemas/educationInformation.yml + LeadEducationLevel: + $ref: ../lead/schemas/educationLevel.yml + LeadEmploymentInformation: + $ref: ../lead/schemas/employmentInformation.yml + LeadFinancialInformation: + $ref: ../lead/schemas/financialInformation.yml + LeadHealthInformation: + $ref: ../lead/schemas/healthInformation.yml + LeadIdentificationInformation: + $ref: ../lead/schemas/identificationInformation.yml + LeadLegalInformation: + $ref: ../lead/schemas/legalInformation.yml + LeadLifeInsuranceInformation: + $ref: ../lead/schemas/lifeInsuranceInformation.yml + LeadLoanInformation: + $ref: ../lead/schemas/loanInformation.yml + LeadMortgageInformation: + $ref: ../lead/schemas/mortgageInformation.yml + LeadPersonalInformation: + $ref: ../lead/schemas/personalInformation.yml + LeadSavingsInformation: + $ref: ../lead/schemas/savingsInformation.yml + LeadSessionInformation: + $ref: ../lead/schemas/sessionInformation.yml + LeadAction: + $ref: ../lead/schemas/leadActionResponse.yml + LeadActionType: + $ref: ../lead/schemas/leadActionType.yml + LeadEvent: + $ref: ../analytics/schemas/leadEvent.yml + LeadUuid: + $ref: ../lead/schemas/leadUuid.yml + LeadRequest: + $ref: ../lead/schemas/leadRequestJson.yml + LoanOffer: + $ref: ../originator/schemas/loanOfferPublic.yml + LoanPurpose: + $ref: ../lead/schemas/purpose.yml + MortgageAdjustmentType: + $ref: ../originator/schemas/adjustmentType.yml + MortgageLoanType: + $ref: ../originator/schemas/mortgageLoanType.yml + MortgageOffer: + $ref: ../originator/schemas/mortgageOffer.yml + MortgageOfferDetails: + $ref: ../originator/schemas/mortgageOfferDetails.yml + MortgageType: + $ref: ../lead/schemas/mortgageType.yml + OccupancyType: + $ref: ../lead/schemas/occupancyType.yml + Offer: + $ref: ../originator/schemas/offer.yml + OfferCalculation: + $ref: ../offer-augmentation/schemas/offerCalculation.yml + OfferDisplay: + $ref: ../ui-event/schemas/offerDisplay.yml + OfferFirmness: + $ref: ../analytics/schemas/offerFirmness.yml + Originator: + $ref: ../originator/schemas/originator.yml + OriginatorImage: + $ref: ../originator/schemas/originatorImage.yml + Partner: + $ref: ../originator/schemas/demandPartner.yml + PlaidAssetReportToken: + $ref: ../offer-augmentation/schemas/plaidAssetReportToken.yml + PendingResponse: + $ref: ../originator/schemas/pendingResponse.yml + PersonalReferenceInformation: + $ref: ../lead/schemas/personalReferenceInformation.yml + PersonalReferenceRelationType: + $ref: ../lead/schemas/personalReferenceRelationType.yml + PreferredRedemptionType: + $ref: ../offer-augmentation/schemas/preferredRedemptionType.yml + ProductType: + $ref: ../core/schemas/productType.yml + ProductSubType: + $ref: ../lead/schemas/productSubType.yml + ProvidedCreditRating: + $ref: ../lead/schemas/providedCreditRating.yml + PropertyStatus: + $ref: ../lead/schemas/propertyStatus.yml + PropertySearchStatus: + $ref: ../lead/schemas/propertySearchStatus.yml + PropertyType: + $ref: ../lead/schemas/propertyType.yml + PurchaseStatus: + $ref: ../lead/schemas/purchaseStatus.yml + RateTable: + $ref: ../originator/schemas/rateTablePublic.yml + RefinanceLoanInformation: + $ref: ../lead/schemas/refinanceLoanInformation.yml + RefinanceLoanType: + $ref: ../lead/schemas/refinanceLoanType.yml + RefinanceType: + $ref: ../lead/schemas/refinanceType.yml + RejectReason: + $ref: ../lead/schemas/rejectReason.yml + RevenueSummary: + $ref: ../analytics/schemas/revenueSummary.yml + RevenueSummaryGrouping: + $ref: ../analytics/schemas/revenueSummaryGrouping.yml + RevenueType: + $ref: ../analytics/schemas/revenueType.yml + RedemptionType: + $ref: ../offer-augmentation/schemas/redemptionType.yml + RewardValueCalculation: + $ref: ../offer-augmentation/schemas/rewardValueCalculation.yml + SavingsOffer: + $ref: ../originator/schemas/savingsOffer.yml + SavingsOfferDetails: + $ref: ../originator/schemas/savingsOfferDetails.yml + SessionInit: + $ref: ../ui-event/schemas/sessionInit.yml + SessionInitNew: + $ref: ../ui-event/schemas/newSessionInit.yml + SpecialOffer: + $ref: ../originator/schemas/specialOfferPublic.yml + SpendingAggregate: + $ref: ../offer-augmentation/schemas/aggregates.yml + SpendingAggregateUnit: + $ref: ../offer-augmentation/schemas/spendingAggregateUnit.yml + SpendingCategory: + $ref: ../offer-augmentation/schemas/spendingCategory.yml + State: + $ref: ../core/schemas/state-lead.yml + TermUnit: + $ref: ../originator/schemas/termUnit.yml + TransactionLevelEarningScheme: + $ref: ../offer-augmentation/schemas/earningContext.yml + TransactionLevelEarningSchemeType: + $ref: ../offer-augmentation/schemas/earningContextType.yml +tags: + - name: Lead / Rate Table + - name: Offer Preview + - name: Offer Augmentation + description: | + _The Offer Augmentation API is in **Beta**_ + - name: UI Events + - name: UI Utils + - name: Analytics + description: | + _The Analytics API is in **Beta**_ +paths: + /leads: + post: + summary: Submit a lead + operationId: createLead + tags: + - Lead / Rate Table + requestBody: + description: A Lead object + required: true + content: + application/json: + schema: + $ref: ../lead/schemas/leadRequestJson.yml + examples: + rateTable: + $ref: ../lead/examples/creditCardLead.yml + responses: + '200': + $ref: ../lead/responses/leadCreated.yml + '400': + $ref: ../lead/responses/invalidLead.yml + security: + - api-auth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + '/leads/{uuid}': + parameters: + - name: uuid + in: path + required: true + schema: + type: string + format: uuid + get: + summary: Get a lead + description: >- + Return a `Lead` given its UUID. Depending on the access token scope, the + response may contain a subset of a `Lead` object. + operationId: getLead + tags: + - Lead / Rate Table + responses: + '200': + $ref: ../lead/responses/leadFound.yml + '400': + $ref: ../lead/responses/invalidLeadUuid.yml + '404': + description: '`Lead` with the given UUID does not exist' + security: + - api-auth: + - 'svc-lead:leads:readRestricted' + '/originator/rateTables/{uuid}': + parameters: + - name: uuid + in: path + required: true + schema: + type: string + format: uuid + get: + summary: Get a rate table + description: Return a `RateTable` given its UUID + operationId: getRateTable + tags: + - Lead / Rate Table + responses: + '200': + description: Succesfully retrieved rate table + content: + application/json: + schema: + $ref: ../originator/schemas/rateTablePublic.yml + examples: + rateTable: + $ref: ../originator/examples/creditCardRateTable.yml + '400': + description: Invalid UUID + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + example: + - message: >- + Cannot parse parameter uuid as UUID: Invalid UUID string: + 123 + '404': + description: '`RateTable` with the given UUID does not exist' + security: + - api-auth: + - 'originator:rateTables:read' + /leads/rateTables: + post: + summary: Submit a lead and get a rate table + description: >- + A shorthand operation for `POST /leads` followed by a `POST + /originator/rateTables`. The response `RateTable` must still be queried + until there are no more `pendingResponses` + operationId: createRateTable + tags: + - Lead / Rate Table + requestBody: + description: A Lead object + required: true + content: + application/json: + schema: + $ref: ../lead/schemas/leadRequestJson.yml + examples: + rateTable: + $ref: ../lead/examples/creditCardLead.yml + responses: + '200': + description: Succesfully created rate table + content: + application/json: + schema: + $ref: ../originator/schemas/rateTablePublic.yml + examples: + rateTable: + $ref: ../originator/examples/creditCardRateTable.yml + '400': + description: Bad Request + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + security: + - api-auth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + /offerPreview/loanOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + operationId: getPreviewLoanOffers + tags: + - Offer Preview + summary: Get loan preview offers + description: Get loan preview offers + security: + - api-auth: + - 'originator:rateTables:read' + parameters: + - name: loanAmount + in: query + required: false + schema: + type: integer + format: int32 + - name: providedCreditRating + in: query + required: false + schema: + $ref: ../lead/schemas/providedCreditRating.yml + - name: loanPurpose + in: query + required: false + schema: + $ref: ../lead/schemas/purpose.yml + - name: zipCode + in: query + required: false + schema: + type: string + responses: + '200': + description: array of loan offers + content: + application/json: + schema: + type: array + items: + $ref: ../originator/schemas/loanOfferPublic.yml + /offerPreview/creditCardOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get credit card preview offers + description: Get credit card preview offers + operationId: getPreviewCreditCardOffers + tags: + - Offer Preview + security: + - api-auth: + - 'originator:rateTables:read' + parameters: + - name: providedCreditRating + in: query + required: false + schema: + $ref: ../lead/schemas/providedCreditRating.yml + - name: zipCode + in: query + required: false + schema: + type: string + - name: cardPurposes + in: query + required: false + schema: + $ref: ../lead/schemas/cardPurposes.yml + responses: + '200': + description: array of credit card offers + content: + application/json: + schema: + type: array + items: + $ref: ../originator/schemas/creditCardOffer.yml + /offerPreview/savingsOffers: + get: + x-lint-skip: + - index-endpoint-has-limit + operationId: getPreviewSavingsOffers + summary: Get savings preview offers + description: Get savings preview offers + tags: + - Offer Preview + security: + - api-auth: + - 'originator:rateTables:read' + parameters: + - name: maxDepositAmount + in: query + required: false + schema: + type: number + format: int64 + - name: minDepositAmount + in: query + required: false + schema: + type: number + format: int64 + - name: zipCode + in: query + required: false + schema: + type: string + responses: + '200': + description: array of savings offers + content: + application/json: + schema: + type: array + items: + $ref: ../originator/schemas/savingsOffer.yml + /uiEvent/sessionInits: + post: + summary: Record the beginning of a new session + description: | + Records that a user has begun a new session. A session can be any + extended interaction with the Even API by an individual user. + + The most common use case is to initiate a session when a user lands on + a financial offer search experience. You can either supply `sessionUuid` + in the request body, or submit an empty body and one will be generated + for you. In either case, the returned `sessionUuid` should be included + in the lead body of subsequent rate table requests. + operationId: createSessionInit + tags: + - UI Events + requestBody: + $ref: ../ui-event/request-bodies/sessionInit.yml + responses: + '201': + $ref: ../ui-event/responses/sessionInitCreated.yml + '400': + $ref: ../ui-event/responses/invalidSessionInit.yml + security: + - api-auth: + - 'ui-event:write' + /uiEvent/offerDisplays: + post: + summary: Record an offer display + description: > + Records that an offer was displayed to a user. + + + You can also use a pixel to record this event, by rendering an `img` + + tag in the DOM alongside the offer, where the `src` URL follows this + + pattern: + + ``` + + /uiEvent/offerDisplays/{leadUuid}/{rateTableUuid}/{offerUuid}/pixel.gif + + ``` + + + So, for example: + + ```html + + + + ``` + + + The URL will always respond successfully with a transparent 1x1 GIF. + operationId: createOfferDisplay + tags: + - UI Events + requestBody: + $ref: ../ui-event/request-bodies/offerDisplay.yml + responses: + '201': + $ref: ../ui-event/responses/offerDisplayCreated.yml + '400': + $ref: ../ui-event/responses/invalidOfferDisplay.yml + security: + - api-auth: + - 'ui-event:write' + /leads/universities: + get: + summary: Get university names + description: >- + Returns a list of possible university names for use in a lead's + `educationInformation.universityAttened` field given a user input + fragment. + operationId: getUniversities + tags: + - UI Utils + parameters: + - $ref: ../lead/parameters/universityName.yml + - $ref: ../core/parameters/offset.yml + - $ref: ../core/parameters/limit.yml + responses: + '200': + description: >- + A list of completion suggestions for a full supported university + name + content: + application/json: + schema: + type: array + items: + type: string + examples: + with-name-johns: + value: + - Johns Hopkins University + - Johns Hopkins University - Carey Business School + - >- + Johns Hopkins University - Paul Nifle School of Advanced + International Studies + - Johns Hopkins University - Peabody Conservatory of Music + - Johns Hopkins University - School of Arts & Science + - Johns Hopkins University - School of Medicine + - Johns Hopkins University - School of Nursing + - Johns Hopkins University - School of Public Health + - Johns Hopkins University - SPSBE + - Saint Johns University + - 'Cornell University Johnson, MBA' + - Johnson College + - Johnson County Community College + - Johnson University + - Johnson & Wales University + - >- + Northern Vermont University - Johnson (FKA Johnson State + College + Lyndon State College) + - >- + Northern Vermont University - Lyndon (FKA Lyndon State + College + Johnson State College) + - University of Pittsburgh - Johnstown + security: + - api-auth: + - 'svc-lead:leads:insert' + - 'svc-lead:leads:insert-test' + /offerAugmentation/rewardValueCalculations: + post: + summary: Calculate rewards values + description: > + For a rate table, will calculate the expected reward value for each + credit card offer, based upon specified spending habits and preferred + redemption types. + + + For non-credit-card offers, the `rewardValue` will always be `null`. + operationId: createRewardValueCalculation + tags: + - Offer Augmentation + requestBody: + $ref: ../offer-augmentation/request-bodies/createRewardValueCalculation.yml + responses: + '200': + $ref: ../offer-augmentation/responses/rewardValueCalculationCreated.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + $ref: ../core/examples/error/missingAccessToken.yml + /offerAugmentation/spendingCategories: + get: + summary: Get spending categories + description: > + Returns a list of spending categories to use when calculating reward + values for a rate table. + operationId: getSpendingCategories + tags: + - Offer Augmentation + responses: + '200': + description: Successfully returned spending categories + content: + application/json: + schema: + type: array + items: + $ref: ../offer-augmentation/schemas/spendingCategory.yml + examples: + listOfSpendingCategories: + $ref: ../offer-augmentation/examples/spendingCategories.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + $ref: ../core/examples/error/missingAccessToken.yml + /offerAugmentation/redemptionTypes: + get: + summary: Get redemption types + description: > + Returns a list of redemption types for use when calculating reward + values for a rate table. + operationId: getRedemptionTypes + tags: + - Offer Augmentation + responses: + '200': + description: Successfully returned redemption types + content: + application/json: + schema: + type: array + items: + $ref: ../offer-augmentation/schemas/redemptionType.yml + examples: + listOfRedemptionTypes: + $ref: ../offer-augmentation/examples/redemptionTypes.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + $ref: ../core/examples/error/missingAccessToken.yml + /offerAugmentation/plaidAssetReportTokens: + post: + summary: Add Plaid asset report token to lead + description: | + Associated a Plaid asset report token with a lead. This will be used by + the `POST /offerAugmentation/rewardValueCalculations` endpoint to + perform the calculation. + operationId: createPlaidAssetReportToken + tags: + - Offer Augmentation + requestBody: + $ref: ../offer-augmentation/request-bodies/createPlaidAssetReportToken.yml + responses: + '200': + $ref: ../offer-augmentation/responses/plaidAssetReportTokenCreated.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + $ref: ../core/examples/error/missingAccessToken.yml + '422': + description: Token already associated with lead + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + $ref: >- + ../offer-augmentation/examples/errors/tokenAlreadyAssociatedWithLead.yml + /analytics/leadEvents: + get: + summary: Get lead events + description: > + A variety of event types can be associated with a lead, including: + - user actions in your experience + - user actions in a financial institution's experience + - API responses from an FI + - FI decisioning results + + This endpoint provides access to these events for analysis. There are + two common way to use this: + 1. **Get events for a lead** by making the following request, for + example: + ``` + GET /analytics/leadEvents?leadUuid=9cc5ef55-4b9f-4c9d-ba52-cf96c9ad957e&limit=1 + ``` + 2. **Stream all events** by making paginated requests. The first of + these requests would be: + ``` + GET /analytics/leadEvents?limit=1000 + ``` + Events will always be returned in ascending `eventCreatedAt` order. + Take the `eventCreatedAt` of the last record of the result set to + form the request for the next page: + ``` + GET /analytics/leadEvents?eventCreatedAtMin=2019-11-19T16:38:47Z&limit=1000 + ``` + And repeat until there are no more events. This method will + guarantee at least once delivery, so event processing must be + idempotent. + operationId: getLeadEvents + tags: + - Analytics + parameters: + - name: id + in: query + description: > + The unique identifiers of events that should be included in the + result set + schema: + type: array + items: + type: string + style: form + explode: false + - name: leadUuid + in: query + description: > + The UUIDs of the leads whose events should be included in the result + set + schema: + type: array + items: + type: string + format: uuid + style: form + explode: false + - name: eventType + in: query + description: | + The event types that should be included in the result set + schema: + type: array + items: + $ref: ../analytics/schemas/eventType.yml + style: form + explode: false + - name: leadCreatedAtMin + in: query + description: > + The minimum `leadCreatedAt` (inclusive) for events that should be + included in the result set + schema: + type: string + format: date-time + - name: leadCreatedAtMax + in: query + description: > + The maximum `leadCreatedAt` (inclusive) for events that should be + included in the result set + schema: + type: string + format: date-time + - name: eventCreatedAtMin + in: query + description: > + The minimum `eventCreatedAt` (inclusive) for events that should be + included in the result set + schema: + type: string + format: date-time + - name: eventCreatedAtMax + in: query + description: > + The maximum `eventCreatedAt` (inclusive) for events that should be + included in the result set + schema: + type: string + format: date-time + - name: offerProductType + in: query + description: > + The offer product types of events that should be included in the + result set + schema: + $ref: ../analytics/schemas/offerProductType.yml + - name: clientTag + in: query + description: > + The value of a client tag on leads that should be included in the + result set + schema: + $ref: ../lead/schemas/clientTags.yml + style: form + - name: limit + in: query + required: true + description: | + The maximum number of records to return + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + responses: + '200': + description: Successfully returned records + content: + application/json: + schema: + $ref: ../analytics/schemas/leadEvent.yml + examples: + apiApproved: + $ref: ../analytics/examples/apiApprovedLeadEvent.yml + offerClicked: + $ref: ../analytics/examples/offerClickedLeadEvent.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + summary: access token was not specified + value: + - message: Access token is missing + missingScopes: + summary: access token is not authorized + value: + - message: Access token is missing + '422': + description: Invalid query parameters + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingLimit: + summary: limit was not specified + value: + - attribute: limit + type: missing + message: limit must be specified + malformedLeadUuid: + summary: leadUuid was malformed + value: + - attribute: leadUuid + type: notUuid + message: 'leadUuid must be uuid, but is 123' + security: + - api-auth: + - 'svc-lead:leads:readRestricted' + /analytics/revenueSummaries: + get: + x-lint-skip: + - index-endpoint-has-limit + summary: Get revenue summaries + description: > + Provides historical revenue statistics and funnel performance. The + metrics returned are aggregated either by a time period (e.g. day, week + or month) and or lead attributes such as credit rating, loan purpose or + referral URL. + + + For each aggregated group, the result includes the number of leads, + submitted applications, funded applications, along with the amount of + revenue. Either attributed or booked revenue is supported. + + + For example, to get attributed monthly revenue, grouped by credit rating + for Q1 of 2019, make the following request: + ``` + GET /analytics/revenueSummaries?groupBy=creditRating&minTime=2019-01-01&maxTime=2019-03-31&revenueType=attributed + ``` + operationId: getRevenueSummaries + tags: + - Analytics + parameters: + - name: revenueType + in: query + description: > + There are two dates associated with revenue: + * the `attributed` date is when the lead associated with the + revenue was added to the system + * the `booked` date corresponds to the event that triggered + the revenue, e.g. when a loan is funded + + + The `minDate` and `maxDate` parameters will filter against the + specified date type. If none is specified, then the default is + `attributed`. + + + Also, the results will only include a `totalAttributedRevenue` field + if `revenueType` is `attributed`, and will only include + `totalBookedRevenue` and `totalUnattributedRevenue` if it's + `booked`. + schema: + type: array + items: + $ref: ../analytics/schemas/revenueType.yml + - name: minDate + in: query + description: > + Results will only represent revenue either booked or attributed on + or after this date, if specified. If not specified, defaults to 30 + days ago. Date format must be `YYYY-MM-DD`. + schema: + type: string + format: date + - name: maxDate + in: query + description: > + Results will only represent revenue either booked or attributed on + or before this date, if specified. If not specified, defaults to + today. Date format must be `YYYY-MM-DD`. + schema: + type: string + format: date + - name: groupBy + in: query + description: > + The results can be aggregated by only one field at a time. If + multiple values are specified, then the first value will be used. If + none is specified, then the default is `day`. Time range grouping + (i.e., one of `day`, `week` or `month`) will use the create time for + the lead. + + + The `creditRating`, `loanPurpose`, and `referralUrl` fields in the + response body will not show up in the results unless explicitly + aggregated on. Similarly `leadCreatedAtMin` and `leadCreatedAtMax` + will not show unless grouped by time range. + + + If the `clientTag` query parameter is specified, then any value + specified here will be ignored. + schema: + type: array + items: + $ref: ../analytics/schemas/revenueSummaryGrouping.yml + - name: clientTagKey + in: query + description: > + Results will only represent leads that have a client tag with the + specified key. If specified, the results will be grouped by the + distinct values of the client tag. Consequently, anything specified + by the `groupBy` parameter will be ignored. + schema: + $ref: ../lead/schemas/clientTags.yml + style: form + - name: subAccountUuid + in: query + description: > + Results will only represent leads that belong to the sub-account + corresponding to the specified UUID. + schema: + type: string + format: uuid + explode: false + - name: companyUuid + in: query + description: > + Results will only represent leads that are affiliated with a + specific company, which itself may have one or more sub accounts. + For internal use only. For internal users, this is absolutely + required. + schema: + type: string + format: uuid + explode: false + responses: + '200': + description: Successfully returned records + content: + application/json: + schema: + type: array + items: + $ref: ../analytics/schemas/revenueSummary.yml + examples: + monthlyReport: + summary: Revenue by month + $ref: ../analytics/examples/revenueSummaryResponse.yml + '401': + description: Not authorized + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + missingAccessToken: + summary: access token was not specified + value: + - message: Access token is missing + missingScopes: + summary: access token is not authorized + value: + - message: Access token is missing + '422': + description: Invalid query parameters + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml + examples: + badGroupBy: + summary: groupBy clause is invalid + value: + - attribute: groupBy + type: notInEnum + message: >- + groupBy must be one of "day", "week", "month", + "creditRating", "loanPurpose", but is "year" + details: + specified: year + enum: + - day + - week + - month + - creditRating + - loanPurpose + security: + - api-auth: + - 'analytics:report:read' + /uiUtil/featuredFinancialInstitutions: + x-implemented-by: + service: partner-data + path: /userExperience/featuredFinancialInstitutions + get: + summary: Get a list of featured financial institutions + description: > + Returns a list of selected financial institution logos, in the preferred + order, to be used for display on the initial page of a UX, before the + user enters their information. + operationId: getFeaturedFinancialInstitutions + tags: + - UI Utils + responses: + '200': + description: The featured financial institutions belonging to the channel partner + content: + application/json: + schema: + type: array + items: + $ref: ../partner-data/schemas/featuredFinancialInstitution.yml + '400': + description: Invalid request provided + content: + application/json: + schema: + type: array + items: + $ref: ../core/schemas/apiError.yml