Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO-168 Submit UPVS message draft including its Reference & Business ID #536

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/api/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def permitted_message_draft_params
metadata: [
:correlation_id,
:reference_id,
:business_id,
:sender_uri,
:recipient_uri,
:sender_business_reference,
Expand Down
2 changes: 2 additions & 0 deletions app/jobs/govbox/submit_message_draft_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def perform(message_draft, bulk_submit: false, upvs_client: UpvsEnvironment.upvs
message_type: all_message_metadata["message_type"],
message_id: message_draft.uuid,
correlation_id: message_draft.metadata["correlation_id"],
reference_id: message_draft.metadata["reference_id"],
business_id: message_draft.metadata["business_id"],
recipient_uri: message_draft.metadata["recipient_uri"],
message_subject: message_draft.title,
sender_business_reference: message_draft.metadata["sender_business_reference"],
Expand Down
1 change: 1 addition & 0 deletions app/models/upvs/message_draft.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def self.load_from_params(message_params, box:)
metadata: [
:correlation_id,
:reference_id,
:business_id,
:sender_uri,
:recipient_uri,
:sender_business_reference,
Expand Down
3 changes: 3 additions & 0 deletions public/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ paths:
description: Identifikátor správy, na ktorú sa správa (odpoveď) viaže
type: string
format: uuid
business_id:
description: Identifikátor, ktorý jednoznačne identifikuje správu, pričom tento identifikátor môže byť v čitateľnom tvare. Jeho formát určuje poskytovateľ služby.
type: string
recipient_uri:
description: Identifikátor prijímateľa správy
type: string
Expand Down
2 changes: 2 additions & 0 deletions test/integration/upvs_message_drafts_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class UpvsMessageDraftsApiTest < ActionDispatch::IntegrationTest
posp_version: '1.9',
message_type: 'App.GeneralAgenda',
correlation_id: SecureRandom.uuid,
reference_id: SecureRandom.uuid,
business_id: 'SomeID',
sender_uri: 'SSDMainURI',
recipient_uri: 'ico://sk/12345678',
},
Expand Down
Loading