Skip to content

Commit

Permalink
Merge pull request #395 from tuckertt/bugfix-service-catalogue
Browse files Browse the repository at this point in the history
Changed the submit_order endpoint for issue #394
  • Loading branch information
mhjacks authored Aug 26, 2024
2 parents 3a09f3d + 3782efb commit 4e4714c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_service_catalog_enndpoint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Correct submit_order endpoint for issue #394/PR #395 (https://github.com/ansible-collections/servicenow.itsm/pull/395)
2 changes: 1 addition & 1 deletion plugins/module_utils/service_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class CartClient:
BASE_API = dict(
add_to_cart="/api/sn_sc/servicecatalog/items/{sys_id}/add_to_cart",
checkout="/api/sn_sc/servicecatalog/cart/checkout",
submit_order="/api/sn_sc/servicecatalog/cart/checkout",
submit_order="/api/sn_sc/servicecatalog/cart/submit_order",
order_now="/api/sn_sc/servicecatalog/items/{sys_id}/order_now",
cart="/api/sn_sc/servicecatalog/cart",
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/plugins/modules/test_service_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def checkout_cart(*args):

def test_submit_order(self, mocker):
def submit_order(*args):
assert args[0] == "/api/sn_sc/servicecatalog/cart/checkout"
assert args[0] == "/api/sn_sc/servicecatalog/cart/submit_order"
return client.Response(200, json.dumps(dict(result=dict(key="value"))))

client_mock = client.Client("https://my-host", "username", "password")
Expand Down

0 comments on commit 4e4714c

Please sign in to comment.