-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from saasus-platform/feature/en_doc_create
Add English document
- Loading branch information
Showing
6 changed files
with
238 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# PHP SDK for SaaSus Platform | ||
|
||
[Japanese page is here.](./README.md) | ||
|
||
--- | ||
|
||
## Preparing to use the SDK | ||
|
||
### Set Up | ||
|
||
``` | ||
composer config repositories.saasus-platform/saasus-sdk-php vcs https://github.com/saasus-platform/saasus-sdk-php | ||
``` | ||
|
||
### Added SDK | ||
|
||
``` | ||
composer require saasus-platform/saasus-sdk-php | ||
``` | ||
|
||
### Define Environment Variables | ||
|
||
```ini | ||
### for SaaSus Platform | ||
SAASUS_SAAS_ID="(SaaS ID on Screen)" | ||
SAASUS_API_KEY="(API KEY on Screen)" | ||
SAASUS_SECRET_KEY="(Client Secret on Screen)" | ||
SAASUS_LOGIN_URL="https://auth.sample.saasus.jp/ (Login Screen URL)" | ||
``` | ||
|
||
SAASUS_SAAS_ID, SAASUS_API_KEY, SAASUS_SECRET_KEY are the SaaS ID, API key and client secret displayed on the SaaS development console screen, | ||
SAASUS_LOGIN_URL sets the URL of the login screen created in the SaaS development console. | ||
|
||
### Incorporating the authentication module | ||
|
||
api/routes/web.php | ||
|
||
```php | ||
// Use Auth Middleware of SaaSus SDK standard | ||
Route::middleware(\AntiPatternInc\Saasus\Laravel\Middleware\Auth::class)->group(function () { | ||
// Write your own logic | ||
|
||
Route::redirect('/', '/xxxxxx'); | ||
}); | ||
``` | ||
|
||
--- | ||
|
||
## PHP SDK | ||
|
||
- [Auth](./generated/Auth/README_en.md) | ||
|
||
It is used for referencing/updating user information, basic information, authentication information, tenant information, role information, etc. | ||
|
||
- [Pricing](./generated/Pricing/README_en.md) | ||
|
||
It is used to refer to and update information related to charges, such as pricing units, function menus, charge plans, and metering unit counts. | ||
|
||
- [Billing](./generated/Billing/README_en.md) | ||
|
||
It is used for referencing/updating information related to external SaaS used in billing operations. | ||
|
||
--- | ||
|
||
## Use Case Sample | ||
|
||
In Preparation··· |
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,112 @@ | ||
# Auth | ||
|
||
For details (arguments, return values), [refer to the API document](https://docs.saasus.io/reference/getuserinfo) | ||
|
||
## User Info | ||
|
||
- GetUserInfo ... Get User Info | ||
|
||
## Basic Configuration | ||
|
||
- GetBasicInfo ... Get Basic Configurations | ||
- UpdateBasicInfo ... Update Basic Configurations | ||
|
||
- FindNotificationMessages ... Get Notification Email Templates | ||
- UpdateNotificationMessages ... Update Notification Email Template | ||
|
||
- GetCustomizePages ... Get Authentication Page Setting | ||
- UpdateCustomizePages ... Authentication Page Setting | ||
|
||
- GetCustomizePageSettings ... Get Authentication Authorization Basic Information | ||
- UpdateCustomizePageSettings ... Update Authentication Authorization Basic Information | ||
|
||
## Authentication Info | ||
|
||
- GetAuthInfo ... Get Authentication Info | ||
- UpdateAuthInfo ... Update Authentication Info | ||
- GetSignInSettings ... Get Password Requirements | ||
- UpdateSignInSettings ... Update Password Requirements | ||
|
||
## SaaS User Info | ||
|
||
- GetSaasUsers ... Get Users | ||
|
||
- GetSaasUser ... Get User | ||
- CreateSaasUser ... Create SaaS User | ||
- DeleteSaasUser ... Delete User | ||
|
||
- UpdateSaasUserPassword ... Change Password | ||
|
||
- UpdateSaasUserEmail ... Change Email | ||
|
||
- CreateSecretCode ... Creates secret code for authentication application registration | ||
- UpdateSoftwareToken ... Register Authentication Application | ||
|
||
- GetUserMfaPreference ... Get User's MFA Settings | ||
- UpdateUserMfaPreference ... Update User's MFA Settings | ||
|
||
### Tenant User Info | ||
|
||
- GetAllTenantUsers ... Get Users | ||
- GetAllTenantUser ... Get User Info | ||
|
||
- GetTenantUsers ... Get Tenant Users | ||
|
||
- GetTenantUser ... Get Tenant User | ||
- CreateTenantUser ... Create Tenant User | ||
|
||
- UpdateTenantUser ... Update Tenant User | ||
- DeleteTenantUser ... Delete Tenant User | ||
|
||
- CreateTenantUserRoles ... Create Tenant User Role | ||
- DeleteTenantUserRole ... Delete Role From Tenant User | ||
|
||
## Role Info | ||
|
||
- GetRoles ... Get Roles | ||
- CreateRole ... Create Role | ||
- DeleteRole ... Delete Role | ||
|
||
## User Attribute | ||
|
||
- GetUserAttributes ... Get User Attributes | ||
- CreateUserAttribute ... Create User Attributes | ||
- DeleteUserAttribute ... Delete User Attribute | ||
|
||
## Tenant Attribute | ||
|
||
- GetTenantAttributes ... Get Tenant Attributes | ||
- CreateTenantAttribute ... Create Tenant Attribute | ||
- DeleteTenantAttribute ... Delete Tenant Attribute | ||
|
||
## Tenant Info | ||
|
||
- GetTenants ... Get Tenants | ||
- GetTenant ... Get Tenant Details | ||
- CreateTenant ... Create Tenant | ||
- UpdateTenant ... Update Tenant Details | ||
- DeleteTenant ... Delete Tenant | ||
|
||
## SaaSus Info | ||
|
||
- GetApiKeys ... Get API Keys | ||
- CreateApiKey ... Create API Key | ||
- DeleteApiKey ... Delete API Key | ||
- GetSaasId ... Get SaasID | ||
- UpdateSaasId ... Update SaasID | ||
- GetClientSecret ... Get Client Secret | ||
- UpdateClientSecret ... Update Client Secret | ||
|
||
## Env Info | ||
|
||
- GetEnvs ... Get Env Info | ||
|
||
- GetEnv ... Get Env Details | ||
- CreateEnv ... Create Env Info | ||
- UpdateEnv ... Update Env Info | ||
- DeleteEnv ... Delete Env Info | ||
|
||
## Authentication/Authorization Info | ||
|
||
- GetAuthCredentials ... Get Authentication/Authorization Information | ||
- CreateAuthCredentials ... Save Authentication/Authorization Information |
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,9 @@ | ||
# Billing | ||
|
||
For details (arguments, return values), [refer to the API document](https://docs.saasus.io/reference/getstripeinfo) | ||
|
||
## Working with stripe resource | ||
|
||
- GetStripeInfo ... Get Stripe Connection information | ||
- UpdateStripeInfo ... Update Stripe Connection Info | ||
- DeleteStripeInfo ... Delete Stripe Connection |
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,39 @@ | ||
# Pricing | ||
|
||
For details (arguments, return values), [refer to the API document](https://docs.saasus.io/reference/getpricingunits) | ||
|
||
## Pricing Unit | ||
|
||
- GetPricingUnits ... Get Pricing Units | ||
|
||
- GetPricingUnit ... Get Pricing Unit | ||
- CreatePricingUnit ... Create Pricing Unit | ||
|
||
## Pricing Feature Menu | ||
|
||
- GetPricingMenus ... Get Pricing Feature Menus | ||
|
||
- GetPricingMenu ... Create a Pricing Feature Menu | ||
- CreatePricingMenu ... Get Pricing Feature Menu | ||
|
||
## Pricing Plan | ||
|
||
- GetPricingPlans ... Get Pricing Plans | ||
|
||
- GetPricingPlan ... Create Pricing Plan | ||
- CreatePricingPlan ... Get Pricing Plan | ||
|
||
## Metering | ||
|
||
- GetMeteringUnitDateCountByTenantIdAndUnitNameAndDate ... Get Metering Unit Count for Specific Date | ||
- UpdateMeteringUnitTimestampCount ... Update Metering Unit Count for Specified Timestamp | ||
- DeleteMeteringUnitTimestampCount ... Delete Metering Unit Count for Specified Timestamp | ||
|
||
- GetMeteringUnitDateCountByTenantIdAndUnitNameToday ... Get Metering Unit Count for the Current Day | ||
- UpdateMeteringUnitTimestampCountNow ... Update Metering Unit Count for Current Time | ||
|
||
- GetMeteringUnitMonthCountByTenantIdAndUnitNameThisMonth ... Get Metering Unit Count for the Current Month | ||
- GetMeteringUnitMonthCountByTenantIdAndUnitNameAndMonth ... Get the Metering Unit Count for the Specified Month | ||
|
||
- GetMeteringUnitDateCountsByTenantIdAndDate ... Get All Metering Unit Counts for a Specified Date | ||
- GetMeteringUnitMonthCountsByTenantIdAndMonth ... Get All Metering Unit Counts for the Specified Month |