{"id":28412540,"url":"https://github.com/incenteev/async-amazon-incentives","last_synced_at":"2025-06-13T13:35:35.623Z","repository":{"id":178876759,"uuid":"662501704","full_name":"Incenteev/async-amazon-incentives","owner":"Incenteev","description":"SDK for the Amazon Incentives API based on the structure of the async-aws project","archived":false,"fork":false,"pushed_at":"2024-10-14T07:27:27.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T10:14:53.407Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Incenteev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-05T09:16:38.000Z","updated_at":"2024-10-18T17:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"628de9fa-cc77-4b68-9b61-7e9366de696c","html_url":"https://github.com/Incenteev/async-amazon-incentives","commit_stats":null,"previous_names":["incenteev/async-amazon-incentives"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Incenteev%2Fasync-amazon-incentives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Incenteev%2Fasync-amazon-incentives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Incenteev%2Fasync-amazon-incentives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Incenteev%2Fasync-amazon-incentives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Incenteev","download_url":"https://codeload.github.com/Incenteev/async-amazon-incentives/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Incenteev%2Fasync-amazon-incentives/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258934190,"owners_count":22780573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2025-06-02T22:44:31.274Z","updated_at":"2025-06-13T13:35:35.611Z","avatar_url":"https://github.com/Incenteev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Async Amazon Incentives\n=======================\n\nThis package provides an unofficial SDK for the [Amazon Incentives API](https://developer.amazon.com/docs/incentives-api/digital-gift-cards.html).\n\n## Installation\n\nUse [Composer](https://getcomposer.org) to install the library:\n\n```bash\n$ composer require incenteev/async-amazon-incentives\n```\n\n## Usage\n\n```php\nuse AsyncAws\\Core\\Configuration;\nuse Incenteev\\AsyncAmazonIncentives\\AmazonIncentivesClient;\nuse Incenteev\\AsyncAmazonIncentives\\Enum\\CurrencyCode;\nuse Incenteev\\AsyncAmazonIncentives\\Exception\\SystemTemporarilyUnavailableException;\nuse Incenteev\\AsyncAmazonIncentives\\Region;\nuse Incenteev\\AsyncAmazonIncentives\\ValueObject\\MoneyAmount;\n\n// Get your credentials in the Amazon Incentives portal\n$accessKey = '';\n$secretKey = '';\n$partnerId = '';\n\n// Choose the region corresponding to your partnership, with either the sandbox or production one.\n$region = Region::EUROPE_AND_ASIA_SANDBOX;\n\n$client = new AmazonIncentivesClient([\n    Configuration::OPTION_ACCESS_KEY_ID =\u003e $accessKey,\n    Configuration::OPTION_SECRET_ACCESS_KEY =\u003e $secretKey,\n    Configuration::OPTION_REGION =\u003e $region,\n]);\n\ntry {\n    $result = $client-\u003ecreateGiftCard([\n        'partnerId' =\u003e $partnerId,\n        'creationRequestId' =\u003e '', // Create the proper request id\n        'value' =\u003e new MoneyAmount(['amount' =\u003e 10, 'currencyCode' =\u003e CurrencyCode::EUR]),\n    ]);\n\n    $code = $result-\u003egetGcClaimCode();\n} catch (SystemTemporarilyUnavailableException $e) {\n    // TODO handle temporary failures according to the Amazon Incentives best practices\n}\n```\n\n\u003e Note: due to the async nature of the project, the exception is not actually thrown by the call to `createGiftCard`\n\u003e but when the Result object gets resolved.\n\n## License\n\nThis package is under the [MIT license](LICENSE).\n\n## Reporting an issue or a feature request\n\nIssues and feature requests are tracked in the [GitHub issue tracker](https://github.com/Incenteev/async-amazon-incentives/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincenteev%2Fasync-amazon-incentives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fincenteev%2Fasync-amazon-incentives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincenteev%2Fasync-amazon-incentives/lists"}