/
home
/
techb158
/
immovalet.com
/
vendor
/
mollie
/
mollie-api-php
/
src
/
Resources
/
/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources
mkdir
upload
Name
Size
Mode
Actions
BaseCollection.php
586
0644
edit
dl
rm
BaseResource.php
313
0644
edit
dl
rm
Capture.php
1176
0644
edit
dl
rm
CaptureCollection.php
364
0644
edit
dl
rm
Chargeback.php
978
0644
edit
dl
rm
ChargebackCollection.php
373
0644
edit
dl
rm
CurrentProfile.php
809
0644
edit
dl
rm
CursorCollection.php
2468
0644
edit
dl
rm
Customer.php
5390
0644
edit
dl
rm
CustomerCollection.php
367
0644
edit
dl
rm
Invoice.php
1919
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
1869
0644
edit
dl
rm
MandateCollection.php
773
0644
edit
dl
rm
Method.php
2103
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
1120
0644
edit
dl
rm
Order.php
12538
0644
edit
dl
rm
OrderCollection.php
358
0644
edit
dl
rm
OrderLine.php
8508
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
Payment.php
17070
0644
edit
dl
rm
PaymentCollection.php
364
0644
edit
dl
rm
PaymentLink.php
2385
0644
edit
dl
rm
PaymentLinkCollection.php
377
0644
edit
dl
rm
Permission.php
396
0644
edit
dl
rm
PermissionCollection.php
222
0644
edit
dl
rm
Profile.php
5329
0644
edit
dl
rm
ProfileCollection.php
364
0644
edit
dl
rm
Refund.php
2699
0644
edit
dl
rm
RefundCollection.php
361
0644
edit
dl
rm
ResourceFactory.php
2046
0644
edit
dl
rm
Settlement.php
4602
0644
edit
dl
rm
SettlementCollection.php
373
0644
edit
dl
rm
Shipment.php
2708
0644
edit
dl
rm
ShipmentCollection.php
218
0644
edit
dl
rm
Subscription.php
4685
0644
edit
dl
rm
SubscriptionCollection.php
379
0644
edit
dl
rm
Edit:
/home/techb158/immovalet.com/vendor/mollie/mollie-api-php/src/Resources/Customer.php
(5390B)
<?php namespace Mollie\Api\Resources; class Customer extends BaseResource { /** * @var string */ public $resource; /** * Id of the customer. * * @var string */ public $id; /** * Either "live" or "test". Indicates this being a test or a live (verified) customer. * * @var string */ public $mode; /** * @var string */ public $name; /** * @var string */ public $email; /** * @var string|null */ public $locale; /** * @var \stdClass|mixed|null */ public $metadata; /** * @var string[]|array */ public $recentlyUsedMethods; /** * @var string */ public $createdAt; /** * @var \stdClass */ public $_links; /** * @return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Customer */ public function update() { $body = [ "name" => $this->name, "email" => $this->email, "locale" => $this->locale, "metadata" => $this->metadata, ]; $result = $this->client->customers->update($this->id, $body); return ResourceFactory::createFromApiResult($result, new Customer($this->client)); } /** * @param array $options * @param array $filters * * @return Payment */ public function createPayment(array $options = [], array $filters = []) { return $this->client->customerPayments->createFor($this, $this->withPresetOptions($options), $filters); } /** * Get all payments for this customer * * @return PaymentCollection */ public function payments() { return $this->client->customerPayments->listFor($this, null, null, $this->getPresetOptions()); } /** * @param array $options * @param array $filters * * @return Subscription */ public function createSubscription(array $options = [], array $filters = []) { return $this->client->subscriptions->createFor($this, $this->withPresetOptions($options), $filters); } /** * @param string $subscriptionId * @param array $parameters * * @return Subscription */ public function getSubscription($subscriptionId, array $parameters = []) { return $this->client->subscriptions->getFor($this, $subscriptionId, $this->withPresetOptions($parameters)); } /** * @param string $subscriptionId * * @return null */ public function cancelSubscription($subscriptionId) { return $this->client->subscriptions->cancelFor($this, $subscriptionId, $this->getPresetOptions()); } /** * Get all subscriptions for this customer * * @return SubscriptionCollection */ public function subscriptions() { return $this->client->subscriptions->listFor($this, null, null, $this->getPresetOptions()); } /** * @param array $options * @param array $filters * * @return Mandate */ public function createMandate(array $options = [], array $filters = []) { return $this->client->mandates->createFor($this, $this->withPresetOptions($options), $filters); } /** * @param string $mandateId * @param array $parameters * * @return Mandate */ public function getMandate($mandateId, array $parameters = []) { return $this->client->mandates->getFor($this, $mandateId, $parameters); } /** * @param string $mandateId * * @return null */ public function revokeMandate($mandateId) { return $this->client->mandates->revokeFor($this, $mandateId, $this->getPresetOptions()); } /** * Get all mandates for this customer * * @return MandateCollection */ public function mandates() { return $this->client->mandates->listFor($this, null, null, $this->getPresetOptions()); } /** * Helper function to check for mandate with status valid * * @return bool */ public function hasValidMandate() { $mandates = $this->mandates(); foreach ($mandates as $mandate) { if ($mandate->isValid()) { return true; } } return false; } /** * Helper function to check for specific payment method mandate with status valid * * @return bool */ public function hasValidMandateForMethod($method) { $mandates = $this->mandates(); foreach ($mandates as $mandate) { if ($mandate->method === $method && $mandate->isValid()) { return true; } } return false; } /** * 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