Вход Регистрация
Файл: sngine-v2.8/Script/includes/libs/Stripe/lib/Service/EphemeralKeyService.php
Строк: 37
<?php

namespace StripeService;

class 
EphemeralKeyService extends StripeServiceAbstractService
{
    
/**
     * Invalidates a short-lived API key for a given resource.
     *
     * @param string $id
     * @param null|array $params
     * @param null|array|StripeUtilRequestOptions $opts
     *
     * @throws StripeExceptionApiErrorException if the request fails
     *
     * @return StripeEphemeralKey
     */
    
public function delete($id$params null$opts null)
    {
        return 
$this->request('delete'$this->buildPath('/v1/ephemeral_keys/%s'$id), $params$opts);
    }

    
/**
     * Creates a short-lived API key for a given resource.
     *
     * @param null|array $params
     * @param null|array|StripeUtilRequestOptions $opts
     *
     * @throws StripeExceptionApiErrorException if the request fails
     *
     * @return StripeEphemeralKey
     */
    
public function create($params null$opts null)
    {
        if (!
$opts || !isset($opts['stripe_version'])) {
            throw new 
StripeExceptionInvalidArgumentException('stripe_version must be specified to create an ephemeral key');
        }

        return 
$this->request('post''/v1/ephemeral_keys'$params$opts);
    }
}
Онлайн: 2
Реклама