From 5bceb7284734b1e21c4d5e1d1bc275e1ecb3be9e Mon Sep 17 00:00:00 2001 From: "Jean C. Garcia" Date: Mon, 14 Aug 2017 14:10:46 -0300 Subject: [PATCH] support moip v1.3.* --- src/Moip.php | 30 ++++++++++++++++++++++++++++++ tests/src/MoipTest.php | 36 +++++++++++++++--------------------- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/src/Moip.php b/src/Moip.php index 84d1ed3..f1adb22 100644 --- a/src/Moip.php +++ b/src/Moip.php @@ -50,6 +50,16 @@ public function start() return $this; } + /** + * Create a new Accounts instance. + * + * @return \Moip\Resource\Account + */ + public function accounts() + { + return $this->moip->accounts(); + } + /** * Create a new Customer instance. * @@ -99,4 +109,24 @@ public function multiorders() { return $this->moip->multiorders(); } + + /** + * Create a new Notifications instance. + * + * @return \Moip\Resource\NotificationPreferences + */ + public function notifications() + { + return $this->moip->notifications(); + } + + /** + * Create a new Tranfers instance. + * + * @return \Moip\Resource\Transfers + */ + public function transfers() + { + return $this->moip->transfers(); + } } diff --git a/tests/src/MoipTest.php b/tests/src/MoipTest.php index e3f76c5..b25aebb 100644 --- a/tests/src/MoipTest.php +++ b/tests/src/MoipTest.php @@ -9,59 +9,53 @@ */ class MoipTest extends AbstractTestCase { - /** - * @test - */ public function testStart() { $this->assertInstanceOf(\Artesaos\Moip\Moip::class, $this->moip->start()); } - /** - * @test - */ public function testPropertyMoip() { $this->assertInstanceOf(\Moip\Moip::class, $this->moip->getApi()); } - /** - * @test - */ + public function testInstanceOfAccount() + { + $this->assertInstanceOf(\Moip\Resource\Account::class, $this->moip->accounts()); + } + public function testInstanceOfCustomers() { $this->assertInstanceOf(\Moip\Resource\Customer::class, $this->moip->customers()); } - /** - * @test - */ public function testInstanceOfEntries() { $this->assertInstanceOf(\Moip\Resource\Entry::class, $this->moip->entries()); } - /** - * @test - */ public function testInstanceOfOrders() { $this->assertInstanceOf(\Moip\Resource\Orders::class, $this->moip->orders()); } - /** - * @test - */ public function testInstanceOfPayments() { $this->assertInstanceOf(\Moip\Resource\Payment::class, $this->moip->payments()); } - /** - * @test - */ public function testInstanceOfMultiOrders() { $this->assertInstanceOf(\Moip\Resource\Multiorders::class, $this->moip->multiorders()); } + + public function testInstanceOfNotifications() + { + $this->assertInstanceOf(\Moip\Resource\NotificationPreferences::class, $this->moip->notifications()); + } + + public function testeInstanceOfTranfers() + { + $this->assertInstanceOf(\Moip\Resource\Transfers::class, $this->moip->transfers()); + } } \ No newline at end of file