-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into 186506126_create_monitored_event
- Loading branch information
Showing
26 changed files
with
1,006 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
lib/aca_entities/fdsh/vlp/rx142/close_case/array_of_error_response_metadata.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp ArrayOfErrorResponseMetadata | ||
class ArrayOfErrorResponseMetadata < Dry::Struct | ||
attribute :ErrorResponseMetadatas, Types::Array.of(Fdsh::Vlp::Rx142::CloseCase::ErrorResponseMetadata).meta(omittable: false) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
lib/aca_entities/fdsh/vlp/rx142/close_case/close_case_request.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp CloseCaseRequest | ||
class CloseCaseRequest < Dry::Struct | ||
attribute :CaseNumber, Types::Strict::String.meta(omittable: false) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
lib/aca_entities/fdsh/vlp/rx142/close_case/close_case_response.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp CloseCaseResponse | ||
class CloseCaseResponse < Dry::Struct | ||
attribute :ResponseMetadata, Fdsh::Vlp::Rx142::CloseCase::ResponseMetadata.meta(omittable: false) | ||
attribute :ArrayOfErrorResponseMetadata, Fdsh::Vlp::Rx142::CloseCase::ArrayOfErrorResponseMetadata.optional.meta(omittable: false) | ||
attribute :CloseCaseResponseSet, Fdsh::Vlp::Rx142::CloseCase::CloseCaseResponseSet.optional.meta(omittable: false) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
lib/aca_entities/fdsh/vlp/rx142/close_case/close_case_response_set.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp CloseCaseResponseSet | ||
class CloseCaseResponseSet < Dry::Struct | ||
attribute :WebServSftwrVer, Types::Strict::String.meta(omittable: false) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
...entities/fdsh/vlp/rx142/close_case/contracts/array_of_error_response_metadata_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# Contract for Fdsh Vlp ResponseMetadata | ||
class ArrayOfErrorResponseMetadataContract < Dry::Validation::Contract | ||
params do | ||
required(:ErrorResponseMetadatas).array(Fdsh::Vlp::Rx142::CloseCase::Contracts::ErrorResponseMetadataContract.params) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
27 changes: 27 additions & 0 deletions
27
lib/aca_entities/fdsh/vlp/rx142/close_case/contracts/close_case_request_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# FDSH schema and validation rules for {AcaEntities::Fdsh::Person::PersonName} | ||
class CloseCaseRequestContract < Dry::Validation::Contract | ||
# @!method call(opts) | ||
# @param opts [Hash] the parameters to validate using this contract | ||
# @option opts [RequestIDType] :request_id A requester-assigned numeric ID that uniquely identifies the request | ||
# @option opts [AcaEntities::Fdsh::Person::PersonName] :person_name Applicant's full name | ||
# @option opts [FullyRestrictedSSNType] :identification_id Applicant last name | ||
# @option opts [TaxFilerCategoryCodeType] :tax_filer_category_code Applicant's income tax filing role | ||
# @return [Dry::Monads::Result] | ||
params do | ||
required(:CaseNumber).filled(:string) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
24 changes: 24 additions & 0 deletions
24
lib/aca_entities/fdsh/vlp/rx142/close_case/contracts/close_case_response_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# FDSH schema and validation rules for {AcaEntities::Fdsh::Person::PersonName} | ||
class CloseCaseResponseContract < Dry::Validation::Contract | ||
|
||
params do | ||
required(:ResponseMetadata).filled(Fdsh::Vlp::Rx142::CloseCase::Contracts::ResponseMetadataContract.params) | ||
|
||
optional(:ArrayOfErrorResponseMetadata).filled(Fdsh::Vlp::Rx142::CloseCase::Contracts::ArrayOfErrorResponseMetadataContract.params) | ||
optional(:CloseCaseResponseSet).filled(Fdsh::Vlp::Rx142::CloseCase::Contracts::CloseCaseResponseSetContract.params) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
lib/aca_entities/fdsh/vlp/rx142/close_case/contracts/close_case_response_set_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# Contract for Fdsh Vlp ResponseMetadata | ||
class CloseCaseResponseSetContract < Dry::Validation::Contract | ||
params do | ||
required(:WebServSftwrVer).filled(:string) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
lib/aca_entities/fdsh/vlp/rx142/close_case/contracts/error_response_metadata_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# Contract for Fdsh Vlp ResponseMetadata | ||
class ErrorResponseMetadataContract < Dry::Validation::Contract | ||
params do | ||
required(:ErrorResponseCode).filled(:string) | ||
required(:ErrorResponseDescriptionText).filled(:string) | ||
optional(:ErrorTdsResponseDescriptionText).maybe(:string) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
lib/aca_entities/fdsh/vlp/rx142/close_case/contracts/response_metadata_contract.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Contracts | ||
# Contract for Fdsh Vlp ResponseMetadata | ||
class ResponseMetadataContract < Dry::Validation::Contract | ||
params do | ||
required(:ResponseCode).filled(:string) | ||
required(:ResponseDescriptionText).filled(:string) | ||
optional(:TdsResponseDescriptionText).maybe(:string) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
lib/aca_entities/fdsh/vlp/rx142/close_case/error_response_metadata.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp ErrorResponseMetadata | ||
class ErrorResponseMetadata < Dry::Struct | ||
|
||
attribute :ErrorResponseCode, Types::Strict::String.meta(omittable: false) | ||
attribute :ErrorResponseDescriptionText, Types::Strict::String.meta(omittable: false) | ||
attribute :ErrorTDSResponseDescriptionText, Types::String.optional.meta(omittable: true) | ||
|
||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
36 changes: 36 additions & 0 deletions
36
lib/aca_entities/fdsh/vlp/rx142/close_case/operations/verify_close_case_request.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
module Operations | ||
# convert person entity to initial request | ||
class VerifyCloseCaseRequest | ||
include Dry::Monads[:result, :do, :try] | ||
|
||
def call(payload) | ||
validated_payload = yield validate_payload(payload) | ||
request_entity = yield close_case_request_entity(validated_payload) | ||
|
||
Success(request_entity) | ||
end | ||
|
||
private | ||
|
||
def validate_payload(payload) | ||
result = AcaEntities::Fdsh::Vlp::Rx142::CloseCase::Contracts::CloseCaseRequestContract.new.call(payload) | ||
result.success? ? Success(result) : Failure("Invalid VLP CloseCase request due to #{result.errors.to_h}") | ||
end | ||
|
||
def close_case_request_entity(payload) | ||
Success(AcaEntities::Fdsh::Vlp::Rx142::CloseCase::CloseCaseRequest.new(payload.to_h)) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
lib/aca_entities/fdsh/vlp/rx142/close_case/response_metadata.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
module AcaEntities | ||
module Fdsh | ||
module Vlp | ||
module Rx142 | ||
module CloseCase | ||
# Entity for Fdsh Vlp ResponseMetadata | ||
class ResponseMetadata < Dry::Struct | ||
|
||
attribute :ResponseCode, Types::Strict::String.meta(omittable: false) | ||
attribute :ResponseDescriptionText, Types::Strict::String.meta(omittable: false) | ||
attribute :TdsResponseDescriptionText, Types::String.optional.meta(omittable: true) | ||
|
||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.