Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.26 KB

ServiceType.md

File metadata and controls

51 lines (31 loc) · 1.26 KB

Simpay\Model\Response\ServiceType

The Simpay\Model\Response\ServiceType class represents the type of a service.

Properties

Name Type Description
$value string The value of the service type

Methods

__construct

private function __construct(string $type)

This method is the private constructor of the Simpay\Model\Response\ServiceType class. It takes in one parameter:

  • $type - The value of the service type (string)

It sets the $value property to the corresponding parameter value.

create

public static function create(string $type): self

This method is a static factory method that creates an instance of the Simpay\Model\Response\ServiceType class. It takes in one parameter:

  • $type - The value of the service type (string)

It returns a new instance of the Simpay\Model\Response\ServiceType class with the $value property set to the corresponding parameter value.

__toString

public function __toString(): string

This method is a magic method that returns the string representation of the ServiceType object. It returns the string value of the $value property.

Example

$type = ServiceType::create('top-up');

echo $type; // top-up