Skip to content

Commit

Permalink
Merge pull request #536 from slovensko-digital/GO-168/add_reference_a…
Browse files Browse the repository at this point in the history
…nd_business_id_to_sktalk

GO-168 Submit UPVS message draft including its Reference & Business ID
  • Loading branch information
luciajanikova authored Jan 15, 2025
2 parents 48cdfec + 246ba34 commit ad1006b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
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

0 comments on commit ad1006b

Please sign in to comment.