-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dee83e5
commit cfd6016
Showing
11 changed files
with
163 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Shimoning\ColorMeShopApi\Communicator; | ||
|
||
class RequestMeta | ||
{ | ||
private string $_method; | ||
private string $_uri; | ||
private array $_options; | ||
|
||
public function __construct( | ||
string $method, | ||
string $uri, | ||
array $options, | ||
) { | ||
$this->_method = $method; | ||
$this->_uri = $uri; | ||
$this->_options = $options; | ||
} | ||
|
||
public function getMethod(): string | ||
{ | ||
return $this->_method; | ||
} | ||
public function getUri(): string | ||
{ | ||
return $this->_uri; | ||
} | ||
public function getOptions(): array | ||
{ | ||
return $this->_options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Shimoning\ColorMeShopApi\Constants; | ||
|
||
enum ErrorCode: string | ||
{ | ||
case NOT_FOUND = 404100; | ||
// case VALIDATE_ERROR_STOCK = 422022; | ||
case VALIDATE_ERROR_FIELD = 422210; | ||
|
||
static public function message() | ||
{ | ||
return [ | ||
self::NOT_FOUND => 'レコードが見つかりませんでした。', | ||
// self::VALIDATE_ERROR_STOCK => '', | ||
self::VALIDATE_ERROR_FIELD => 'パラメータが指定されていません。', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Shimoning\ColorMeShopApi\Constants; | ||
|
||
enum MailType: string | ||
{ | ||
case ACCEPTED = 'accepted'; | ||
case PAID = 'paid'; | ||
case DELIVERED = 'delivered'; | ||
|
||
public function name(): string | ||
{ | ||
return match ($this) { | ||
self::ACCEPTED => '受注メール', | ||
self::PAID => '入金確認メール', | ||
self::DELIVERED => '商品発送メール', | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters