Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

agcod

A tool for Amazon Gift Code On-Demand (AGCOD)

Published3 Aug 2018
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

Amazon Gift Code On-Demand (AGCOD)

This is a tool for working with the AGCOD service and can be used for easily creating, cancelling and checking the status of Amazon gift codes.

Install

pip install agcod

Quickstart

from agcod import client

client.sandbox = True  # default is True, False will use production URLs
client.debug = False  # default is False
client.aws_region_name = 'us-east-1'  # Default is us-east-1
client.partner_id = '<Your Partner ID>'
client.aws_key_id = '<Your AWS Key ID>'
client.aws_secret_key = '<Your AWS Secret Key>'

# Request ID must begin with Partner ID
request_id = client.partner_id + 'EXAMPLE'
amount = 1.00
currency = 'USD'

# Create a new gift code
result = client.create_gift_card(request_id, amount, currency)

# Example response
# {
#   "cardInfo": {
#     "cardNumber": null,
#     "cardStatus": "Fulfilled",
#     "expirationDate": null,
#     "value": {
#       "amount": 1.0,
#       "currencyCode": "USD"
#     }
#   },
#   "creationRequestId": "MyidEXAMPLE",
#   "gcClaimCode": "ABCD-12345-WXYZ",
#   "gcExpirationDate": null,
#   "gcId": "AA11BB22CC33DD",
#   "status": "SUCCESS"
# }

# Cancel that gift code
client.cancel_gift_card(request_id, result['gcId'])

# Get account balance
client.get_available_funds()

# Example response
# {
#   "availableFunds": {
#     "amount": 1250.00,
#     "currencyCode": "USD"
#   },
#   "status": "SUCCESS",
#   "timestamp": "20180802T155339Z"
# }

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
agcod-0.1.0.tar.gz

sdist · 3.33 KB · Python source

Source file

Repository

PENDING
geekforbrains/agcod

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:20 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e1a6b28cec7c77bf1506febab1ff7c6ba65117f81cbfef64937adb5d1ba76bb3

Other collected versions

View all collected versions →