Skip to content

Commit

Permalink
Merge pull request #108 from tungleduyxyz/issue_88_validate_catalog
Browse files Browse the repository at this point in the history
Issue 88 Add Validate catalog API
  • Loading branch information
reshmabidikar authored Apr 17, 2024
2 parents dd9c433 + 9b55555 commit f8082f9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/killbill_client/models/catalog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,22 @@ def delete_catalog(user = nil, reason = nil, comment = nil, options = {})
:comment => comment,
}.merge(options)
end

def validate_catalog(catalog_xml, user = nil, reason = nil, comment = nil, options = {})

require_multi_tenant_options!(options, "Validating a catalog is only supported in multi-tenant mode")

errors = post "#{KILLBILL_API_CATALOG_PREFIX}/xml/validate",
catalog_xml,
{},
{
:head => {'Accept' => 'application/json'},
:content_type => 'text/xml',
:user => user,
:reason => reason,
:comment => comment,
}.merge(options)
end
end
end
end
Expand Down

0 comments on commit f8082f9

Please sign in to comment.