From 19985dbb8c0aa66dc4bf7905abc1148de909097d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 11 Jan 2022 12:35:47 +0100 Subject: prvi-commit --- .../stripe-php/lib/Issuing/Authorization.php | 81 ++++++++++++++++++++++ vendor/stripe/stripe-php/lib/Issuing/Card.php | 59 ++++++++++++++++ .../stripe/stripe-php/lib/Issuing/CardDetails.php | 19 +++++ .../stripe/stripe-php/lib/Issuing/Cardholder.php | 39 +++++++++++ vendor/stripe/stripe-php/lib/Issuing/Dispute.php | 53 ++++++++++++++ .../stripe/stripe-php/lib/Issuing/Transaction.php | 43 ++++++++++++ 6 files changed, 294 insertions(+) create mode 100644 vendor/stripe/stripe-php/lib/Issuing/Authorization.php create mode 100644 vendor/stripe/stripe-php/lib/Issuing/Card.php create mode 100644 vendor/stripe/stripe-php/lib/Issuing/CardDetails.php create mode 100644 vendor/stripe/stripe-php/lib/Issuing/Cardholder.php create mode 100644 vendor/stripe/stripe-php/lib/Issuing/Dispute.php create mode 100644 vendor/stripe/stripe-php/lib/Issuing/Transaction.php (limited to 'vendor/stripe/stripe-php/lib/Issuing') diff --git a/vendor/stripe/stripe-php/lib/Issuing/Authorization.php b/vendor/stripe/stripe-php/lib/Issuing/Authorization.php new file mode 100644 index 0000000..a649235 --- /dev/null +++ b/vendor/stripe/stripe-php/lib/Issuing/Authorization.php @@ -0,0 +1,81 @@ +issued card is used to + * make a purchase, an Issuing Authorization object is created. Authorizations + * must be approved for the purchase to be completed successfully. + * + * Related guide: Issued Card + * Authorizations. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The total amount that was authorized or rejected. This amount is in the card's currency and in the smallest currency unit. + * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. + * @property bool $approved Whether the authorization has been approved. + * @property string $authorization_method How the card details were provided. + * @property \Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with this authorization. + * @property \Stripe\Issuing\Card $card You can create physical or virtual cards that are issued to cardholders. + * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this authorization belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $merchant_amount The total amount that was authorized or rejected. This amount is in the merchant_currency and in the smallest currency unit. + * @property string $merchant_currency The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property \Stripe\StripeObject $merchant_data + * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $pending_request The pending authorization request. This field will only be non-null during an issuing_authorization.request webhook. + * @property \Stripe\StripeObject[] $request_history History of every time pending_request was approved/denied, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. + * @property string $status The current status of the authorization in its lifecycle. + * @property \Stripe\Issuing\Transaction[] $transactions List of transactions associated with this authorization. + * @property \Stripe\StripeObject $verification_data + * @property null|string $wallet What, if any, digital wallet was used for this authorization. One of apple_pay, google_pay, or samsung_pay. + */ +class Authorization extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.authorization'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Retrieve; + use \Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Authorization the approved authorization + */ + public function approve($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/approve'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Authorization the declined authorization + */ + public function decline($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/decline'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/vendor/stripe/stripe-php/lib/Issuing/Card.php b/vendor/stripe/stripe-php/lib/Issuing/Card.php new file mode 100644 index 0000000..e0ac774 --- /dev/null +++ b/vendor/stripe/stripe-php/lib/Issuing/Card.php @@ -0,0 +1,59 @@ +create physical or + * virtual cards that are issued to cardholders. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property string $brand The brand of the card. + * @property null|string $cancellation_reason The reason why the card was canceled. + * @property \Stripe\Issuing\Cardholder $cardholder

An Issuing Cardholder object represents an individual or business entity who is issued cards.

Related guide: How to create a Cardholder

+ * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property string $cvc The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. + * @property int $exp_month The expiration month of the card. + * @property int $exp_year The expiration year of the card. + * @property string $last4 The last 4 digits of the card number. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $number The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with the expand parameter. Additionally, it's only available via the "Retrieve a card" endpoint, not via "List all cards" or any other endpoint. + * @property null|string|\Stripe\Issuing\Card $replaced_by The latest card that replaces this card, if any. + * @property null|string|\Stripe\Issuing\Card $replacement_for The card this card replaces, if any. + * @property null|string $replacement_reason The reason why the previous card needed to be replaced. + * @property null|\Stripe\StripeObject $shipping Where and how the card will be shipped. + * @property \Stripe\StripeObject $spending_controls + * @property string $status Whether authorizations can be approved on this card. + * @property string $type The type of the card. + */ +class Card extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.card'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Retrieve; + use \Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\CardDetails the card details associated with that issuing card + */ + public function details($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/details'; + list($response, $opts) = $this->_request('get', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response, $opts); + $obj->setLastResponse($response); + + return $obj; + } +} diff --git a/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php b/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php new file mode 100644 index 0000000..98f4e0b --- /dev/null +++ b/vendor/stripe/stripe-php/lib/Issuing/CardDetails.php @@ -0,0 +1,19 @@ +Cardholder object represents an individual or business + * entity who is issued cards. + * + * Related guide: How to create a + * Cardholder + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property \Stripe\StripeObject $billing + * @property null|\Stripe\StripeObject $company Additional information about a company cardholder. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $email The cardholder's email address. + * @property null|\Stripe\StripeObject $individual Additional information about an individual cardholder. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $name The cardholder's name. This will be printed on cards issued to them. + * @property null|string $phone_number The cardholder's phone number. + * @property \Stripe\StripeObject $requirements + * @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our documentation for more details. + * @property string $status Specifies whether to permit authorizations on this cardholder's cards. + * @property string $type One of individual or company. + */ +class Cardholder extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.cardholder'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Retrieve; + use \Stripe\ApiOperations\Update; +} diff --git a/vendor/stripe/stripe-php/lib/Issuing/Dispute.php b/vendor/stripe/stripe-php/lib/Issuing/Dispute.php new file mode 100644 index 0000000..2a80c3b --- /dev/null +++ b/vendor/stripe/stripe-php/lib/Issuing/Dispute.php @@ -0,0 +1,53 @@ +card issuer, you can dispute + * transactions that the cardholder does not recognize, suspects to be fraudulent, + * or has other issues with. + * + * Related guide: Disputing + * Transactions + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount Disputed amount. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + * @property null|\Stripe\BalanceTransaction[] $balance_transactions List of balance transactions associated with the dispute. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency The currency the transaction was made in. + * @property \Stripe\StripeObject $evidence + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property string $status Current status of the dispute. + * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed. + */ +class Dispute extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.dispute'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Create; + use \Stripe\ApiOperations\Retrieve; + use \Stripe\ApiOperations\Update; + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Dispute the submited dispute + */ + public function submit($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/submit'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/vendor/stripe/stripe-php/lib/Issuing/Transaction.php b/vendor/stripe/stripe-php/lib/Issuing/Transaction.php new file mode 100644 index 0000000..3c44d7e --- /dev/null +++ b/vendor/stripe/stripe-php/lib/Issuing/Transaction.php @@ -0,0 +1,43 @@ +issued card that + * results in funds entering or leaving your Stripe account, such as a completed + * purchase or refund, is represented by an Issuing Transaction + * object. + * + * Related guide: Issued Card + * Transactions. + * + * @property string $id Unique identifier for the object. + * @property string $object String representing the object's type. Objects of the same type share the same value. + * @property int $amount The transaction amount, which will be reflected in your balance. This amount is in your currency and in the smallest currency unit. + * @property null|\Stripe\StripeObject $amount_details Detailed breakdown of amount components. These amounts are denominated in currency and in the smallest currency unit. + * @property null|string|\Stripe\Issuing\Authorization $authorization The Authorization object that led to this transaction. + * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction associated with this transaction. + * @property string|\Stripe\Issuing\Card $card The card used to make this transaction. + * @property null|string|\Stripe\Issuing\Cardholder $cardholder The cardholder to whom this transaction belongs. + * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. + * @property null|string|\Stripe\Issuing\Dispute $dispute If you've disputed the transaction, the ID of the dispute. + * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $merchant_amount The amount that the merchant will receive, denominated in merchant_currency and in the smallest currency unit. It will be different from amount if the merchant is taking payment in a different currency. + * @property string $merchant_currency The currency with which the merchant is taking payment. + * @property \Stripe\StripeObject $merchant_data + * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + * @property null|\Stripe\StripeObject $purchase_details Additional purchase information that is optionally provided by the merchant. + * @property string $type The nature of the transaction. + */ +class Transaction extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'issuing.transaction'; + + use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Retrieve; + use \Stripe\ApiOperations\Update; +} -- cgit v1.2.3