get() public static method

public static get ( $adjustment_uuid, $client = null )
コード例 #1
0
 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();
 }
コード例 #2
0
 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);
 }