/
home
/
techb158
/
ileadtechnology.com
/
vendor
/
mollie
/
mollie-api-php
/
src
/
Resources
/
/home/techb158/ileadtechnology.com/vendor/mollie/mollie-api-php/src/Resources
mkdir
upload
Name
Size
Mode
Actions
Balance.php
3061
0644
edit
dl
rm
BalanceCollection.php
364
0644
edit
dl
rm
BalanceReport.php
2416
0644
edit
dl
rm
BalanceTransaction.php
2438
0644
edit
dl
rm
BalanceTransactionCollection.php
412
0644
edit
dl
rm
BaseCollection.php
596
0644
edit
dl
rm
BaseResource.php
491
0644
edit
dl
rm
Capture.php
1183
0644
edit
dl
rm
CaptureCollection.php
364
0644
edit
dl
rm
Chargeback.php
1372
0644
edit
dl
rm
ChargebackCollection.php
373
0644
edit
dl
rm
Client.php
608
0644
edit
dl
rm
ClientCollection.php
361
0644
edit
dl
rm
ClientLink.php
1273
0644
edit
dl
rm
CurrentProfile.php
809
0644
edit
dl
rm
CursorCollection.php
2473
0644
edit
dl
rm
Customer.php
5669
0644
edit
dl
rm
CustomerCollection.php
367
0644
edit
dl
rm
Invoice.php
1843
0644
edit
dl
rm
InvoiceCollection.php
364
0644
edit
dl
rm
Issuer.php
514
0644
edit
dl
rm
IssuerCollection.php
214
0644
edit
dl
rm
Mandate.php
1851
0644
edit
dl
rm
MandateCollection.php
800
0644
edit
dl
rm
Method.php
2212
0644
edit
dl
rm
MethodCollection.php
214
0644
edit
dl
rm
MethodPrice.php
734
0644
edit
dl
rm
MethodPriceCollection.php
219
0644
edit
dl
rm
Onboarding.php
1062
0644
edit
dl
rm
Order.php
13064
0644
edit
dl
rm
OrderCollection.php
358
0644
edit
dl
rm
OrderLine.php
8559
0644
edit
dl
rm
OrderLineCollection.php
587
0644
edit
dl
rm
Organization.php
1287
0644
edit
dl
rm
OrganizationCollection.php
379
0644
edit
dl
rm
Partner.php
1262
0644
edit
dl
rm
Payment.php
19145
0644
edit
dl
rm
PaymentCollection.php
364
0644
edit
dl
rm
PaymentLink.php
2521
0644
edit
dl
rm
PaymentLinkCollection.php
377
0644
edit
dl
rm
Permission.php
338
0644
edit
dl
rm
PermissionCollection.php
222
0644
edit
dl
rm
Profile.php
5535
0644
edit
dl
rm
ProfileCollection.php
364
0644
edit
dl
rm
Refund.php
3207
0644
edit
dl
rm
RefundCollection.php
361
0644
edit
dl
rm
ResourceFactory.php
2068
0644
edit
dl
rm
Route.php
631
0644
edit
dl
rm
RouteCollection.php
357
0644
edit
dl
rm
Settlement.php
4075
0644
edit
dl
rm
SettlementCollection.php
373
0644
edit
dl
rm
Shipment.php
2650
0644
edit
dl
rm
ShipmentCollection.php
218
0644
edit
dl
rm
Subscription.php
4889
0644
edit
dl
rm
SubscriptionCollection.php
379
0644
edit
dl
rm
Terminal.php
3242
0644
edit
dl
rm
TerminalCollection.php
367
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/vendor/mollie/mollie-api-php/src/Resources/Order.php
(13064B)
<?php namespace Mollie\Api\Resources; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\MollieApiClient; use Mollie\Api\Types\OrderStatus; class Order extends BaseResource { /** * Id of the order. * * @example ord_8wmqcHMN4U * @var string */ public $id; /** * The profile ID this order belongs to. * * @example pfl_xH2kP6Nc6X * @var string */ public $profileId; /** * Either "live" or "test". Indicates this being a test or a live (verified) order. * * @var string */ public $mode; /** * Amount object containing the value and currency * * @var \stdClass */ public $amount; /** * The total amount captured, thus far. * * @var \stdClass */ public $amountCaptured; /** * The total amount refunded, thus far. * * @var \stdClass */ public $amountRefunded; /** * The status of the order. * * @var string */ public $status; /** * The person and the address the order is billed to. * * @var \stdClass */ public $billingAddress; /** * The date of birth of your customer, if available. * @example 1976-08-21 * @var string|null */ public $consumerDateOfBirth; /** * The order number that was used when creating the order. * * @var string */ public $orderNumber; /** * The person and the address the order is billed to. * * @var \stdClass */ public $shippingAddress; /** * The payment method last used when paying for the order. * * @see Method * @var string */ public $method; /** * The locale used for this order. * * @var string */ public $locale; /** * During creation of the order you can set custom metadata that is stored with * the order, and given back whenever you retrieve that order. * * @var \stdClass|mixed|null */ public $metadata; /** * Can this order be canceled? * * @var bool */ public $isCancelable; /** * Webhook URL set on this payment * * @var string|null */ public $webhookUrl; /** * Redirect URL set on this payment * * @var string */ public $redirectUrl; /** * Cancel URL set on this payment * * @var string */ public $cancelUrl; /** * UTC datetime the order was created in ISO-8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $createdAt; /** * UTC datetime the order the order will expire in ISO-8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $expiresAt; /** * UTC datetime if the order is expired, the time of expiration will be present in ISO-8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $expiredAt; /** * UTC datetime if the order has been paid, the time of payment will be present in ISO-8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $paidAt; /** * UTC datetime if the order has been authorized, the time of authorization will be present in ISO-8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $authorizedAt; /** * UTC datetime if the order has been canceled, the time of cancellation will be present in ISO 8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $canceledAt; /** * UTC datetime if the order is completed, the time of completion will be present in ISO 8601 format. * * @example "2013-12-25T10:30:54+00:00" * @var string|null */ public $completedAt; /** * The order lines contain the actual things the customer bought. * * @var array|object[] */ public $lines; /** * For digital goods, you must make sure to apply the VAT rate from your customer’s country in most jurisdictions. * Use this parameter to restrict the payment methods available to your customer to methods from the billing country * only. * * @var bool */ public $shopperCountryMustMatchBillingCountry; /** * An object with several URL objects relevant to the customer. Every URL object will contain an href and a type field. * * @var \stdClass */ public $_links; /** * @var \stdClass|null */ public $_embedded; /** * Is this order created? * * @return bool */ public function isCreated() { return $this->status === OrderStatus::STATUS_CREATED; } /** * Is this order paid for? * * @return bool */ public function isPaid() { return $this->status === OrderStatus::STATUS_PAID; } /** * Is this order authorized? * * @return bool */ public function isAuthorized() { return $this->status === OrderStatus::STATUS_AUTHORIZED; } /** * Is this order canceled? * * @return bool */ public function isCanceled() { return $this->status === OrderStatus::STATUS_CANCELED; } /** * (Deprecated) Is this order refunded? * @deprecated 2018-11-27 * * @return bool */ public function isRefunded() { return $this->status === OrderStatus::STATUS_REFUNDED; } /** * Is this order shipping? * * @return bool */ public function isShipping() { return $this->status === OrderStatus::STATUS_SHIPPING; } /** * Is this order completed? * * @return bool */ public function isCompleted() { return $this->status === OrderStatus::STATUS_COMPLETED; } /** * Is this order expired? * * @return bool */ public function isExpired() { return $this->status === OrderStatus::STATUS_EXPIRED; } /** * Is this order completed? * * @return bool */ public function isPending() { return $this->status === OrderStatus::STATUS_PENDING; } /** * Cancels this order. * If the order was partially shipped, the status will be "completed" instead of * "canceled". * Will throw a ApiException if the order id is invalid or the resource cannot * be found. * * @return Order * @throws \Mollie\Api\Exceptions\ApiException */ public function cancel() { return $this->client->orders->cancel($this->id, $this->getPresetOptions()); } /** * Cancel a line for this order. * The data array must contain a lines array. * You can pass an empty lines array if you want to cancel all eligible lines. * Returns null if successful. * * @param array $data * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function cancelLines(array $data) { return $this->client->orderLines->cancelFor($this, $data); } /** * Cancels all eligible lines for this order. * Returns null if successful. * * @param array|null $data * @return null * @throws \Mollie\Api\Exceptions\ApiException */ public function cancelAllLines($data = []) { $data['lines'] = []; return $this->client->orderLines->cancelFor($this, $data); } /** * Get the line value objects * * @return OrderLineCollection */ public function lines() { return ResourceFactory::createBaseResourceCollection( $this->client, OrderLine::class, $this->lines ); } /** * Create a shipment for some order lines. You can provide an empty array for the * "lines" option to include all unshipped lines for this order. * * @param array $options * * @return Shipment * @throws ApiException */ public function createShipment(array $options = []) { return $this->client->shipments->createFor($this, $this->withPresetOptions($options)); } /** * Create a shipment for all unshipped order lines. * * @param array $options * * @return Shipment */ public function shipAll(array $options = []) { $options['lines'] = []; return $this->createShipment($options); } /** * Retrieve a specific shipment for this order. * * @param string $shipmentId * @param array $parameters * * @return Shipment * @throws ApiException */ public function getShipment($shipmentId, array $parameters = []) { return $this->client->shipments->getFor($this, $shipmentId, $this->withPresetOptions($parameters)); } /** * Get all shipments for this order. * * @param array $parameters * * @return ShipmentCollection * @throws ApiException */ public function shipments(array $parameters = []) { return $this->client->shipments->listFor($this, $this->withPresetOptions($parameters)); } /** * Get the checkout URL where the customer can complete the payment. * * @return string|null */ public function getCheckoutUrl() { if (empty($this->_links->checkout)) { return null; } return $this->_links->checkout->href; } /** * Refund specific order lines. * * @param array $data * @return Refund * @throws ApiException */ public function refund(array $data) { return $this->client->orderRefunds->createFor($this, $this->withPresetOptions($data)); } /** * Refund all eligible order lines. * * @param array $data * @return Refund */ public function refundAll(array $data = []) { $data['lines'] = []; return $this->refund($data); } /** * Retrieves all refunds associated with this order * * @return RefundCollection * @throws \Mollie\Api\Exceptions\ApiException */ public function refunds() { if (! isset($this->_links->refunds->href)) { return new RefundCollection($this->client, 0, null); } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->refunds->href); return ResourceFactory::createCursorResourceCollection( $this->client, $result->_embedded->refunds, Refund::class, $result->_links ); } /** * Saves the order's updated billingAddress and/or shippingAddress. * * @return \Mollie\Api\Resources\Order * @throws \Mollie\Api\Exceptions\ApiException */ public function update() { $body = [ "billingAddress" => $this->billingAddress, "shippingAddress" => $this->shippingAddress, "orderNumber" => $this->orderNumber, "redirectUrl" => $this->redirectUrl, "cancelUrl" => $this->cancelUrl, "webhookUrl" => $this->webhookUrl, ]; $result = $this->client->orders->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Order($this->client)); } /** * Create a new payment for this Order. * * @param array $data * @param array $filters * @return \Mollie\Api\Resources\Payment * @throws \Mollie\Api\Exceptions\ApiException */ public function createPayment($data, $filters = []) { return $this->client->orderPayments->createFor($this, $data, $filters); } /** * Retrieve the payments for this order. * Requires the order to be retrieved using the embed payments parameter. * * @return null|\Mollie\Api\Resources\PaymentCollection */ public function payments() { if (! isset($this->_embedded, $this->_embedded->payments)) { return null; } return ResourceFactory::createCursorResourceCollection( $this->client, $this->_embedded->payments, Payment::class ); } /** * When accessed by oAuth we want to pass the testmode by default * * @return array */ private function getPresetOptions() { $options = []; if ($this->client->usesOAuth()) { $options["testmode"] = $this->mode === "test" ? true : false; } return $options; } /** * Apply the preset options. * * @param array $options * @return array */ private function withPresetOptions(array $options) { return array_merge($this->getPresetOptions(), $options); } }
Save
cmd:
run