x
This commit is contained in:
BIN
gen/proto/php/Payment/V1/GPBMetadata/Payment.php
Normal file
BIN
gen/proto/php/Payment/V1/GPBMetadata/Payment.php
Normal file
Binary file not shown.
151
gen/proto/php/Payment/V1/Order.php
Normal file
151
gen/proto/php/Payment/V1/Order.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: payment/v1/payment.proto
|
||||
|
||||
namespace Payment\V1;
|
||||
|
||||
use Google\Protobuf\Internal\GPBType;
|
||||
use Google\Protobuf\Internal\RepeatedField;
|
||||
use Google\Protobuf\Internal\GPBUtil;
|
||||
|
||||
/**
|
||||
* Order represents a monetary order.
|
||||
*
|
||||
* Generated from protobuf message <code>payment.v1.Order</code>
|
||||
*/
|
||||
class Order extends \Google\Protobuf\Internal\Message
|
||||
{
|
||||
/**
|
||||
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
|
||||
*/
|
||||
protected $order_id = '';
|
||||
/**
|
||||
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
|
||||
*/
|
||||
protected $recipient_id = '';
|
||||
/**
|
||||
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
|
||||
*/
|
||||
protected $amount = null;
|
||||
/**
|
||||
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
|
||||
*/
|
||||
protected $payment_provider = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $data {
|
||||
* Optional. Data for populating the Message object.
|
||||
*
|
||||
* @type string $order_id
|
||||
* @type string $recipient_id
|
||||
* @type \Google\Type\Money $amount
|
||||
* @type int $payment_provider
|
||||
* }
|
||||
*/
|
||||
public function __construct($data = NULL) {
|
||||
\Payment\V1\GPBMetadata\Payment::initOnce();
|
||||
parent::__construct($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getOrderId()
|
||||
{
|
||||
return $this->order_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>string order_id = 1 [json_name = "orderId"];</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setOrderId($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->order_id = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
|
||||
* @return string
|
||||
*/
|
||||
public function getRecipientId()
|
||||
{
|
||||
return $this->recipient_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>string recipient_id = 2 [json_name = "recipientId"];</code>
|
||||
* @param string $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setRecipientId($var)
|
||||
{
|
||||
GPBUtil::checkString($var, True);
|
||||
$this->recipient_id = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
|
||||
* @return \Google\Type\Money|null
|
||||
*/
|
||||
public function getAmount()
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
public function hasAmount()
|
||||
{
|
||||
return isset($this->amount);
|
||||
}
|
||||
|
||||
public function clearAmount()
|
||||
{
|
||||
unset($this->amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.google.type.Money amount = 3 [json_name = "amount"];</code>
|
||||
* @param \Google\Type\Money $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setAmount($var)
|
||||
{
|
||||
GPBUtil::checkMessage($var, \Google\Type\Money::class);
|
||||
$this->amount = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
|
||||
* @return int
|
||||
*/
|
||||
public function getPaymentProvider()
|
||||
{
|
||||
return $this->payment_provider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generated from protobuf field <code>.payment.v1.PaymentProvider payment_provider = 4 [json_name = "paymentProvider"];</code>
|
||||
* @param int $var
|
||||
* @return $this
|
||||
*/
|
||||
public function setPaymentProvider($var)
|
||||
{
|
||||
GPBUtil::checkEnum($var, \Payment\V1\PaymentProvider::class);
|
||||
$this->payment_provider = $var;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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