├── .gitignore ├── Apigee ├── Exceptions │ ├── IllegalMethodException.php │ ├── NotImplementedException.php │ ├── ParameterException.php │ ├── ResponseException.php │ ├── SamlResponseException.php │ └── TooManyAttributesException.php ├── ManagementAPI │ ├── APIProduct.php │ ├── AbstractApp.php │ ├── Base.php │ ├── Company.php │ ├── CompanyApp.php │ ├── CompanyInvitation.php │ ├── CompanyInviteRequest.php │ ├── Developer.php │ ├── DeveloperApp.php │ ├── DeveloperAppAnalytics.php │ ├── KeyValueMap.php │ ├── Organization.php │ └── UserRole.php ├── Mint │ ├── Application.php │ ├── ApplicationCategory.php │ ├── BankDetail.php │ ├── Base │ │ └── BaseObject.php │ ├── BillingDocument.php │ ├── DataStructures │ │ ├── Address.php │ │ ├── BillingMonth.php │ │ ├── DataStructure.php │ │ ├── DeveloperBalanceTransaction.php │ │ ├── DeveloperTnc.php │ │ ├── MintCriteria.php │ │ ├── Payment.php │ │ ├── RatePlanDetail.php │ │ ├── RatePlanRate.php │ │ ├── RevenueReport.php │ │ └── SupportedCurrency.php │ ├── Developer.php │ ├── DeveloperBalance.php │ ├── DeveloperCategory.php │ ├── DeveloperRatePlan.php │ ├── DeveloperRateplanCounter.php │ ├── Exceptions │ │ ├── InsufficientFundsException.php │ │ └── MintApiException.php │ ├── Limit.php │ ├── ManagementAPIOrganization.php │ ├── MonetizationPackage.php │ ├── Organization.php │ ├── PricePoint.php │ ├── Product.php │ ├── Provider.php │ ├── RatePlan.php │ ├── ReportDefinition.php │ ├── SuborgProduct.php │ ├── TermAndCondition.php │ └── Types │ │ ├── ApplicationStatusType.php │ │ ├── BillingCycleType.php │ │ ├── BillingDocumentType.php │ │ ├── BillingType.php │ │ ├── Country.php │ │ ├── DeveloperStatusType.php │ │ ├── DeveloperTncsActionType.php │ │ ├── DeveloperType.php │ │ ├── DurationType.php │ │ ├── MeteringType.php │ │ ├── MonthType.php │ │ ├── OrgType.php │ │ ├── QuotaPeriodType.php │ │ ├── QuotaType.php │ │ ├── RatePlanRateType.php │ │ ├── RatePlanType.php │ │ ├── RecurringType.php │ │ ├── RevenueType.php │ │ ├── StatusType.php │ │ ├── TaxModelType.php │ │ └── Type.php ├── SmartDocs │ ├── Doc.php │ ├── Method.php │ ├── Model.php │ ├── Resource.php │ ├── Revision.php │ ├── Security.php │ ├── Security │ │ ├── ApiKeyScheme.php │ │ ├── ApiKeyTemplateAuthScheme.php │ │ ├── BasicScheme.php │ │ ├── Oauth2Scheme.php │ │ ├── Oauth2TemplateAuthScheme.php │ │ ├── SecurityScheme.php │ │ └── TemplateAuthScheme.php │ ├── Template.php │ └── TemplateAuth.php ├── Util │ ├── APIObject.php │ ├── CacheFactory.php │ ├── CacheManager.php │ ├── CredentialStorageInterface.php │ ├── DebugData.php │ ├── FilesystemCredentialStorage.php │ ├── KeyValueStoreInterface.php │ └── OrgConfig.php └── test │ ├── AbstractAPITest.php │ ├── ManagementAPI │ ├── APIProductTest.php │ ├── DeveloperAppTest.php │ └── DeveloperTest.php │ └── example.config.yml ├── LICENSE.txt ├── README.md ├── build.xml ├── composer.json ├── docs ├── 404.html ├── class-Apigee.Exceptions.IllegalMethodException.html ├── class-Apigee.Exceptions.NotImplementedException.html ├── class-Apigee.Exceptions.ParameterException.html ├── class-Apigee.Exceptions.ResponseException.html ├── class-Apigee.Exceptions.TooManyAttributesException.html ├── class-Apigee.ManagementAPI.APIProduct.html ├── class-Apigee.ManagementAPI.AbstractApp.html ├── class-Apigee.ManagementAPI.Base.html ├── class-Apigee.ManagementAPI.Company.html ├── class-Apigee.ManagementAPI.CompanyApp.html ├── class-Apigee.ManagementAPI.CompanyInvitation.html ├── class-Apigee.ManagementAPI.CompanyInviteRequest.html ├── class-Apigee.ManagementAPI.Developer.html ├── class-Apigee.ManagementAPI.DeveloperApp.html ├── class-Apigee.ManagementAPI.DeveloperAppAnalytics.html ├── class-Apigee.ManagementAPI.KeyValueMap.html ├── class-Apigee.ManagementAPI.Organization.html ├── class-Apigee.ManagementAPI.UserRole.html ├── class-Apigee.Mint.Application.html ├── class-Apigee.Mint.ApplicationCategory.html ├── class-Apigee.Mint.BankDetail.html ├── class-Apigee.Mint.Base.BaseObject.html ├── class-Apigee.Mint.BillingDocument.html ├── class-Apigee.Mint.DataStructures.Address.html ├── class-Apigee.Mint.DataStructures.BillingMonth.html ├── class-Apigee.Mint.DataStructures.DataStructure.html ├── class-Apigee.Mint.DataStructures.DeveloperBalanceTransaction.html ├── class-Apigee.Mint.DataStructures.DeveloperTnc.html ├── class-Apigee.Mint.DataStructures.MintCriteria.html ├── class-Apigee.Mint.DataStructures.Payment.html ├── class-Apigee.Mint.DataStructures.RatePlanDetail.html ├── class-Apigee.Mint.DataStructures.RatePlanRate.html ├── class-Apigee.Mint.DataStructures.RevenueReport.html ├── class-Apigee.Mint.DataStructures.SupportedCurrency.html ├── class-Apigee.Mint.Developer.html ├── class-Apigee.Mint.DeveloperBalance.html ├── class-Apigee.Mint.DeveloperCategory.html ├── class-Apigee.Mint.DeveloperRatePlan.html ├── class-Apigee.Mint.DeveloperRateplanCounter.html ├── class-Apigee.Mint.Exceptions.InsufficientFundsException.html ├── class-Apigee.Mint.Exceptions.MintApiException.html ├── class-Apigee.Mint.Limit.html ├── class-Apigee.Mint.ManagementAPIOrganization.html ├── class-Apigee.Mint.MonetizationPackage.html ├── class-Apigee.Mint.Organization.html ├── class-Apigee.Mint.PricePoint.html ├── class-Apigee.Mint.Product.html ├── class-Apigee.Mint.Provider.html ├── class-Apigee.Mint.RatePlan.html ├── class-Apigee.Mint.ReportDefinition.html ├── class-Apigee.Mint.SuborgProduct.html ├── class-Apigee.Mint.TermAndCondition.html ├── class-Apigee.Mint.Types.ApplicationStatusType.html ├── class-Apigee.Mint.Types.BillingCycleType.html ├── class-Apigee.Mint.Types.BillingDocumentType.html ├── class-Apigee.Mint.Types.BillingType.html ├── class-Apigee.Mint.Types.Country.html ├── class-Apigee.Mint.Types.DeveloperStatusType.html ├── class-Apigee.Mint.Types.DeveloperTncsActionType.html ├── class-Apigee.Mint.Types.DeveloperType.html ├── class-Apigee.Mint.Types.DurationType.html ├── class-Apigee.Mint.Types.MeteringType.html ├── class-Apigee.Mint.Types.MonthType.html ├── class-Apigee.Mint.Types.OrgType.html ├── class-Apigee.Mint.Types.QuotaPeriodType.html ├── class-Apigee.Mint.Types.QuotaType.html ├── class-Apigee.Mint.Types.RatePlanRateType.html ├── class-Apigee.Mint.Types.RatePlanType.html ├── class-Apigee.Mint.Types.RecurringType.html ├── class-Apigee.Mint.Types.RevenueType.html ├── class-Apigee.Mint.Types.StatusType.html ├── class-Apigee.Mint.Types.TaxModelType.html ├── class-Apigee.Mint.Types.Type.html ├── class-Apigee.SmartDocs.Doc.html ├── class-Apigee.SmartDocs.Method.html ├── class-Apigee.SmartDocs.Model.html ├── class-Apigee.SmartDocs.Resource.html ├── class-Apigee.SmartDocs.Revision.html ├── class-Apigee.SmartDocs.Security.ApiKeyScheme.html ├── class-Apigee.SmartDocs.Security.ApiKeyTemplateAuthScheme.html ├── class-Apigee.SmartDocs.Security.BasicScheme.html ├── class-Apigee.SmartDocs.Security.Oauth2Scheme.html ├── class-Apigee.SmartDocs.Security.Oauth2TemplateAuthScheme.html ├── class-Apigee.SmartDocs.Security.SecurityScheme.html ├── class-Apigee.SmartDocs.Security.TemplateAuthScheme.html ├── class-Apigee.SmartDocs.Security.html ├── class-Apigee.SmartDocs.Template.html ├── class-Apigee.SmartDocs.TemplateAuth.html ├── class-Apigee.Util.APIObject.html ├── class-Apigee.Util.CacheFactory.html ├── class-Apigee.Util.CacheManager.html ├── class-Apigee.Util.DebugData.html ├── class-Apigee.Util.OrgConfig.html ├── class-Apigee.test.AbstractAPITest.html ├── class-Apigee.test.ManagementAPI.APIProductTest.html ├── class-Apigee.test.ManagementAPI.DeveloperAppTest.html ├── class-Apigee.test.ManagementAPI.DeveloperTest.html ├── elementlist.js ├── index.html ├── namespace-Apigee.Exceptions.html ├── namespace-Apigee.ManagementAPI.html ├── namespace-Apigee.Mint.Base.html ├── namespace-Apigee.Mint.DataStructures.html ├── namespace-Apigee.Mint.Exceptions.html ├── namespace-Apigee.Mint.Types.html ├── namespace-Apigee.Mint.html ├── namespace-Apigee.SmartDocs.Security.html ├── namespace-Apigee.SmartDocs.html ├── namespace-Apigee.Util.html ├── namespace-Apigee.html ├── namespace-Apigee.test.ManagementAPI.html ├── namespace-Apigee.test.html ├── resources │ ├── collapsed.png │ ├── combined.js │ ├── footer.png │ ├── inherit.png │ ├── resize.png │ ├── sort.png │ ├── style.css │ ├── tree-cleaner.png │ ├── tree-hasnext.png │ ├── tree-last.png │ └── tree-vertical.png ├── source-class-Apigee.Exceptions.IllegalMethodException.html ├── source-class-Apigee.Exceptions.NotImplementedException.html ├── source-class-Apigee.Exceptions.ParameterException.html ├── source-class-Apigee.Exceptions.ResponseException.html ├── source-class-Apigee.Exceptions.TooManyAttributesException.html ├── source-class-Apigee.ManagementAPI.APIProduct.html ├── source-class-Apigee.ManagementAPI.AbstractApp.html ├── source-class-Apigee.ManagementAPI.Base.html ├── source-class-Apigee.ManagementAPI.Company.html ├── source-class-Apigee.ManagementAPI.CompanyApp.html ├── source-class-Apigee.ManagementAPI.CompanyInvitation.html ├── source-class-Apigee.ManagementAPI.CompanyInviteRequest.html ├── source-class-Apigee.ManagementAPI.Developer.html ├── source-class-Apigee.ManagementAPI.DeveloperApp.html ├── source-class-Apigee.ManagementAPI.DeveloperAppAnalytics.html ├── source-class-Apigee.ManagementAPI.KeyValueMap.html ├── source-class-Apigee.ManagementAPI.Organization.html ├── source-class-Apigee.ManagementAPI.UserRole.html ├── source-class-Apigee.Mint.Application.html ├── source-class-Apigee.Mint.ApplicationCategory.html ├── source-class-Apigee.Mint.BankDetail.html ├── source-class-Apigee.Mint.Base.BaseObject.html ├── source-class-Apigee.Mint.BillingDocument.html ├── source-class-Apigee.Mint.DataStructures.Address.html ├── source-class-Apigee.Mint.DataStructures.BillingMonth.html ├── source-class-Apigee.Mint.DataStructures.DataStructure.html ├── source-class-Apigee.Mint.DataStructures.DeveloperBalanceTransaction.html ├── source-class-Apigee.Mint.DataStructures.DeveloperTnc.html ├── source-class-Apigee.Mint.DataStructures.MintCriteria.html ├── source-class-Apigee.Mint.DataStructures.Payment.html ├── source-class-Apigee.Mint.DataStructures.RatePlanDetail.html ├── source-class-Apigee.Mint.DataStructures.RatePlanRate.html ├── source-class-Apigee.Mint.DataStructures.RevenueReport.html ├── source-class-Apigee.Mint.DataStructures.SupportedCurrency.html ├── source-class-Apigee.Mint.Developer.html ├── source-class-Apigee.Mint.DeveloperBalance.html ├── source-class-Apigee.Mint.DeveloperCategory.html ├── source-class-Apigee.Mint.DeveloperRatePlan.html ├── source-class-Apigee.Mint.DeveloperRateplanCounter.html ├── source-class-Apigee.Mint.Exceptions.InsufficientFundsException.html ├── source-class-Apigee.Mint.Exceptions.MintApiException.html ├── source-class-Apigee.Mint.Limit.html ├── source-class-Apigee.Mint.ManagementAPIOrganization.html ├── source-class-Apigee.Mint.MonetizationPackage.html ├── source-class-Apigee.Mint.Organization.html ├── source-class-Apigee.Mint.PricePoint.html ├── source-class-Apigee.Mint.Product.html ├── source-class-Apigee.Mint.Provider.html ├── source-class-Apigee.Mint.RatePlan.html ├── source-class-Apigee.Mint.ReportDefinition.html ├── source-class-Apigee.Mint.SuborgProduct.html ├── source-class-Apigee.Mint.TermAndCondition.html ├── source-class-Apigee.Mint.Types.ApplicationStatusType.html ├── source-class-Apigee.Mint.Types.BillingCycleType.html ├── source-class-Apigee.Mint.Types.BillingDocumentType.html ├── source-class-Apigee.Mint.Types.BillingType.html ├── source-class-Apigee.Mint.Types.Country.html ├── source-class-Apigee.Mint.Types.DeveloperStatusType.html ├── source-class-Apigee.Mint.Types.DeveloperTncsActionType.html ├── source-class-Apigee.Mint.Types.DeveloperType.html ├── source-class-Apigee.Mint.Types.DurationType.html ├── source-class-Apigee.Mint.Types.MeteringType.html ├── source-class-Apigee.Mint.Types.MonthType.html ├── source-class-Apigee.Mint.Types.OrgType.html ├── source-class-Apigee.Mint.Types.QuotaPeriodType.html ├── source-class-Apigee.Mint.Types.QuotaType.html ├── source-class-Apigee.Mint.Types.RatePlanRateType.html ├── source-class-Apigee.Mint.Types.RatePlanType.html ├── source-class-Apigee.Mint.Types.RecurringType.html ├── source-class-Apigee.Mint.Types.RevenueType.html ├── source-class-Apigee.Mint.Types.StatusType.html ├── source-class-Apigee.Mint.Types.TaxModelType.html ├── source-class-Apigee.Mint.Types.Type.html ├── source-class-Apigee.SmartDocs.Doc.html ├── source-class-Apigee.SmartDocs.Method.html ├── source-class-Apigee.SmartDocs.Model.html ├── source-class-Apigee.SmartDocs.Resource.html ├── source-class-Apigee.SmartDocs.Revision.html ├── source-class-Apigee.SmartDocs.Security.ApiKeyScheme.html ├── source-class-Apigee.SmartDocs.Security.ApiKeyTemplateAuthScheme.html ├── source-class-Apigee.SmartDocs.Security.BasicScheme.html ├── source-class-Apigee.SmartDocs.Security.Oauth2Scheme.html ├── source-class-Apigee.SmartDocs.Security.Oauth2TemplateAuthScheme.html ├── source-class-Apigee.SmartDocs.Security.SecurityScheme.html ├── source-class-Apigee.SmartDocs.Security.TemplateAuthScheme.html ├── source-class-Apigee.SmartDocs.Security.html ├── source-class-Apigee.SmartDocs.Template.html ├── source-class-Apigee.SmartDocs.TemplateAuth.html ├── source-class-Apigee.Util.APIObject.html ├── source-class-Apigee.Util.CacheFactory.html ├── source-class-Apigee.Util.CacheManager.html ├── source-class-Apigee.Util.DebugData.html ├── source-class-Apigee.Util.OrgConfig.html ├── source-class-Apigee.test.AbstractAPITest.html ├── source-class-Apigee.test.ManagementAPI.APIProductTest.html ├── source-class-Apigee.test.ManagementAPI.DeveloperAppTest.html └── source-class-Apigee.test.ManagementAPI.DeveloperTest.html └── phpunit.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/** 2 | /composer.lock 3 | /Apigee/test/config.yml 4 | /.idea 5 | 6 | -------------------------------------------------------------------------------- /Apigee/Exceptions/IllegalMethodException.php: -------------------------------------------------------------------------------- 1 | uri = $uri; 51 | $this->params = $params; 52 | $this->responseBody = $response_body; 53 | $this->responseObj = null; 54 | $this->requestObj = null; 55 | } 56 | 57 | /** 58 | * Returns URI which triggered the exception, if available. 59 | * 60 | * @return null|string 61 | */ 62 | public function getUri() 63 | { 64 | return $this->uri; 65 | } 66 | 67 | /** 68 | * Returns an array of useful debug information, if available. 69 | * 70 | * Possible members of this array: 71 | * - request_headers: string 72 | * - response_headers: string 73 | * - request_body: string 74 | * @return array|null 75 | */ 76 | public function getParams() 77 | { 78 | return $this->params; 79 | } 80 | 81 | /** 82 | * Returns response text from the remote server, if available. 83 | * 84 | * @return null|string 85 | */ 86 | public function getResponse() 87 | { 88 | return $this->responseBody; 89 | } 90 | 91 | /** 92 | * Returns an HTML-formatted string representation of the exception. 93 | * 94 | * @return string 95 | * @internal 96 | */ 97 | public function __toString() 98 | { 99 | $msg = $this->getMessage(); 100 | 101 | if (is_object($this->requestObj) && $this->requestObj instanceof \Guzzle\Http\Message\Request) { 102 | $request = array( 103 | 'url' => $this->requestObj->getUrl(), 104 | 'host' => $this->requestObj->getHost(), 105 | 'headers' => $this->requestObj->getRawHeaders(), 106 | 'query' => (string)$this->requestObj->getQuery() 107 | ); 108 | if ($this->requestObj instanceof \Guzzle\Http\Message\EntityEnclosingRequestInterface) { 109 | $request_body = $this->requestObj->getBody(); 110 | $request['content-type'] = $request_body->getContentType(); 111 | $request['content-length'] = $request_body->getContentLength(); 112 | $request['body'] = $request_body->__toString(); 113 | } 114 | $msg .= "\n\nRequest:
" . htmlspecialchars(print_r($request, true)) . '
'; 115 | } 116 | 117 | if (is_object($this->responseObj) && $this->responseObj instanceof \Guzzle\Http\Message\Response) { 118 | $response = array( 119 | 'status' => $this->responseObj->getStatusCode(), 120 | 'headers' => $this->responseObj->getRawHeaders(), 121 | 'body' => $this->responseBody 122 | ); 123 | $msg .= "\n\nResponse:
" . htmlspecialchars(print_r($response, true)) . '
'; 124 | } 125 | 126 | return $msg; 127 | } 128 | 129 | /** 130 | * Poor man's replacement for PECL http_build_url(). 131 | * 132 | * @param array $components 133 | * @return string 134 | */ 135 | private static function httpBuildUrl($components) 136 | { 137 | $uri = $components['scheme'] . '://' . $components['host']; 138 | if (array_key_exists('port', $components) && !empty($components['port'])) { 139 | $uri .= ':' . $components['port']; 140 | } 141 | $uri .= $components['path']; 142 | if (array_key_exists('query', $components) && !empty($components['query'])) { 143 | $uri .= '?' . $components['query']; 144 | } 145 | if (array_key_exists('fragment', $components) && !empty($components['fragment'])) { 146 | $uri .= '#' . $components['fragment']; 147 | } 148 | return $uri; 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Apigee/Exceptions/SamlResponseException.php: -------------------------------------------------------------------------------- 1 | attributes must be in scope (protected or public). 37 | * 38 | * @param array $payload 39 | */ 40 | protected function writeAttributes(array &$payload) 41 | { 42 | if (property_exists($this, 'attributes') && !empty($this->attributes)) { 43 | $payload['attributes'] = array(); 44 | foreach ($this->attributes as $name => $value) { 45 | if ($name == 'apiResourcesInfo' && is_array($value)) { 46 | $value = json_encode($value); 47 | } 48 | $payload['attributes'][] = array('name' => $name, 'value' => (string)$value); 49 | } 50 | } 51 | } 52 | 53 | /** 54 | * Reads the response from the Management API and populates the $attributes 55 | * member of the Base subclass. Note that $this->attributes must be in scope 56 | * (protected or public). 57 | * 58 | * @param array $response 59 | * @param bool $return 60 | * @return array|void 61 | */ 62 | protected function readAttributes($response, $return = false) 63 | { 64 | $attributes = array(); 65 | 66 | // We cannot use property_exists() because it ignores scope. 67 | // But get_object_vars only returns variables within current scope. 68 | $this_attributes = get_object_vars($this); 69 | $has_attributes = (array_key_exists('attributes', $this_attributes) && is_array($this->attributes)); 70 | 71 | if ($has_attributes) { 72 | if (isset($response['attributes']) && is_array($response['attributes'])) { 73 | foreach ($response['attributes'] as $attr) { 74 | if (!is_array($attr) || !array_key_exists('name', $attr) || !array_key_exists('value', $attr)) { 75 | continue; 76 | } 77 | if ($attr['name'] == 'apiResourcesInfo') { 78 | $attr['value'] = @json_decode($attr['value'], true); 79 | } 80 | $attributes[$attr['name']] = $attr['value']; 81 | } 82 | } 83 | } 84 | if ($return) { 85 | return $attributes; 86 | } 87 | if ($has_attributes) { 88 | $this->attributes = $attributes; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Apigee/ManagementAPI/CompanyApp.php: -------------------------------------------------------------------------------- 1 | companyName; 28 | } 29 | 30 | /** 31 | * Initializes this object 32 | * 33 | * @param \Apigee\Util\OrgConfig $config 34 | * @param mixed $company 35 | */ 36 | public function __construct(OrgConfig $config, $company) 37 | { 38 | $this->blankValues(); 39 | $this->ownerIdentifierField = 'companyName'; 40 | if ($company instanceof Company) { 41 | $this->companyName = $company->getName(); 42 | } else { 43 | // $developer may be either an email or a developerId. 44 | $this->companyName = $company; 45 | } 46 | $baseUrl = '/o/' . rawurlencode($config->orgName) . '/companies/' . $this->companyName . '/apps'; 47 | $this->init($config, $baseUrl); 48 | } 49 | 50 | /** 51 | * {@inheritDoc} 52 | */ 53 | public function getListDetail($companyName = null) 54 | { 55 | $allApps = array(); 56 | $companyName = $companyName ? : $this->companyName; 57 | 58 | // Per-company app listing paging is not enabled at this time. 59 | $this->get('?expand=true'); 60 | $list = $this->responseObj; 61 | if (array_key_exists('app', $list)) { 62 | foreach ($list['app'] as $response) { 63 | $app = new CompanyApp($this->getConfig(), $companyName); 64 | self::loadFromResponse($app, $response, $companyName); 65 | $allApps[] = $app; 66 | } 67 | } 68 | 69 | return $allApps; 70 | } 71 | 72 | /** 73 | * {@inheritDoc} 74 | */ 75 | public function blankValues() 76 | { 77 | $this->companyName = ''; 78 | parent::blankValues(); 79 | } 80 | 81 | /** 82 | * {@inheritdoc} 83 | */ 84 | public static function afterLoad(AbstractApp &$obj, array $response, $ownerIdentifier) 85 | { 86 | $obj->companyName = $response['companyName']; 87 | } 88 | 89 | /** 90 | * {@inheritdoc} 91 | */ 92 | protected function alterAttributes(array &$payload) 93 | { 94 | if (!$this->pagingEnabled || count($this->attributes) < self::MAX_ATTRIBUTE_COUNT) { 95 | $this->attributes['Company'] = $this->companyName; 96 | } 97 | } 98 | 99 | /** 100 | * {@inheritdoc} 101 | */ 102 | public function getAppProperties($class = __CLASS__) 103 | { 104 | $properties = parent::getAppProperties(__CLASS__); 105 | $properties[] = 'companyName'; 106 | return $properties; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Apigee/Mint/ApplicationCategory.php: -------------------------------------------------------------------------------- 1 | orgName) . '/application-categories'; 29 | $this->init($config, $base_url); 30 | $this->idField = 'id'; 31 | $this->wrapperTag = 'applicationCategory'; 32 | $this->initValues(); 33 | } 34 | 35 | protected function initValues() 36 | { 37 | $this->description = ''; 38 | $this->name = ''; 39 | $this->id = ''; 40 | } 41 | 42 | public function loadFromRawData($data, $reset = false) 43 | { 44 | if ($reset) { 45 | $this->initValues(); 46 | } 47 | foreach (array('description', 'id', 'name') as $field) { 48 | $this->$field = (isset($data[$field]) ? $data[$field] : null); 49 | } 50 | } 51 | 52 | public function __toString() 53 | { 54 | $obj = array( 55 | 'description' => $this->description, 56 | 'id' => $this->id, 57 | 'name' => $this->name 58 | ); 59 | return json_encode($obj); 60 | } 61 | 62 | public function instantiateNew() 63 | { 64 | return new ApplicationCategory($this->config); 65 | } 66 | 67 | /* 68 | * accessors (getters/setters) 69 | */ 70 | public function getDescription() 71 | { 72 | return $this->description; 73 | } 74 | 75 | public function setDescription($desc) 76 | { 77 | $this->description = (string)$desc; 78 | } 79 | 80 | public function getId() 81 | { 82 | return $this->id; 83 | } 84 | 85 | // Used in data load invoked by $this->loadFromRawData() 86 | private function setId($id) 87 | { 88 | $this->id = $id; 89 | } 90 | 91 | public function getName() 92 | { 93 | return $this->name; 94 | } 95 | 96 | public function setName($name) 97 | { 98 | $this->name = (string)$name; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/Address.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data); 23 | } 24 | } 25 | 26 | public function setAddress1($address1) 27 | { 28 | $this->address1 = $address1; 29 | } 30 | 31 | public function getAddress1() 32 | { 33 | return $this->address1; 34 | } 35 | 36 | public function setAddress2($address2) 37 | { 38 | $this->address2 = $address2; 39 | } 40 | 41 | public function getAddress2() 42 | { 43 | return $this->address2; 44 | } 45 | 46 | public function setCity($city) 47 | { 48 | $this->city = $city; 49 | } 50 | 51 | public function getCity() 52 | { 53 | return $this->city; 54 | } 55 | 56 | public function setCountry($country_code) 57 | { 58 | // Only set country if it is valid. 59 | if (Country::validateCountryCode($country_code)) { 60 | $this->country = $country_code; 61 | } elseif ($country_code == 'UK') { 62 | // Change incorrect United Kingdom 'UK' country code to 'GB'. 63 | $this->country = 'GB'; 64 | } else { 65 | APIObject::$logger->error('Invalid country code "' . $country_code . '" passed from Edge MGMT API.'); 66 | } 67 | } 68 | 69 | public function getCountry() 70 | { 71 | return $this->country; 72 | } 73 | 74 | public function setId($id) 75 | { 76 | $this->id = $id; 77 | } 78 | 79 | public function getId() 80 | { 81 | return $this->id; 82 | } 83 | 84 | public function setIsPrimary($is_primary) 85 | { 86 | $this->isPrimary = $is_primary; 87 | } 88 | 89 | public function isPrimary() 90 | { 91 | return $this->isPrimary; 92 | } 93 | 94 | public function setState($state) 95 | { 96 | $this->state = $state; 97 | } 98 | 99 | public function getState() 100 | { 101 | return $this->state; 102 | } 103 | 104 | public function setZip($zip) 105 | { 106 | $this->zip = $zip; 107 | } 108 | 109 | public function getZip() 110 | { 111 | return $this->zip; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/BillingMonth.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data); 18 | } 19 | 20 | public function setMonth($month) 21 | { 22 | $this->month = $month; 23 | } 24 | 25 | public function getMonth() 26 | { 27 | return $this->month; 28 | } 29 | 30 | public function setMonthEnum($month_enum) 31 | { 32 | $this->monthEnum = $month_enum; 33 | } 34 | 35 | public function getMonthEnum() 36 | { 37 | return $this->monthEnum; 38 | } 39 | 40 | public function setStatus($status) 41 | { 42 | $this->status = $status; 43 | } 44 | 45 | public function getStatus() 46 | { 47 | return $this->status; 48 | } 49 | 50 | public function setYear($year) 51 | { 52 | $this->year = $year; 53 | } 54 | 55 | public function getYear() 56 | { 57 | return $this->year; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/DeveloperTnc.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data, $excluded_properties); 24 | } 25 | } 26 | 27 | public function getAction() 28 | { 29 | return $this->action; 30 | } 31 | 32 | public function setAction($action) 33 | { 34 | $this->action = DeveloperTncsActionType::get($action); 35 | } 36 | 37 | public function getAuditDate() 38 | { 39 | return $this->auditDate; 40 | } 41 | 42 | public function setAuditDate($audit_date) 43 | { 44 | $this->auditDate = $audit_date; 45 | } 46 | 47 | public function getId() 48 | { 49 | return $this->id; 50 | } 51 | 52 | public function setId($id) 53 | { 54 | $this->id = $id; 55 | } 56 | 57 | /** 58 | * @return TermAndCondition 59 | */ 60 | public function getTnc() 61 | { 62 | return $this->tnc; 63 | } 64 | 65 | /** 66 | * @param TermAndCondition $tnc 67 | */ 68 | public function setTnc(TermAndCondition $tnc) 69 | { 70 | $this->tnc = $tnc; 71 | } 72 | 73 | public function __toString() 74 | { 75 | $object = array( 76 | 'action' => $this->action, 77 | 'auditDate' => $this->auditDate, 78 | 'id' => $this->id, 79 | ); 80 | return json_encode($object, JSON_FORCE_OBJECT); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/MintCriteria.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data); 59 | } 60 | } 61 | 62 | // accessors/setters 63 | public function asXorg() 64 | { 65 | return $this->asXorg; 66 | } 67 | 68 | public function setAsXorg($as_xorg) 69 | { 70 | $this->asXorg = $as_xorg; 71 | } 72 | 73 | public function getCurrencyOption() 74 | { 75 | return $this->currencyOption; 76 | } 77 | 78 | public function setCurrencyOption($currency_option) 79 | { 80 | $this->currencyOption = $currency_option; 81 | } 82 | 83 | public function getFromDate() 84 | { 85 | return $this->fromDate; 86 | } 87 | 88 | public function setFromDate($from_date) 89 | { 90 | $this->fromDate = $from_date; 91 | } 92 | 93 | public function getGroupBy() 94 | { 95 | return $this->groupBy; 96 | } 97 | 98 | public function setGroupBy($group_by) 99 | { 100 | $this->groupBy = $group_by; 101 | } 102 | 103 | public function showRevSharePct() 104 | { 105 | return $this->showRevSharePct; 106 | } 107 | 108 | public function setShowRevSharePct($show_rev_share_pct) 109 | { 110 | $this->showRevSharePct = $show_rev_share_pct; 111 | } 112 | 113 | public function showSummary() 114 | { 115 | return $this->showSummary; 116 | } 117 | 118 | public function setShowSummary($show_summary) 119 | { 120 | $this->showSummary = $show_summary; 121 | } 122 | 123 | public function showTxDetail() 124 | { 125 | return $this->showTxDetail; 126 | } 127 | 128 | public function setShowTxDetail($show_tx_detail) 129 | { 130 | $this->showTxDetail = $show_tx_detail; 131 | } 132 | 133 | public function showTxType() 134 | { 135 | return $this->showTxType; 136 | } 137 | 138 | public function setSowTxType($show_tx_type) 139 | { 140 | $this->showTxType = $show_tx_type; 141 | } 142 | 143 | public function getToDate() 144 | { 145 | return $this->toDate; 146 | } 147 | 148 | public function setToDate($to_date) 149 | { 150 | $this->toDate = $to_date; 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/Payment.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data); 46 | } 47 | } 48 | 49 | /** 50 | * @param boolean $isRecurring 51 | */ 52 | public function setIsRecurring($isRecurring) 53 | { 54 | $this->isRecurring = $isRecurring; 55 | } 56 | 57 | /** 58 | * @return boolean 59 | */ 60 | public function getIsRecurring() 61 | { 62 | return $this->isRecurring; 63 | } 64 | 65 | /** 66 | * @param int $orderCode 67 | */ 68 | public function setOrderCode($orderCode) 69 | { 70 | $this->orderCode = $orderCode; 71 | } 72 | 73 | /** 74 | * @return int 75 | */ 76 | public function getOrderCode() 77 | { 78 | return $this->orderCode; 79 | } 80 | 81 | /** 82 | * @param int $referenceId 83 | */ 84 | public function setReferenceId($referenceId) 85 | { 86 | $this->referenceId = $referenceId; 87 | } 88 | 89 | /** 90 | * @return int 91 | */ 92 | public function getReferenceId() 93 | { 94 | return $this->referenceId; 95 | } 96 | 97 | /** 98 | * @param string $referenceUrl 99 | */ 100 | public function setReferenceUrl($referenceUrl) 101 | { 102 | $this->referenceUrl = $referenceUrl; 103 | } 104 | 105 | /** 106 | * @return string 107 | */ 108 | public function getReferenceUrl() 109 | { 110 | return $this->referenceUrl; 111 | } 112 | 113 | /** 114 | * @param boolean $success 115 | */ 116 | public function setSuccess($success) 117 | { 118 | $this->success = $success; 119 | } 120 | 121 | /** 122 | * @return boolean 123 | */ 124 | public function getSuccess() 125 | { 126 | return $this->success; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/RatePlanRate.php: -------------------------------------------------------------------------------- 1 | $var = $data[$var]; 55 | } 56 | } 57 | } 58 | } 59 | 60 | /** 61 | * @param int $endUnit 62 | */ 63 | public function setEndUnit($endUnit) 64 | { 65 | $this->endUnit = $endUnit; 66 | } 67 | 68 | /** 69 | * @return int 70 | */ 71 | public function getEndUnit() 72 | { 73 | return $this->endUnit; 74 | } 75 | 76 | /** 77 | * @param string $id 78 | */ 79 | public function setId($id) 80 | { 81 | $this->id = $id; 82 | } 83 | 84 | /** 85 | * @return string 86 | */ 87 | public function getId() 88 | { 89 | return $this->id; 90 | } 91 | 92 | /** 93 | * @param float $rate 94 | */ 95 | public function setRate($rate) 96 | { 97 | $this->rate = $rate; 98 | } 99 | 100 | /** 101 | * @return float 102 | */ 103 | public function getRate() 104 | { 105 | return $this->rate; 106 | } 107 | 108 | /** 109 | * @param string $revshare 110 | */ 111 | public function setRevshare($revshare) 112 | { 113 | $this->revshare = $revshare; 114 | } 115 | 116 | /** 117 | * @return string 118 | */ 119 | public function getRevshare() 120 | { 121 | return $this->revshare; 122 | } 123 | 124 | /** 125 | * @param int $startUnit 126 | */ 127 | public function setStartUnit($startUnit) 128 | { 129 | $this->startUnit = $startUnit; 130 | } 131 | 132 | /** 133 | * @return int 134 | */ 135 | public function getStartUnit() 136 | { 137 | return $this->startUnit; 138 | } 139 | 140 | /** 141 | * @param string $type 142 | */ 143 | public function setType($type) 144 | { 145 | $this->type = $type; 146 | } 147 | 148 | /** 149 | * @return string 150 | */ 151 | public function getType() 152 | { 153 | return $this->type; 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /Apigee/Mint/DataStructures/RevenueReport.php: -------------------------------------------------------------------------------- 1 | loadFromRawData($data, $excluded_properties); 30 | } elseif (!isset($data)) { 31 | $data = array(); 32 | } 33 | 34 | if (isset($data['mintCriteria'])) { 35 | $this->mintCriteria = new MintCriteria($data['mintCriteria']); 36 | } 37 | 38 | $this->developer = $developer; 39 | 40 | if (isset($data['organization'])) { 41 | $organization = new Organization($this->developer->getConfig()); 42 | $organization->loadFromRawData($data['organization']); 43 | $this->organization = $organization; 44 | } 45 | } 46 | 47 | public function getMintCriteria() 48 | { 49 | return $this->mintCriteria; 50 | } 51 | 52 | public function setMintCriteria($mint_criteria) 53 | { 54 | $this->mintCriteria = $mint_criteria; 55 | } 56 | 57 | public function getDescription() 58 | { 59 | return $this->description; 60 | } 61 | 62 | public function setDescription($description) 63 | { 64 | $this->description = $description; 65 | } 66 | 67 | public function getDeveloper() 68 | { 69 | return $this->developer; 70 | } 71 | 72 | public function setDeveloper($developer) 73 | { 74 | $this->developer = $developer; 75 | } 76 | 77 | public function getId() 78 | { 79 | return $this->id; 80 | } 81 | 82 | public function setId($id) 83 | { 84 | $this->id = $id; 85 | } 86 | 87 | public function getName() 88 | { 89 | return $this->name; 90 | } 91 | 92 | public function setName($name) 93 | { 94 | $this->name = $name; 95 | } 96 | 97 | public function getOrganization() 98 | { 99 | return $this->organization; 100 | } 101 | 102 | public function setOrganization($organization) 103 | { 104 | $this->organization = $organization; 105 | } 106 | 107 | public function getType() 108 | { 109 | return $this->type; 110 | } 111 | 112 | public function setType($type) 113 | { 114 | $this->type = $type; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /Apigee/Mint/DeveloperCategory.php: -------------------------------------------------------------------------------- 1 | orgName) . '/developer-categories'; 33 | $this->init($config, $base_url); 34 | 35 | $this->wrapper_tag = 'developerCategory'; 36 | $this->id_field = 'id'; 37 | 38 | $this->initValues(); 39 | } 40 | 41 | /** 42 | * Implements Base\BaseObject::instantiateNew(). 43 | * 44 | * @return DeveloperCategory 45 | */ 46 | public function instantiateNew() 47 | { 48 | return new DeveloperCategory($this->config); 49 | } 50 | 51 | /** 52 | * Implements Base\BaseObject::loadFromRawData(). 53 | * 54 | * @param array $data 55 | * @param bool $reset 56 | */ 57 | public function loadFromRawData($data, $reset = false) 58 | { 59 | if ($reset) { 60 | $this->initValues(); 61 | } 62 | $excluded_properties = array(); 63 | foreach (array_keys($data) as $property) { 64 | if (in_array($property, $excluded_properties)) { 65 | continue; 66 | } 67 | 68 | // form the setter method name to invoke setXxxx 69 | $setter_method = 'set' . ucfirst($property); 70 | 71 | if (method_exists($this, $setter_method)) { 72 | $this->$setter_method($data[$property]); 73 | } else { 74 | self::$logger->notice('No setter method was found for property "' . $property . '"'); 75 | } 76 | } 77 | } 78 | 79 | protected function initValues() 80 | { 81 | $this->id = null; 82 | $this->name = null; 83 | $this->description = null; 84 | } 85 | 86 | public function __toString() 87 | { 88 | $obj = array( 89 | 'id' => $this->id, 90 | 'name' => $this->name, 91 | 'description' => $this->description 92 | ); 93 | return json_encode($obj); 94 | } 95 | 96 | 97 | /* 98 | * accessors (getters/setters) 99 | */ 100 | public function getName() 101 | { 102 | return $this->name; 103 | } 104 | 105 | public function setName($name) 106 | { 107 | $this->name = (string)$name; 108 | } 109 | 110 | public function getId() 111 | { 112 | return $this->id; 113 | } 114 | 115 | // Used in data load invoked by $this->loadFromRawData() 116 | private function setId($id) 117 | { 118 | $this->id = $id; 119 | } 120 | 121 | public function getDescription() 122 | { 123 | return $this->description; 124 | } 125 | 126 | public function setDescription($desc) 127 | { 128 | $this->description = (string)$desc; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /Apigee/Mint/DeveloperRateplanCounter.php: -------------------------------------------------------------------------------- 1 | orgName) . '/developer-ratecard-counters'; 14 | $this->init($config, $base_url); 15 | 16 | $this->wrapperTag = 'developerRateCardCounter'; 17 | // TODO: verify the following two items when docs are fleshed out 18 | $this->idField = 'id'; 19 | $this->idIsAutogenerated = true; 20 | 21 | $this->initValues(); 22 | } 23 | 24 | protected function initValues() 25 | { 26 | // TODO 27 | } 28 | 29 | public function instantiateNew() 30 | { 31 | return new DeveloperRateplanCounter($this->config); 32 | } 33 | 34 | public function loadFromRawData($data, $reset = false) 35 | { 36 | if ($reset) { 37 | $this->initValues(); 38 | } 39 | $excluded_properties = array(); 40 | foreach (array_keys($data) as $property) { 41 | if (in_array($property, $excluded_properties)) { 42 | continue; 43 | } 44 | 45 | // form the setter method name to invoke setXxxx 46 | $setter_method = 'set' . ucfirst($property); 47 | 48 | if (method_exists($this, $setter_method)) { 49 | $this->$setter_method($data[$property]); 50 | } else { 51 | self::$logger->notice('No setter method was found for property "' . $property . '"'); 52 | } 53 | } 54 | } 55 | 56 | public function __toString() 57 | { 58 | $obj = array(); 59 | $properties = array_keys(get_object_vars($this)); 60 | $excluded_properties = array_keys(get_class_vars(get_parent_class($this))); 61 | foreach ($properties as $property) { 62 | if (in_array($property, $excluded_properties)) { 63 | continue; 64 | } 65 | if (isset($this->$property)) { 66 | $obj[$property] = $this->$property; 67 | } 68 | } 69 | return json_encode($obj); 70 | } 71 | 72 | public function getId() 73 | { 74 | return $this->id; 75 | } 76 | 77 | private function setId($id) 78 | { 79 | $this->id = $id; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Apigee/Mint/Exceptions/InsufficientFundsException.php: -------------------------------------------------------------------------------- 1 | 'Developer does not have sufficient funds to proceed', 29 | ); 30 | 31 | /** 32 | * Determines if this exception is relative to the Mint API REST call 33 | * 34 | * @param \Apigee\Exceptions\ResponseException $e 35 | * @return boolean 36 | */ 37 | public static function isInsufficientFundsException(ResponseException $e) 38 | { 39 | $error_info = json_decode($e->getResponse()); 40 | return isset($error_info->code) && array_key_exists($error_info->code, self::$codes); 41 | } 42 | 43 | /** 44 | * Class constructor 45 | * 46 | * @param ResponseException $e 47 | * @throws ParameterException if the exception has no Mint 48 | * registered code 49 | */ 50 | public function __construct(ResponseException $e) 51 | { 52 | parent::__construct($e); 53 | if (!self::isInsufficientFundsException($e)) { 54 | throw new ParameterException( 55 | 'Improper response exception message passed into InsufficientFundsException class constructor.', 56 | $e 57 | ); 58 | } 59 | $errorInfo = json_decode($e->getResponse()); 60 | 61 | if (empty($errorInfo->contexts)) { 62 | // If contexts are empty, then we do not have the cost breakdown data. 63 | $this->hasCostDetails = false; 64 | // Get the total cost 65 | $amtStartsAt = strpos($this->mintMessage, '[') + 1; 66 | $substring = substr($this->mintMessage, $amtStartsAt, strlen($this->mintMessage) - $amtStartsAt - 1); 67 | $required = str_replace(',', '', $substring); 68 | $this->totalRatePlan = $required; 69 | } else { 70 | // We have the cost details, collect them into proper attributes. 71 | $this->hasCostDetails = true; 72 | foreach ($errorInfo->contexts as $context) { 73 | switch ($context->name) { 74 | case self::CONTEXT_COST_TOTAL: 75 | $this->totalRatePlan = $context->value; 76 | break; 77 | case self::CONTEXT_COST_TAX: 78 | $this->tax = $context->value; 79 | break; 80 | case self::CONTEXT_COST_RATE_PLAN: 81 | $this->ratePlan = $context->value; 82 | break; 83 | } 84 | } 85 | } 86 | } 87 | 88 | /** 89 | * If there is a proper message then it is returned; otherwise NULL is 90 | * returned. 91 | * 92 | * @param bool $response_message 93 | * @param bool $no_code 94 | * 95 | * @return string|null 96 | */ 97 | public function getMintMessage($response_message = false, $no_code = false) 98 | { 99 | return $response_message 100 | ? (!$no_code ? $this->mintCode . ': ' : '') . $this->mintMessage 101 | : self::$codes[$this->mintCode]; 102 | } 103 | 104 | /** 105 | * Get the Rate Plan cost without the tax. 106 | * @return string The rate plan cost 107 | */ 108 | public function getRatePlanCost() 109 | { 110 | return $this->ratePlan; 111 | } 112 | 113 | /** 114 | * Get the tax only cost of the plan. 115 | * @return string the tax cost 116 | */ 117 | public function getTaxCost() 118 | { 119 | return $this->tax; 120 | } 121 | 122 | /** 123 | * Get the total cost of the plan. 124 | * @return string the total cost 125 | */ 126 | public function getTotalCost() 127 | { 128 | return $this->totalRatePlan; 129 | } 130 | 131 | public function hasCostDetails() 132 | { 133 | return $this->hasCostDetails; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /Apigee/Mint/ManagementAPIOrganization.php: -------------------------------------------------------------------------------- 1 | name; 19 | $cache_manager = CacheFactory::getCacheManager(); 20 | $organization = $cache_manager->get('mngmt_organization:' . $org, null); 21 | if (!isset($organization)) { 22 | $url = rawurlencode($org); 23 | $this->get($url); 24 | $organization = $this->responseObj; 25 | $cache_manager->set('mngmt_organization:' . $org, $organization); 26 | } 27 | $this->name = $organization['name']; 28 | $this->displayName = $organization['displayName']; 29 | $this->environments = $organization['environments']; 30 | $this->type = $organization['type']; 31 | $this->createdAt = $organization['createdAt']; 32 | $this->createdBy = $organization['createdBy']; 33 | $this->lastModifiedAt = $organization['lastModifiedAt']; 34 | $this->lastModifiedBy = $organization['lastModifiedBy']; 35 | $this->properties = array(); 36 | 37 | if (isset($organization['properties'])) { 38 | foreach ($organization['properties'] as $prop) { 39 | list($property) = $prop; 40 | $this->properties[$property['name']] = $property['value']; 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Apigee/Mint/Types/ApplicationStatusType.php: -------------------------------------------------------------------------------- 1 | 22 | * 34 | * 35 | * 36 | * @param string $constant 37 | * Name of the constant to be searched. 38 | * @throws ParameterException 39 | * Value type not found in class type 40 | * @return string the value of the constant 41 | */ 42 | public static function get($constant) 43 | { 44 | $type = get_called_class(); 45 | if (!array_key_exists($type, self::$concreteTypes)) { 46 | $class = new ReflectionClass($type); 47 | self::$concreteTypes[$type] = $class->getConstants(); 48 | } 49 | if (array_key_exists($constant, self::$concreteTypes[$type])) { 50 | return self::$concreteTypes[$type][$constant]; 51 | } else { 52 | throw new ParameterException('Value type ‘' . $constant . '’ is not defined in type ‘' . $type . '’'); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Doc.php: -------------------------------------------------------------------------------- 1 | orgName) 28 | . '/apimodels/' . $modelId 29 | . '/revisions/' . $revisionId 30 | . '/resources/' . $resourceUuid 31 | . '/methods/' . $methodUuid; 32 | $this->init($config, $baseUrl); 33 | } 34 | 35 | /** 36 | * Grabs the HTML blob of a given operation. 37 | * 38 | * @param string $templateName 39 | * 40 | * @return string 41 | */ 42 | public function getHtml($templateName) 43 | { 44 | $this->get('doc?template=' . $templateName, 'text/html'); 45 | return $this->responseText; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security.php: -------------------------------------------------------------------------------- 1 | orgName) 26 | . '/apimodels/' . rawurlencode($modelId) 27 | . '/revisions/' . $revisionId 28 | . '/security'; 29 | $this->init($config, $baseUrl); 30 | } 31 | 32 | /** 33 | * Loads all schemes associated with the current model + revision. 34 | * 35 | * @throws ResponseException 36 | * 37 | * @return array 38 | * Each member of the array is a subclass of SecurityScheme. 39 | */ 40 | public function loadAllSchemes() 41 | { 42 | $scheme_objects = array(); 43 | $this->get(); 44 | $schemes = $this->responseObj; 45 | foreach ($schemes as $scheme_array) { 46 | $scheme_objects[] = SecurityScheme::fromArray($scheme_array); 47 | } 48 | 49 | return $scheme_objects; 50 | } 51 | 52 | /** 53 | * Loads a security scheme by name. 54 | * 55 | * @throws ResponseException 56 | * 57 | * @param string $name 58 | * 59 | * @return SecurityScheme 60 | */ 61 | public function load($name) 62 | { 63 | $scheme = null; 64 | 65 | $this->get(rawurlencode($name)); 66 | if (array_key_exists('type', $this->responseObj)) { 67 | $scheme = SecurityScheme::fromArray($this->responseObj); 68 | } 69 | 70 | return $scheme; 71 | } 72 | 73 | /** 74 | * Saves security scheme to modeling API. 75 | * 76 | * @throws ResponseException 77 | * 78 | * @param SecurityScheme $scheme 79 | * @param bool $is_update 80 | * If true, will attempt a PUT; otherwise a POST. Be aware that if a PUT 81 | * is attempted and the security scheme resource does not exist, the save 82 | * will fail. 83 | * 84 | * @return SecurityScheme 85 | * On success, returns the saved security scheme. 86 | */ 87 | public function save(SecurityScheme $scheme, $is_update = false) 88 | { 89 | $payload = $scheme->toArray($is_update); 90 | if ($is_update) { 91 | $method = 'put'; 92 | $path = rawurlencode($scheme->getName()); 93 | } else { 94 | $method = 'post'; 95 | $path = null; 96 | } 97 | $this->$method($path, $payload); 98 | return SecurityScheme::fromArray($this->responseObj); 99 | } 100 | 101 | /** 102 | * Deletes a named security scheme from the Modeling API. 103 | * 104 | * @throws ResponseException 105 | * 106 | * @param string $name 107 | * Name of the scheme to be deleted. 108 | */ 109 | public function delete($name) 110 | { 111 | $this->httpDelete(rawurlencode($name)); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security/ApiKeyScheme.php: -------------------------------------------------------------------------------- 1 | paramName; 29 | } 30 | 31 | /** 32 | * Sets the parameter name identifying the API key. 33 | * 34 | * @param string $name 35 | */ 36 | public function setParamName($name) 37 | { 38 | $this->paramName = $name; 39 | } 40 | 41 | /** 42 | * Returns how the API key is transmitted (header, query, etc.). 43 | * 44 | * @return string 45 | */ 46 | public function getIn() 47 | { 48 | return $this->in; 49 | } 50 | 51 | /** 52 | * Sets how the API key is transmitted (header, query, etc.). 53 | * 54 | * @param string $in 55 | */ 56 | public function setIn($in) 57 | { 58 | // TODO: validate $in 59 | $this->in = $in; 60 | } 61 | 62 | /** 63 | * {@inheritdoc} 64 | */ 65 | public function getType($humanReadable = false) 66 | { 67 | if ($humanReadable) { 68 | return 'API Key'; 69 | } 70 | return 'APIKEY'; 71 | } 72 | 73 | /** 74 | * {@inheritdoc} 75 | */ 76 | public function toArray($is_update = false) 77 | { 78 | return parent::toArray($is_update) + array( 79 | 'paramName' => $this->paramName, 80 | 'in' => $this->in, 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security/ApiKeyTemplateAuthScheme.php: -------------------------------------------------------------------------------- 1 | keyName; 38 | } 39 | 40 | /** 41 | * Sets the keyname of the scheme. 42 | * 43 | * @param string 44 | */ 45 | public function setKeyName($keyName) 46 | { 47 | $this->keyName = $keyName; 48 | } 49 | 50 | /** 51 | * Gets the key value of the scheme. 52 | * 53 | * @return string 54 | */ 55 | public function getKeyValue() 56 | { 57 | return $this->keyValue; 58 | } 59 | 60 | /** 61 | * Sets the key value of the scheme. 62 | * 63 | * @param string 64 | */ 65 | public function setKeyValue($keyValue) 66 | { 67 | $this->keyValue = $keyValue; 68 | } 69 | 70 | /** 71 | * {@inheritdoc} 72 | */ 73 | public function toArray($is_update = false) 74 | { 75 | $retVal = parent::toArray($is_update); 76 | $retVal += array( 77 | 'keyName' => $this->keyName, 78 | 'keyValue' => $this->keyValue 79 | ); 80 | return $retVal; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security/BasicScheme.php: -------------------------------------------------------------------------------- 1 | clientId; 45 | } 46 | 47 | /** 48 | * Sets the clientId of the scheme. 49 | * 50 | * @param string 51 | */ 52 | public function setClientId($clientId) 53 | { 54 | $this->clientId = $clientId; 55 | } 56 | 57 | /** 58 | * Gets the client secret of the scheme. 59 | * 60 | * @return string 61 | */ 62 | public function getClientSecret() 63 | { 64 | return $this->clientSecret; 65 | } 66 | 67 | /** 68 | * Sets the client secret of the scheme. 69 | * 70 | * @param string 71 | */ 72 | public function setClientSecret($clientSecret) 73 | { 74 | $this->clientSecret = $clientSecret; 75 | } 76 | 77 | public function getCallbackUrl() 78 | { 79 | return $this->callbackUrl; 80 | } 81 | /** 82 | * {@inheritdoc} 83 | */ 84 | public function toArray($is_update = false) 85 | { 86 | $retVal = parent::toArray($is_update); 87 | $retVal += array( 88 | 'clientId' => $this->clientId, 89 | 'clientSecret' => $this->clientSecret 90 | 91 | ); 92 | return $retVal; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security/SecurityScheme.php: -------------------------------------------------------------------------------- 1 | name; 25 | } 26 | 27 | /** 28 | * Sets the unique name of this security scheme. 29 | * 30 | * @param string $name 31 | */ 32 | public function setName($name) 33 | { 34 | $this->name = $name; 35 | } 36 | 37 | /** 38 | * Gets the type of security scheme. 39 | * 40 | * @return string 41 | */ 42 | abstract public function getType($humanReadable = false); 43 | 44 | /** 45 | * Populates this security scheme from a JSON payload. 46 | * 47 | * @param array $parameters 48 | */ 49 | public function __construct(array $parameters) 50 | { 51 | foreach ($parameters as $key => $value) { 52 | if (property_exists($this, $key)) { 53 | $this->$key = $value; 54 | } 55 | } 56 | } 57 | 58 | /** 59 | * Returns array that can be used to save this scheme to the Modeling API. 60 | * 61 | * @return array 62 | */ 63 | public function toArray($is_update = false) 64 | { 65 | $returnVal = array(); 66 | if (!$is_update) { 67 | $returnVal['type'] = $this->getType(); 68 | } 69 | $returnVal['name'] = $this->name; 70 | return $returnVal; 71 | } 72 | 73 | /** 74 | * Given response payload from Modeling API, returns appropriate object. 75 | * 76 | * @param array $payload 77 | * 78 | * @return SecurityScheme 79 | */ 80 | public static function fromArray(array $payload) 81 | { 82 | switch ($payload['type']) { 83 | case 'OAUTH2': 84 | return new Oauth2Scheme($payload); 85 | 86 | case 'APIKEY': 87 | return new ApiKeyScheme($payload); 88 | 89 | default: 90 | return new BasicScheme($payload); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Security/TemplateAuthScheme.php: -------------------------------------------------------------------------------- 1 | name; 26 | } 27 | 28 | /** 29 | * Sets the name of the template auth scheme. 30 | * @param string $name 31 | */ 32 | public function setName($name) 33 | { 34 | $this->name = $name; 35 | } 36 | 37 | /** 38 | * Gets the type of the template auth scheme. 39 | * 40 | * @return string 41 | */ 42 | abstract public function getType(); 43 | 44 | /** 45 | * Populates this template auth scheme from JSON payload 46 | * @param array $parameters 47 | */ 48 | public function __construct(array $parameters) 49 | { 50 | foreach ($parameters as $key => $value) { 51 | if (property_exists($this, $key)) { 52 | $this->$key = $value; 53 | } 54 | } 55 | } 56 | 57 | /** 58 | * Returns array that can be used to save this template auth scheme to the Modeling API. 59 | * 60 | * @return array 61 | */ 62 | public function toArray($is_update = false) 63 | { 64 | $returnVal = array(); 65 | if (!$is_update) { 66 | $returnVal['type'] = $this->getType(); 67 | } 68 | $returnVal['name'] = $this->name; 69 | return $returnVal; 70 | } 71 | 72 | /** 73 | * Given response payload from Modeling API, returns appropriate object. 74 | * 75 | * @param array $payload 76 | * 77 | * @return TemplateAuthScheme 78 | */ 79 | public static function fromArray(array $payload) 80 | { 81 | switch ($payload['type']) { 82 | case 'OAUTH2': 83 | return new Oauth2TemplateAuthScheme($payload); 84 | 85 | default: 86 | return new ApiKeyTemplateAuthScheme($payload); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/Template.php: -------------------------------------------------------------------------------- 1 | orgName) 30 | . '/apimodels/' . rawurlencode($modelId) 31 | . '/templates'; 32 | $this->init($config, $baseUrl); 33 | } 34 | 35 | /** 36 | * Loads a template of a given name and type. 37 | * 38 | * @param string $name 39 | * Name of the template. 40 | * @param string $type 41 | * Either 'index' or 'method'. 42 | * 43 | * @return string 44 | * Returns the template HTML. 45 | * 46 | * @throws ParameterException 47 | */ 48 | public function load($name, $type) 49 | { 50 | if ($type != 'index' && $type != 'method') { 51 | $message = 'Invalid template type ‘%s’ (valid values are ‘index’ and ‘method’).'; 52 | throw new ParameterException(sprintf($message, $type)); 53 | } 54 | $this->get($name . '?type=' . $type, 'text/html'); 55 | return $this->responseText; 56 | } 57 | 58 | /** 59 | * Saves HTML to a template of a given name and type. 60 | * 61 | * If $update is true and the call results in a 404, we set $update to 62 | * false and re-try, since this indicates that the template did not exist 63 | * yet. 64 | * 65 | * @param string $name 66 | * Name of the template to be saved. 67 | * @param string $type 68 | * Either 'index' or 'method'. 69 | * @param string $html 70 | * HTML to be saved to the template. 71 | * @param bool $update 72 | * True if we are updating, false if we are inserting. 73 | * 74 | * @return string 75 | * Returns the template HTML that was saved. 76 | * 77 | * @throws ParameterException 78 | */ 79 | public function save($name, $type, $html, $update = false) 80 | { 81 | if ($type != 'index' && $type != 'method') { 82 | $message = 'Invalid template type ‘%s’ (valid values are ‘index’ and ‘method’).'; 83 | throw new ParameterException(sprintf($message, $type)); 84 | } 85 | if ($update) { 86 | $uri = rawurlencode($name) . '?type=' . $type; 87 | $method = 'put'; 88 | } else { 89 | $uri = '?type=' . $type . '&name=' . urlencode($name); 90 | $method = 'post'; 91 | } 92 | // Make sure that update 404 errors are not logged by replacing the 93 | // logger with a dummy that routes errors to /dev/null. 94 | if ($update) { 95 | if (!(self::$logger instanceof \Psr\Log\NullLogger)) { 96 | $cached_logger = self::$logger; 97 | self::$logger = new \Psr\Log\NullLogger(); 98 | } 99 | $this->clearSubscribers(); 100 | } 101 | 102 | try { 103 | $this->$method($uri, $html, 'text/html', 'text/html'); 104 | // Restore logger if it was cached. 105 | if (isset($cached_logger)) { 106 | self::$logger = $cached_logger; 107 | } 108 | if ($update) { 109 | $this->restoreSubscribers(); 110 | } 111 | } catch (ResponseException $e) { 112 | // Restore logger if it was cached. 113 | if (isset($cached_logger)) { 114 | self::$logger = $cached_logger; 115 | } 116 | if ($update) { 117 | $this->restoreSubscribers(); 118 | } 119 | // If update failed, try insert. 120 | if ($update && $e->getCode() == 404) { 121 | $this->save($name, $type, $html, false); 122 | } else { 123 | throw $e; 124 | } 125 | } 126 | return $this->responseText; 127 | } 128 | 129 | // TODO: delete? 130 | } 131 | -------------------------------------------------------------------------------- /Apigee/SmartDocs/TemplateAuth.php: -------------------------------------------------------------------------------- 1 | orgName) 24 | . '/apimodels/' . rawurlencode($modelId) 25 | . '/templateauths'; 26 | $this->init($config, $baseUrl); 27 | } 28 | 29 | /** 30 | * Load a template auth scheme by name. 31 | * 32 | * @param string $name 33 | * The name of the scheme to load. 34 | * 35 | * @return object 36 | * A scheme object. 37 | */ 38 | public function load($name) 39 | { 40 | $scheme = null; 41 | try { 42 | $this->get(rawurlencode($name)); 43 | if (array_key_exists('type', $this->responseObj)) { 44 | $scheme = TemplateAuthScheme::fromArray($this->responseObj); 45 | } 46 | } catch (ResponseException $e) { 47 | } 48 | return $scheme; 49 | } 50 | 51 | /** 52 | * Loads all the template auth schemes associated with the current model. 53 | * 54 | * @return array 55 | * An array of TemplateAuthScheme subclasses. 56 | */ 57 | public function loadAllSchemes() 58 | { 59 | try { 60 | $this->get(); 61 | $schemes = array(); 62 | foreach ($this->responseObj as $scheme_array) { 63 | $scheme = TemplateAuthScheme::fromArray($scheme_array); 64 | $schemes[$scheme->getName()] = $scheme; 65 | } 66 | } catch (ResponseException $e) { 67 | } 68 | return !empty($schemes) ? $schemes : array(); 69 | } 70 | 71 | /** 72 | * Saves a template auth scheme to modeling Api. 73 | * 74 | * @param TemplateAuthScheme $scheme 75 | * @param bool $is_update 76 | * If true, will attempt a PUT; otherwise a POST. Be aware that if a PUT 77 | * is attempted and the security scheme resource does not exist, the save 78 | * will fail. 79 | */ 80 | public function save(TemplateAuthScheme $scheme, $is_update = false) 81 | { 82 | 83 | $payload = $scheme->toArray($is_update); 84 | if ($is_update) { 85 | $method = 'put'; 86 | $path = rawurlencode($scheme->getName()); 87 | } else { 88 | $method = 'post'; 89 | $path = null; 90 | } 91 | try { 92 | $this->$method($path, $payload); 93 | return TemplateAuthScheme::fromArray($this->responseObj); 94 | } catch (ResponseException $e) { 95 | return null; 96 | } 97 | } 98 | 99 | /** 100 | * Delete a template auth scheme. 101 | * 102 | * @param string $name 103 | * The name of the template auth scheme to delete. 104 | */ 105 | public function delete($name) 106 | { 107 | try { 108 | $this->httpDelete(rawurlencode($name)); 109 | } catch (ResponseException $e) { 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Apigee/Util/CacheFactory.php: -------------------------------------------------------------------------------- 1 | getName() == self::CACHE_MGR_CLASS || $class->isSubclassOf(self::CACHE_MGR_CLASS)) { 102 | $cache_manager = $class->newInstance(); 103 | $arg = $cache_manager->getConfig(); 104 | $cache_manager->setUp($arg); 105 | $cache_managers[$cache_manager_class_name] = $cache_manager; 106 | } else { 107 | $msgArgs = array($cache_manager_class_name, self::CACHE_MGR_CLASS); 108 | $msg = vsprintf('Class %s does not extend %s.', $msgArgs); 109 | if ($logger instanceof LoggerInterface) { 110 | $logger->error($msg); 111 | } 112 | throw new ParameterException($msg); 113 | } 114 | } catch (\ReflectionException $re) { 115 | $msg = sprintf('Could not load cache manager class %s', $cache_manager_class_name); 116 | if ($logger instanceof LoggerInterface) { 117 | $logger->error($msg); 118 | } 119 | throw new ParameterException($msg); 120 | } 121 | } 122 | return $cache_managers[$cache_manager_class_name]; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /Apigee/Util/CacheManager.php: -------------------------------------------------------------------------------- 1 | config = $config; 45 | } 46 | 47 | /** 48 | * Returns a config array that is later 49 | * passed to the setup() method by the Factory class. 50 | * 51 | * @return array 52 | */ 53 | public function getConfig() 54 | { 55 | return array(); 56 | } 57 | 58 | /** 59 | * Cache a value given $data and identifying it by $cid 60 | * 61 | * @param string $cid 62 | * @param mixed $data 63 | */ 64 | public function set($cid, $data) 65 | { 66 | self::$cache[$cid] = $data; 67 | } 68 | 69 | /** 70 | * Attempt to get a value from cache given the ID specified by $cid. 71 | * If no value is found in the cache, then value specified by $data is 72 | * returned. 73 | * If no $data is specified, return null. 74 | * 75 | * @param string $cid 76 | * @param mixed $data 77 | */ 78 | public function get($cid, $data = null) 79 | { 80 | if (array_key_exists($cid, self::$cache)) { 81 | $data = self::$cache[$cid]; 82 | } 83 | return $data; 84 | } 85 | 86 | public function clear($cid = null, $wildcard = false) 87 | { 88 | if (empty($cid) && $wildcard === true) { 89 | self::$cache = array(); 90 | } elseif ($wildcard === true) { 91 | foreach (self::$cache as $cache_id) { 92 | if (strpos($cache_id, $cid) === 0) { 93 | unset(self::$cache[$cache_id]); 94 | } 95 | } 96 | } else { 97 | unset(self::$cache[$cid]); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Apigee/Util/CredentialStorageInterface.php: -------------------------------------------------------------------------------- 1 | self::$raw, 27 | 'opts' => self::$opts, 28 | 'data' => self::$data, 29 | 'code' => self::$code, 30 | 'code_status' => self::$code_status, 31 | 'code_class' => self::$code_class, 32 | 'exception' => self::$exception, 33 | 'time_elapsed' => self::$time_elapsed 34 | ); 35 | } 36 | public static function fromArray($array) 37 | { 38 | static $keys = array('raw', 'opts', 'data', 'code', 'code_status', 'code_class', 'exception', 'time_elapsed'); 39 | foreach ($keys as $key) { 40 | if (array_key_exists($key, $array)) { 41 | self::$$key = $array[$key]; 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Apigee/Util/FilesystemCredentialStorage.php: -------------------------------------------------------------------------------- 1 | 0) { 40 | throw new \Exception("Required key(s) missing from $config_file: " . join(', ', $missing_keys)); 41 | } 42 | if (isset($config['options'])) { 43 | $options = $config['options']; 44 | } else { 45 | $options = array(); 46 | } 47 | 48 | $oc = new OrgConfig($org, $endpoint, $user, $pass, $options); 49 | try { 50 | $organization = new Organization($oc); 51 | $organization->load($org); 52 | } catch (\Exception $e) { 53 | throw new \Exception("Unable to connect to $endpoint/o/$org as user $user. Are your credentials correct?"); 54 | } 55 | 56 | self::$orgConfig = $oc; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Apigee/test/ManagementAPI/APIProductTest.php: -------------------------------------------------------------------------------- 1 | listProducts(); 21 | } catch (\Exception $e) { 22 | $this->fail(); 23 | return; 24 | } 25 | $this->assertNotEmpty($product_list); 26 | } 27 | 28 | /** 29 | * @depends testApiProductList 30 | */ 31 | public function testApiProductLoad() 32 | { 33 | $api_product = new APIProduct(self::$orgConfig); 34 | try { 35 | $list = $api_product->listProducts(); 36 | } catch (\Exception $e) { 37 | $this->fail(); 38 | return; 39 | } 40 | $this->assertNotEmpty($list); 41 | // Pick a random item from the list. No need to shuffle if list has 42 | // only 1 member. 43 | if (count($list) > 1) { 44 | shuffle($list); 45 | } 46 | $item = reset($list); 47 | 48 | try { 49 | $api_product->load($item->getName()); 50 | } catch (\Exception $e) { 51 | $this->fail($e->getCode() . ': ' . $e->getMessage()); 52 | } 53 | $this->assertNotEmpty($api_product->getName()); 54 | } 55 | } -------------------------------------------------------------------------------- /Apigee/test/ManagementAPI/DeveloperTest.php: -------------------------------------------------------------------------------- 1 | randomString() . '@example.com'; 21 | 22 | // Begin creation 23 | $developer->blankValues(); 24 | 25 | $developer->setEmail($mail); 26 | $developer->setFirstName($this->randomString()); 27 | $developer->setLastName($this->randomString()); 28 | $developer->setUserName($this->randomString()); 29 | $developer->setAttribute('foo', 'bar'); 30 | 31 | try { 32 | $developer->save(); 33 | } catch (\Exception $e) { 34 | $this->fail('Cannot save developer at create time: [' . $e->getCode() . '] ' . $e->getMessage()); 35 | } 36 | $this->assertNotEmpty($developer->getDeveloperId()); 37 | $this->assertEquals($mail, $developer->getEmail()); 38 | $this->assertEquals('bar', $developer->getAttribute('foo')); 39 | // End creation 40 | 41 | // Begin load 42 | $developer->blankValues(); 43 | try { 44 | $developer->load($mail); 45 | } catch (\Exception $e) { 46 | $this->fail(); 47 | return; 48 | } 49 | $this->assertNotEmpty($developer->getDeveloperId()); 50 | $this->assertEquals($mail, $developer->getEmail()); 51 | $this->assertEquals('bar', $developer->getAttribute('foo')); 52 | // End load 53 | 54 | // Begin update 55 | $developer->setAttribute('foo', 'baz'); 56 | try { 57 | $developer->save(false); 58 | } catch (\Exception $e) { 59 | $this->fail('Cannot save developer at update time'); 60 | return; 61 | } 62 | $developer->blankValues(); 63 | try { 64 | $developer->load($mail); 65 | } catch (\Exception $e) { 66 | $this->fail('Cannot reload developer after update'); 67 | return; 68 | } 69 | $this->assertEquals('baz', $developer->getAttribute('foo')); 70 | // End update 71 | 72 | // Begin delete 73 | try { 74 | $developer->delete(); 75 | } catch (\Exception $e) { 76 | $this->fail('Cannot delete developer'); 77 | } 78 | $developer->blankValues(); 79 | try { 80 | $developer->load($mail); 81 | // If we succeed in the load, the developer was not deleted. 82 | $this->fail('Developer deletion failed.'); 83 | } catch (\Exception $e) { 84 | $this->assertEquals(404, $e->getCode()); 85 | } 86 | // End delete 87 | } 88 | 89 | public function testDeveloperList() 90 | { 91 | $developer = new Developer(self::$orgConfig); 92 | try { 93 | $list = $developer->listDevelopers(); 94 | } catch (\Exception $e) { 95 | $this->fail('Error fetching developer list'); 96 | return; 97 | } 98 | if (empty($list)) { 99 | $this->fail('Empty developer list'); 100 | return; 101 | } 102 | } 103 | 104 | public function testDeveloperLoadAll() 105 | { 106 | $developer = new Developer(self::$orgConfig); 107 | try { 108 | $list = $developer->loadAllDevelopers(); 109 | } catch (\Exception $e) { 110 | $this->fail('Error fetching all developers'); 111 | return; 112 | } 113 | if (empty($list)) { 114 | $this->fail('Empty detailed developer list'); 115 | return; 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /Apigee/test/example.config.yml: -------------------------------------------------------------------------------- 1 | org: my-org 2 | endpoint: https://api.enterprise.apigee.com/v1 3 | user: dc_devportal+myorg@apigee.com 4 | pass: I<3apis 5 | options: 6 | http_options: 7 | connect_timeout: 4 8 | timeout: 4 9 | 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 Apigee Corporation. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The 2.x version has moved 2 | The newer 2.x version of this library has been released and is now available as [Apigee Edge Client Library for PHP](https://github.com/apigee/apigee-client-php/releases). 3 | This library is now in maintenance mode and is only accepting major bug fixes. 4 | 5 | # How to use the Apigee Edge PHP SDK 6 | 7 | The Apigee Edge Management PHP SDK makes it easy to write PHP modules that use 8 | the Apigee Edge management API. By using the Management PHP SDK, you can 9 | communicate with Apigee Edge to manage developers, apps, roles, and permissions 10 | in the same way as the Apigee Developer Services portal. 11 | 12 | ## Prerequisites and Installation Requirements 13 | ### PHP Requirements 14 | 15 | The Edge PHP SDK has the following prerequisites: 16 | 17 | * PHP 7.1 or greater. This is required due to the SDK’s use of PHP namespaces 18 | and closures, and finally block. 19 | * JSON support built into PHP. This is enabled in almost all default builds of 20 | PHP. Certain Linux distributions (such as Debian) may ship with JSON-C 21 | instead of the standard JSON, due to licensing restrictions; this is also 22 | acceptable. 23 | * CURL support built into PHP. 24 | * Composer, https://getcomposer.org/, should be installed and in your path. 25 | 26 | ### Installation of Dependencies 27 | #### As part of a Composer-based project 28 | 29 | If your project is itself based on Composer, simply add `“apigee/edge”` 30 | to your project’s composer.json file and run `composer install --no-dev`. This 31 | should install the Edge PHP SDK as well as all its dependencies into your 32 | project’s `vendor` dir, and it will integrate them all with your project’s class 33 | autoloader. If you want to run the SDK’s unit tests, you should omit the 34 | `--no-dev` option. 35 | 36 | #### Using Composer, but not as part of a Composer-based project 37 | 38 | If you have installed Composer but choose not to use it to manage your project, 39 | you may register the Edge SDK and its dependencies as follows: 40 | ``` 41 | $ cd path/to/edge-sdk 42 | $ composer install --no-dev 43 | ``` 44 | 45 | This will download and install all the dependencies. You will need to include 46 | `path/to/edge-sdk/vendor/autoload.php` in order to reap the benefits of having 47 | all your classes autoloaded. 48 | 49 | #### Without Composer 50 | 51 | Installation without Composer is no longer supported. 52 | 53 | ## Connecting to the Edge server 54 | 55 | The core object used to configure your connection to Edge is Apigee\Util\OrgConfig. You can create one as follows: 56 | ```php 57 | array( 70 | 'connection_timeout' => 4, 71 | 'timeout' => 4 72 | ) 73 | ); 74 | 75 | $org_config = new Apigee\Util\OrgConfig($org, $endpoint, $user, $pass, $options); 76 | ``` 77 | 78 | Once you have created an OrgConfig object, you can pass it in the constructor to other objects: 79 | 80 | ```php 81 | load('user@example.com'); 85 | $developer->setFirstName('John'); 86 | $developer->setLastName('Doe'); 87 | $developer->save(); 88 | print "Developer updated!\n"; 89 | } 90 | catch (Apigee\Exceptions\ResponseException $e) { 91 | print $e->getMessage(); 92 | } 93 | 94 | $app = new Apigee\ManagementAPI\DeveloperApp($org_config, $developer->getEmail()); 95 | try { 96 | $app_list = $app->getListDetail(); 97 | foreach ($app_list as $my_app) { 98 | print $my_app->getName() . "\n"; 99 | } 100 | } 101 | catch (Apigee\Exceptions\ResponseException $e) { 102 | print $e->getMessage(); 103 | } 104 | ``` 105 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | /** 29 | * ------------------------------------------------- 30 | * 31 | * => ${message} 32 | * 33 | * ------------------------------------------------- 34 | */ 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apigee/edge", 3 | "type": "library", 4 | "description": "Apigee Edge API is a set of objects that communicate with Apigee's Edge management server via REST calls to manage developers, apps, and other entities.", 5 | "keywords": [ 6 | "http", 7 | "rest", 8 | "web service", 9 | "curl" 10 | ], 11 | "homepage": "http://github.com/apigee/edge-php-sdk", 12 | "license": "MIT", 13 | "authors": [ 14 | { 15 | "name": "Daniel Johnson", 16 | "email": "djohnson@apigee.com", 17 | "homepage": "http://apigee.com/", 18 | "role": "Developer" 19 | }, 20 | { 21 | "name": "Brian Hasselbeck", 22 | "email": "hasselbeck.brian@gmail.com", 23 | "homepage": "http://brianhasselbeck.com/", 24 | "role": "Developer" 25 | }, 26 | { 27 | "name": "Isaias Arellano", 28 | "email": "isaias.arellano.delgado@gmail.com", 29 | "role": "Developer" 30 | }, 31 | { 32 | "name": "Stephen Gilson", 33 | "email": "sgilson@apigee.com", 34 | "homepage": "http://apigee.com", 35 | "role": "Documentation" 36 | } 37 | ], 38 | "require": { 39 | "php": ">=7.1", 40 | "guzzle/guzzle": ">=3.7", 41 | "psr/log": "1.*" 42 | }, 43 | "require-dev": { 44 | "phpunit/phpunit": "3.7.*", 45 | "symfony/yaml": ">=2.1" 46 | }, 47 | "suggest": { 48 | "apigee/apigee-client-php" : "The new, actively maintained and supported version of this library." 49 | }, 50 | "autoload": { 51 | "psr-0": { 52 | "Apigee": "./" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Page not found 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 114 |
115 | 116 |
117 | 118 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /docs/elementlist.js: -------------------------------------------------------------------------------- 1 | 2 | var ApiGen = ApiGen || {}; 3 | ApiGen.elements = [["c","Apigee\\Exceptions\\IllegalMethodException"],["c","Apigee\\Exceptions\\NotImplementedException"],["c","Apigee\\Exceptions\\ParameterException"],["c","Apigee\\Exceptions\\ResponseException"],["c","Apigee\\Exceptions\\TooManyAttributesException"],["c","Apigee\\ManagementAPI\\AbstractApp"],["c","Apigee\\ManagementAPI\\APIProduct"],["c","Apigee\\ManagementAPI\\Base"],["c","Apigee\\ManagementAPI\\Company"],["c","Apigee\\ManagementAPI\\CompanyApp"],["c","Apigee\\ManagementAPI\\CompanyInvitation"],["c","Apigee\\ManagementAPI\\CompanyInviteRequest"],["c","Apigee\\ManagementAPI\\Developer"],["c","Apigee\\ManagementAPI\\DeveloperApp"],["c","Apigee\\ManagementAPI\\DeveloperAppAnalytics"],["c","Apigee\\ManagementAPI\\KeyValueMap"],["c","Apigee\\ManagementAPI\\Organization"],["c","Apigee\\ManagementAPI\\UserRole"],["c","Apigee\\Mint\\Application"],["c","Apigee\\Mint\\ApplicationCategory"],["c","Apigee\\Mint\\BankDetail"],["c","Apigee\\Mint\\Base\\BaseObject"],["c","Apigee\\Mint\\BillingDocument"],["c","Apigee\\Mint\\DataStructures\\Address"],["c","Apigee\\Mint\\DataStructures\\BillingMonth"],["c","Apigee\\Mint\\DataStructures\\DataStructure"],["c","Apigee\\Mint\\DataStructures\\DeveloperBalanceTransaction"],["c","Apigee\\Mint\\DataStructures\\DeveloperTnc"],["c","Apigee\\Mint\\DataStructures\\MintCriteria"],["c","Apigee\\Mint\\DataStructures\\Payment"],["c","Apigee\\Mint\\DataStructures\\RatePlanDetail"],["c","Apigee\\Mint\\DataStructures\\RatePlanRate"],["c","Apigee\\Mint\\DataStructures\\RevenueReport"],["c","Apigee\\Mint\\DataStructures\\SupportedCurrency"],["c","Apigee\\Mint\\Developer"],["c","Apigee\\Mint\\DeveloperBalance"],["c","Apigee\\Mint\\DeveloperCategory"],["c","Apigee\\Mint\\DeveloperRatePlan"],["c","Apigee\\Mint\\DeveloperRateplanCounter"],["c","Apigee\\Mint\\Exceptions\\InsufficientFundsException"],["c","Apigee\\Mint\\Exceptions\\MintApiException"],["c","Apigee\\Mint\\Limit"],["c","Apigee\\Mint\\ManagementAPIOrganization"],["c","Apigee\\Mint\\MonetizationPackage"],["c","Apigee\\Mint\\Organization"],["c","Apigee\\Mint\\PricePoint"],["c","Apigee\\Mint\\Product"],["c","Apigee\\Mint\\Provider"],["c","Apigee\\Mint\\RatePlan"],["c","Apigee\\Mint\\ReportDefinition"],["c","Apigee\\Mint\\SuborgProduct"],["c","Apigee\\Mint\\TermAndCondition"],["c","Apigee\\Mint\\Types\\ApplicationStatusType"],["c","Apigee\\Mint\\Types\\BillingCycleType"],["c","Apigee\\Mint\\Types\\BillingDocumentType"],["c","Apigee\\Mint\\Types\\BillingType"],["c","Apigee\\Mint\\Types\\Country"],["c","Apigee\\Mint\\Types\\DeveloperStatusType"],["c","Apigee\\Mint\\Types\\DeveloperTncsActionType"],["c","Apigee\\Mint\\Types\\DeveloperType"],["c","Apigee\\Mint\\Types\\DurationType"],["c","Apigee\\Mint\\Types\\MeteringType"],["c","Apigee\\Mint\\Types\\MonthType"],["c","Apigee\\Mint\\Types\\OrgType"],["c","Apigee\\Mint\\Types\\QuotaPeriodType"],["c","Apigee\\Mint\\Types\\QuotaType"],["c","Apigee\\Mint\\Types\\RatePlanRateType"],["c","Apigee\\Mint\\Types\\RatePlanType"],["c","Apigee\\Mint\\Types\\RecurringType"],["c","Apigee\\Mint\\Types\\RevenueType"],["c","Apigee\\Mint\\Types\\StatusType"],["c","Apigee\\Mint\\Types\\TaxModelType"],["c","Apigee\\Mint\\Types\\Type"],["c","Apigee\\SmartDocs\\Doc"],["c","Apigee\\SmartDocs\\Method"],["c","Apigee\\SmartDocs\\Model"],["c","Apigee\\SmartDocs\\Resource"],["c","Apigee\\SmartDocs\\Revision"],["c","Apigee\\SmartDocs\\Security"],["c","Apigee\\SmartDocs\\Security\\ApiKeyScheme"],["c","Apigee\\SmartDocs\\Security\\ApiKeyTemplateAuthScheme"],["c","Apigee\\SmartDocs\\Security\\BasicScheme"],["c","Apigee\\SmartDocs\\Security\\Oauth2Scheme"],["c","Apigee\\SmartDocs\\Security\\Oauth2TemplateAuthScheme"],["c","Apigee\\SmartDocs\\Security\\SecurityScheme"],["c","Apigee\\SmartDocs\\Security\\TemplateAuthScheme"],["c","Apigee\\SmartDocs\\Template"],["c","Apigee\\SmartDocs\\TemplateAuth"],["c","Apigee\\test\\AbstractAPITest"],["c","Apigee\\test\\ManagementAPI\\APIProductTest"],["c","Apigee\\test\\ManagementAPI\\DeveloperAppTest"],["c","Apigee\\test\\ManagementAPI\\DeveloperTest"],["c","Apigee\\Util\\APIObject"],["c","Apigee\\Util\\CacheFactory"],["c","Apigee\\Util\\CacheManager"],["c","Apigee\\Util\\DebugData"],["c","Apigee\\Util\\OrgConfig"]]; 4 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.Exceptions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee\Exceptions 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 116 |
117 | 118 |
119 | 120 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.Mint.Base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee\Mint\Base 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 112 |
113 | 114 |
115 | 116 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.Mint.Exceptions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee\Mint\Exceptions 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 113 |
114 | 115 |
116 | 117 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 107 |
108 | 109 |
110 | 111 | 174 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.test.ManagementAPI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee\test\ManagementAPI 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 114 |
115 | 116 |
117 | 118 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /docs/namespace-Apigee.test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Namespace Apigee\test 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 112 |
113 | 114 |
115 | 116 | 171 | 172 | 173 | 174 | 175 | -------------------------------------------------------------------------------- /docs/resources/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/collapsed.png -------------------------------------------------------------------------------- /docs/resources/footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/footer.png -------------------------------------------------------------------------------- /docs/resources/inherit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/inherit.png -------------------------------------------------------------------------------- /docs/resources/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/resize.png -------------------------------------------------------------------------------- /docs/resources/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/sort.png -------------------------------------------------------------------------------- /docs/resources/tree-cleaner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/tree-cleaner.png -------------------------------------------------------------------------------- /docs/resources/tree-hasnext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/tree-hasnext.png -------------------------------------------------------------------------------- /docs/resources/tree-last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/tree-last.png -------------------------------------------------------------------------------- /docs/resources/tree-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apigee/edge-php-sdk/26258667509c4f664ab0102a827bf51ee14aa6c8/docs/resources/tree-vertical.png -------------------------------------------------------------------------------- /docs/source-class-Apigee.Exceptions.IllegalMethodException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Exceptions/IllegalMethodException.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Exceptions.NotImplementedException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Exceptions/NotImplementedException.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 160 | 161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Exceptions.ParameterException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Exceptions/ParameterException.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Exceptions.TooManyAttributesException.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Exceptions/TooManyAttributesException.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.BillingCycleType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/BillingCycleType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.BillingType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/BillingType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.DeveloperStatusType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/DeveloperStatusType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.DeveloperTncsActionType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/DeveloperTncsActionType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.DeveloperType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/DeveloperType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.OrgType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/OrgType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.QuotaPeriodType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/QuotaPeriodType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.RatePlanRateType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/RatePlanRateType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.RecurringType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/RecurringType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.RevenueType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/RevenueType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.StatusType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/StatusType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 161 | 162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/source-class-Apigee.Mint.Types.TaxModelType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | File Mint/Types/TaxModelType.php 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 117 |
118 | 119 |
120 | 121 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./Apigee/test 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------