public function testDelete() { $this->client->addResponse('GET', '/adjustments/abcdef1234567890', 'adjustments/show-200.xml'); $this->client->addResponse('DELETE', 'https://api.recurly.com/v2/adjustments/abcdef1234567890', 'adjustments/destroy-204.xml'); $adjustment = Recurly_Adjustment::get('abcdef1234567890', $this->client); $adjustment->delete(); }
public function testAdjustmentRefund() { $this->client->addResponse('GET', '/adjustments/abcdef1234567890', 'adjustments/show-200.xml'); $this->client->addResponse('GET', 'https://api.recurly.com/v2/invoices/1234', 'invoices/show-200.xml'); $this->client->addResponse('POST', 'https://api.recurly.com/v2/invoices/1001/refund', 'invoices/refund-201.xml'); $adjustment = Recurly_Adjustment::get('abcdef1234567890', $this->client); $refund_invoice = $adjustment->refund(); $this->assertEquals($refund_invoice->subtotal_in_cents, -1000); }