示例#1
0
 /**
  * Creates an Simplify_InvoiceItem object
  * @param     array $hash a map of parameters; valid keys are:<dl style="padding-left:10px;">
  *     <dt><tt>amount</tt></dt>    <dd>Amount of the invoice item (minor units). Example: 1000 = 10.00 <strong>required </strong></dd>
  *     <dt><tt>currency</tt></dt>    <dd>Currency code (ISO-4217) for the invoice item. Must match the currency associated with your account. <strong>required </strong><strong>default:USD</strong></dd>
  *     <dt><tt>description</tt></dt>    <dd>Individual items of an invoice </dd>
  *     <dt><tt>invoice</tt></dt>    <dd>Description of the invoice item <strong>required </strong></dd></dl>
  * @param     string publicKey Public key. If null, the value of static Simplify::$publicKey will be used
  * @param     string privateKey Private key. If null, the value of static Simplify::$privateKey will be used
  * @return    InvoiceItem a InvoiceItem object.
  */
 public static function createInvoiceItem($hash, $publicKey = null, $privateKey = null)
 {
     $instance = new Simplify_InvoiceItem();
     $instance->setAll($hash);
     $object = Simplify_PaymentsApi::createObject($instance, $publicKey, $privateKey);
     return $object;
 }
示例#2
0
 /**
  * Creates an Simplify_InvoiceItem object
  * @param     array $hash a map of parameters; valid keys are:<dl style="padding-left:10px;">
  *     <dt><tt>amount</tt></dt>    <dd>Amount of the invoice item (minor units). Example: 1000 = 10.00 [min value: 1, max value: 99999999] <strong>required </strong></dd>
  *     <dt><tt>currency</tt></dt>    <dd>Currency code (ISO-4217) for the invoice item. Must match the currency associated with your account. [default: USD] <strong>required </strong></dd>
  *     <dt><tt>description</tt></dt>    <dd>Individual items of an invoice </dd>
  *     <dt><tt>invoice</tt></dt>    <dd>Description of the invoice item <strong>required </strong></dd></dl>
  * @param     $authentication -  information used for the API call.  If no value is passed the global keys Simplify::public_key and Simplify::private_key are used.  <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.<i/>
  * @return    InvoiceItem a InvoiceItem object.
  */
 public static function createInvoiceItem($hash, $authentication = null)
 {
     $args = func_get_args();
     $authentication = Simplify_PaymentsApi::buildAuthenticationObject($authentication, $args, 2);
     $instance = new Simplify_InvoiceItem();
     $instance->setAll($hash);
     $object = Simplify_PaymentsApi::createObject($instance, $authentication);
     return $object;
 }