Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion omise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def list_events(self):
return LazyCollection(self._nested_object_path(Event))

@classmethod
def schedule(cls):
def list_schedules(cls):
"""Retrieve all charge schedules.

:rtype: Schedule
Expand All @@ -848,6 +848,7 @@ def schedule(cls):
('charges', 'schedules',)))



class Collection(Base):
"""Proxy class representing a collection of items."""

Expand Down
4 changes: 2 additions & 2 deletions omise/test/test_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ def test_refund(self, api_call, reload_call):
)

@mock.patch('requests.get')
def test_schedule(self, api_call):
def test_list_schedules(self, api_call):
class_ = self._getTargetClass()
collection_class_ = self._getCollectionClass()
self.mockResponse(api_call, """{
Expand Down Expand Up @@ -1124,7 +1124,7 @@ def test_schedule(self, api_call):
]
}""")

schedules = class_.schedule()
schedules = class_.list_schedules()
self.assertTrue(isinstance(schedules, collection_class_))
self.assertEqual(schedules.total, 1)
self.assertEqual(schedules.location, '/charges/schedules')
Expand Down
Loading