Updated Client Detail Header for better mobile fit, lots of progress on stripe pay and some other minor updates

This commit is contained in:
johnny@pittpc.com
2019-09-13 20:33:00 -04:00
parent 5f30dbf9a9
commit 59ce30bd79
178 changed files with 25119 additions and 7 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Stripe\ApiOperations;
/**
* Trait for retrievable resources. Adds a `retrieve()` static method to the
* class.
*
* This trait should only be applied to classes that derive from StripeObject.
*/
trait Retrieve
{
/**
* @param array|string $id The ID of the API resource to retrieve,
* or an options array containing an `id` key.
* @param array|string|null $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return static
*/
public static function retrieve($id, $opts = null)
{
$opts = \Stripe\Util\RequestOptions::parse($opts);
$instance = new static($id, $opts);
$instance->refresh();
return $instance;
}
}