Skip to content

Commit

Permalink
wl-36389: [EXP] Add info about available sessions to SDK model of int…
Browse files Browse the repository at this point in the history
…ro offers
  • Loading branch information
JKolerts committed May 26, 2022
1 parent 15ebe97 commit a24266a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions WellnessLiving/Config/WlConfigAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract class WlConfigAbstract
* @see \WellnessLiving\Config\WlConfigProduction
* @see \WellnessLiving\Config\WlConfigDeveloper
*/
protected const REGION_URL=null;
protected $REGION_URL=null;

/**
* List of rules, which is used to convert error codes to HTTP codes.
Expand Down Expand Up @@ -206,7 +206,7 @@ final public static function create(int $id_region): WlConfigAbstract
'text_message' => 'The COOKIE_PERSISTENT constant is not set. Use the correct parent class: WlConfigDeveloper or WlConfigProduction.'
]);

WlAssertException::assertTrue(is_array(static::REGION_URL),[
WlAssertException::assertTrue(is_array(static::$REGION_URL),[
'text_class' => static::class,
'text_message' => 'The REGION_URL constant is not set. Use the correct parent class: WlConfigDeveloper or WlConfigProduction.'
]);
Expand All @@ -218,7 +218,7 @@ final public static function create(int $id_region): WlConfigAbstract
'text_message' => 'Region does not exist. Please enter the correct region from "\WellnessLiving\WlRegionSid" class.'
]);

WlAssertException::assertTrue(isset(static::REGION_URL[$id_region]),[
WlAssertException::assertTrue(isset(static::$REGION_URL[$id_region]),[
'text_class' => static::class,
'text_message' => 'The URL endpoint API is not set for the requested data center region id. Let the developers know about it.'
]);
Expand Down Expand Up @@ -249,6 +249,6 @@ final public function csrfCode(string $s_session_key): string
*/
final public function url(): string
{
return static::REGION_URL[$this->id_region];
return static::$REGION_URL[$this->id_region];
}
}
2 changes: 1 addition & 1 deletion WellnessLiving/Config/WlConfigDeveloper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class WlConfigDeveloper extends WlConfigAbstract
/**
* @inheritDoc
*/
protected const REGION_URL = [
protected $REGION_URL = [
WlRegionSid::AP_SOUTHEAST_2 => 'https://demo.wellnessliving.com/',
WlRegionSid::US_EAST_1 => 'https://staging.wellnessliving.com/',
];
Expand Down
2 changes: 1 addition & 1 deletion WellnessLiving/Config/WlConfigProduction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class WlConfigProduction extends WlConfigAbstract
/**
* @inheritDoc
*/
protected const REGION_URL = [
protected $REGION_URL = [
WlRegionSid::AP_SOUTHEAST_2 => 'https://au.wellnessliving.com/',
WlRegionSid::US_EAST_1 => 'https://us.wellnessliving.com/',
];
Expand Down

0 comments on commit a24266a

Please sign in to comment.