| @@ 54-65 (lines=12) @@ | ||
| 51 | * @param string $identification_number Final Consumer Identification |
|
| 52 | * @return string|null |
|
| 53 | */ |
|
| 54 | public function validateFinalConsumer(string $identification_number) |
|
| 55 | { |
|
| 56 | $this->setError(null); |
|
| 57 | ||
| 58 | try { |
|
| 59 | $identification = new FinalCustomer(); |
|
| 60 | return $identification->validate($identification_number); |
|
| 61 | } catch (IdentificationException $e) { |
|
| 62 | $this->setError($e->getMessage()); |
|
| 63 | return null; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Validates the Ecuadorian Identification Card |
|
| @@ 73-84 (lines=12) @@ | ||
| 70 | * @param string $identification_number Number of Identification Card |
|
| 71 | * @return string|null |
|
| 72 | */ |
|
| 73 | public function validatePersonalIdentification(string $identification_number) |
|
| 74 | { |
|
| 75 | $this->setError(null); |
|
| 76 | ||
| 77 | try { |
|
| 78 | $identification = new PersonalIdentification(); |
|
| 79 | return $identification->validate($identification_number); |
|
| 80 | } catch (IdentificationException $e) { |
|
| 81 | $this->setError($e->getMessage()); |
|
| 82 | return null; |
|
| 83 | } |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * Validates the Ecuadorian RUC of Natural Person |
|
| @@ 92-103 (lines=12) @@ | ||
| 89 | * @param string $identification_number Number of RUC Natural Person |
|
| 90 | * @return string|null |
|
| 91 | */ |
|
| 92 | public function validateNaturalRuc(string $identification_number) |
|
| 93 | { |
|
| 94 | $this->setError(null); |
|
| 95 | ||
| 96 | try { |
|
| 97 | $identification = new NaturalRuc(); |
|
| 98 | return $identification->validate($identification_number); |
|
| 99 | } catch (IdentificationException $e) { |
|
| 100 | $this->setError($e->getMessage()); |
|
| 101 | return null; |
|
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Validates the Ecuadorian RUC of Public Companies |
|
| @@ 111-122 (lines=12) @@ | ||
| 108 | * @param string $identification_number Number of RUC Public Companies |
|
| 109 | * @return string|null |
|
| 110 | */ |
|
| 111 | public function validatePublicRuc(string $identification_number) |
|
| 112 | { |
|
| 113 | $this->setError(null); |
|
| 114 | ||
| 115 | try { |
|
| 116 | $identification = new PublicRuc(); |
|
| 117 | return $identification->validate($identification_number); |
|
| 118 | } catch (IdentificationException $e) { |
|
| 119 | $this->setError($e->getMessage()); |
|
| 120 | return null; |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * Validates the Ecuadorian RUC of Private Companies |
|
| @@ 130-141 (lines=12) @@ | ||
| 127 | * @param string $identification_number Number of RUC Private Companies |
|
| 128 | * @return string|null |
|
| 129 | */ |
|
| 130 | public function validatePrivateRuc(string $identification_number) |
|
| 131 | { |
|
| 132 | $this->setError(null); |
|
| 133 | ||
| 134 | try { |
|
| 135 | $identification = new PrivateRuc(); |
|
| 136 | return $identification->validate($identification_number); |
|
| 137 | } catch (IdentificationException $e) { |
|
| 138 | $this->setError($e->getMessage()); |
|
| 139 | return null; |
|
| 140 | } |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * Validates the Ecuadorian Ruc's |
|