x
This commit is contained in:
61
gen/proto/php/Payment/V1/PaymentProvider.php
Normal file
61
gen/proto/php/Payment/V1/PaymentProvider.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: payment/v1/payment.proto
|
||||
|
||||
namespace Payment\V1;
|
||||
|
||||
use UnexpectedValueException;
|
||||
|
||||
/**
|
||||
* PaymentProvider represents the supported set
|
||||
* of payment providers.
|
||||
*
|
||||
* Protobuf type <code>payment.v1.PaymentProvider</code>
|
||||
*/
|
||||
class PaymentProvider
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf enum <code>PAYMENT_PROVIDER_UNSPECIFIED = 0;</code>
|
||||
*/
|
||||
const PAYMENT_PROVIDER_UNSPECIFIED = 0;
|
||||
/**
|
||||
* Generated from protobuf enum <code>PAYMENT_PROVIDER_STRIPE = 1;</code>
|
||||
*/
|
||||
const PAYMENT_PROVIDER_STRIPE = 1;
|
||||
/**
|
||||
* Generated from protobuf enum <code>PAYMENT_PROVIDER_PAYPAL = 2;</code>
|
||||
*/
|
||||
const PAYMENT_PROVIDER_PAYPAL = 2;
|
||||
/**
|
||||
* Generated from protobuf enum <code>PAYMENT_PROVIDER_APPLE = 3;</code>
|
||||
*/
|
||||
const PAYMENT_PROVIDER_APPLE = 3;
|
||||
|
||||
private static $valueToName = [
|
||||
self::PAYMENT_PROVIDER_UNSPECIFIED => 'PAYMENT_PROVIDER_UNSPECIFIED',
|
||||
self::PAYMENT_PROVIDER_STRIPE => 'PAYMENT_PROVIDER_STRIPE',
|
||||
self::PAYMENT_PROVIDER_PAYPAL => 'PAYMENT_PROVIDER_PAYPAL',
|
||||
self::PAYMENT_PROVIDER_APPLE => 'PAYMENT_PROVIDER_APPLE',
|
||||
];
|
||||
|
||||
public static function name($value)
|
||||
{
|
||||
if (!isset(self::$valueToName[$value])) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no name defined for value %s', __CLASS__, $value));
|
||||
}
|
||||
return self::$valueToName[$value];
|
||||
}
|
||||
|
||||
|
||||
public static function value($name)
|
||||
{
|
||||
$const = __CLASS__ . '::' . strtoupper($name);
|
||||
if (!defined($const)) {
|
||||
throw new UnexpectedValueException(sprintf(
|
||||
'Enum %s has no value defined for name %s', __CLASS__, $name));
|
||||
}
|
||||
return constant($const);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user