diff --git a/stripe/__init__.py b/stripe/__init__.py index e8824af59..84e57886c 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -29,6 +29,7 @@ from stripe.api_resources import issuing # noqa from stripe.api_resources import reporting # noqa from stripe.api_resources import sigma # noqa +from stripe.api_resources import terminal # noqa # OAuth from stripe.oauth import OAuth # noqa diff --git a/stripe/api_resources/terminal/__init__.py b/stripe/api_resources/terminal/__init__.py index 6ea30f198..40b79387d 100644 --- a/stripe/api_resources/terminal/__init__.py +++ b/stripe/api_resources/terminal/__init__.py @@ -3,5 +3,5 @@ # flake8: noqa from stripe.api_resources.terminal.connection_token import ConnectionToken -from stripe.api_resources.terminal.locations import Location -from stripe.api_resources.terminal.readers import Reader +from stripe.api_resources.terminal.location import Location +from stripe.api_resources.terminal.reader import Reader diff --git a/stripe/api_resources/terminal/location.py b/stripe/api_resources/terminal/location.py index 1781f2d26..afac844db 100644 --- a/stripe/api_resources/terminal/location.py +++ b/stripe/api_resources/terminal/location.py @@ -6,5 +6,5 @@ class Location(CreateableAPIResource, ListableAPIResource, - UpdateableAPIResource): + UpdateableAPIResource): OBJECT_NAME = 'terminal.location' diff --git a/stripe/api_resources/terminal/reader.py b/stripe/api_resources/terminal/reader.py index a82921df2..edebe5937 100644 --- a/stripe/api_resources/terminal/reader.py +++ b/stripe/api_resources/terminal/reader.py @@ -6,5 +6,5 @@ class Reader(CreateableAPIResource, ListableAPIResource, - UpdateableAPIResource): + UpdateableAPIResource): OBJECT_NAME = 'terminal.reader' diff --git a/stripe/util.py b/stripe/util.py index 6d9f3bd3f..2cdbad952 100644 --- a/stripe/util.py +++ b/stripe/util.py @@ -213,6 +213,12 @@ def load_object_classes(): api_resources.UsageRecord.OBJECT_NAME: api_resources.UsageRecord, api_resources.UsageRecordSummary.OBJECT_NAME: api_resources.UsageRecordSummary, + api_resources.terminal.Location.OBJECT_NAME: + api_resources.terminal.Location, + api_resources.terminal.ConnectionToken.OBJECT_NAME: + api_resources.terminal.ConnectionToken, + api_resources.terminal.Reader.OBJECT_NAME: + api_resources.terminal.Reader, } diff --git a/tests/api_resources/terminal/test_connection_token.py b/tests/api_resources/terminal/test_connection_token.py index ca720f29b..8caa3b94a 100644 --- a/tests/api_resources/terminal/test_connection_token.py +++ b/tests/api_resources/terminal/test_connection_token.py @@ -11,6 +11,6 @@ def test_is_creatable(self, request_mock): resource = stripe.terminal.ConnectionToken.create() request_mock.assert_requested( 'post', - '/v1/terminal/connection_token' + '/v1/terminal/connection_tokens' ) assert isinstance(resource, stripe.terminal.ConnectionToken) diff --git a/tests/api_resources/terminal/test_location.py b/tests/api_resources/terminal/test_location.py index 694e02c92..9c8006ddb 100644 --- a/tests/api_resources/terminal/test_location.py +++ b/tests/api_resources/terminal/test_location.py @@ -48,7 +48,7 @@ def test_is_retrievable(self, request_mock): resource = stripe.terminal.Location.retrieve(TEST_RESOURCE_ID) request_mock.assert_requested( 'get', - '/v1/temrinal/locations/%s' % TEST_RESOURCE_ID + '/v1/terminal/locations/%s' % TEST_RESOURCE_ID ) assert isinstance(resource, stripe.terminal.Location) diff --git a/tests/api_resources/terminal/test_reader.py b/tests/api_resources/terminal/test_reader.py index aeb82b028..4b873b6c1 100644 --- a/tests/api_resources/terminal/test_reader.py +++ b/tests/api_resources/terminal/test_reader.py @@ -42,7 +42,7 @@ def test_is_retrievable(self, request_mock): resource = stripe.terminal.Reader.retrieve(TEST_RESOURCE_ID) request_mock.assert_requested( 'get', - '/v1/temrinal/readers/%s' % TEST_RESOURCE_ID + '/v1/terminal/readers/%s' % TEST_RESOURCE_ID ) assert isinstance(resource, stripe.terminal.Reader)