Skip to content

Commit

Permalink
Add annotations to API responses
Browse files Browse the repository at this point in the history
  • Loading branch information
jlledom committed Aug 30, 2024
1 parent 41f316e commit c26ec59
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ def to_xml(options = {})
end

xml.state state
annotations_xml(:builder => xml)
xml.deletion_date deletion_date.xmlschema if scheduled_for_deletion? && deletion_date

if provider?
Expand Down
1 change: 1 addition & 0 deletions app/models/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ def to_xml(options = {})
xml.mandatory_app_key mandatory_app_key
xml.buyer_can_select_plan buyer_can_select_plan
xml.buyer_plan_change_permission buyer_plan_change_permission
annotations_xml(:builder => xml)

if notification_settings
xml.notification_settings do |xml|
Expand Down
1 change: 1 addition & 0 deletions app/representers/account_representer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module AccountRepresenter
end

property :state
property :annotations_hash, as: :annotations

link :self do
admin_api_account_url(self) unless provider?
Expand Down
1 change: 1 addition & 0 deletions app/representers/backend_api_representer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module BackendApiRepresenter
property :system_name
property :description
property :private_endpoint
property :annotations_hash, as: :annotations
property :account_id
property :created_at
property :updated_at
Expand Down
1 change: 1 addition & 0 deletions app/representers/service_representer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module ServiceRepresenter
property :buyer_can_select_plan
property :buyer_plan_change_permission
property :notification_settings
property :annotations_hash, as: :annotations

property :created_at
property :updated_at
Expand Down

0 comments on commit c26ec59

Please sign in to comment.