public function testSetCallbackUrl() { $address = new Address(); $address->setCallbackUrl('URL'); $this->assertEquals('URL', $address->getCallbackUrl()); }
public function testGetAddressTransactions() { $account = $this->createAccount(); $address = new Address(); $address->setName('foo'); $this->client->createAccountAddress($account, $address); $transactions = $this->client->getAddressTransactions($address); $this->assertEmpty($transactions); }
/** * Lists transactions for an address. * * Supports pagination parameters. * * @return ResourceCollection|Transaction[] */ public function getAddressTransactions(Address $address, array $params = []) { return $this->getAndMapCollection($address->getResourcePath() . '/transactions', $params, 'toTransactions'); }
public function testGetAddressTransactions() { $address = Address::reference('ACCOUNT_ID', 'ADDRESS_ID'); $expected = new ResourceCollection(); $response = $this->getMock(ResponseInterface::class); $this->http->expects($this->any())->method('get')->with('/v2/accounts/ACCOUNT_ID/addresses/ADDRESS_ID/transactions', ['foo' => 'bar'])->willReturn($response); $this->mapper->expects($this->any())->method('toTransactions')->with($response)->willReturn($expected); $actual = $this->client->getAddressTransactions($address, ['foo' => 'bar']); $this->assertSame($expected, $actual); }