GithubHelp home page GithubHelp logo

passkit / passkit-python-quickstart Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 1.0 58 KB

Python Quickstart to create, distribute, analyse and manage your Digital Coupons / Membership / Boarding Passes for Apple Wallet and Google Pay

Home Page: https://passkit.com

Python 100.00%
grpc python apple-wallet apple-wallet-support coupons flights google-pay google-wallet loyalty loyalty-program

passkit-python-quickstart's Introduction

PassKit Python Quickstart

License: MIT Version

Overview

This quickstart aims to help get Python developers up and running with the PassKit SDK as quickly as possible.

Prerequisites

You will need the following:

Configuration

  1. Download or clone this quickstart repository, create a folder certs in the resources folder of the repository and add the following three PassKit credential files:

    • certificate.pem
    • ca-chain.pem
    • key.pem

    You can disregard the key-java.pem credentials file as it is not compatible with Python.

  2. Use pip install passkit-python-grpc-sdk to download the latest sdk from python.

Membership Cards

In the membership folder the methods there are:

  • create-program.py - takes a new program name and creates a new program
  • create-tier.py - takes the programId of the program just created in the above program, creates a new template (based of default template), creates a tier, and links this tier to the program
  • enrol-member.py - takes programId and tierId created by the above methods, and memberDetails, creates a new member record, and sends a welcome email to deliver membership card url
  • update-member.py - takes memberId and memberDetails, and updates existing member record
  • check-in-member.py - takes memberId and location details and checks in the selected member
  • check-out-member.py - takes memberId and location details and checks out the selected member
  • earn-points.py - takes a programId of an existing program and memberId of existing member to add points to chosen member
  • burn-points.py - takes a programId of an existing program and memberId of existing member to use points from a chosen member
  • delete-member.py - takes programId, tierId, memberId and memberDetails, deletes an existing member record

Coupons

In the coupons folder the methods are:

  • create-campaign.py - takes a new campaign name and creates a new campaign
  • create-offer.py - takes a campaignId of the campaign you just created and creates a new template (based of default template), creates an offer, and links this offer to the campaign
  • create-coupon.py - takes campaignId and offerId created by the above methods, and couponDetails, creates a new coupon record, and sends a welcome email to deliver coupon card url
  • list-coupons.py - takes campaignId and returns list of coupon records under that campaign
  • update-coupon.py - takes a campaignId of an existing campaign and couponId of existing coupon to update that coupon
  • redeem-coupon.py - takes a campaignId of an existing campaign and couponId of existing coupon to redeem that coupon
  • void-coupon.py - takes the couponId, offerId and campaignId to void an existing coupon

Boarding Passes

Issue A Boarding Pass.

In the flights folder the methods are:

  • create-template.py - creates the pass template for flights and boarding passes
  • create-carrier.py - takes a new carrier code and creates a new carrier
  • create-airport.py - takes a new airport code and creates a new airport.
  • create-flight.py - takes templateId , from previous method, to use as base template and uses a carrier code, created from previous method, and creates a new flight
  • create-flight-designator.py - creates flight designator using flight code
  • create-boarding-pass.py - takes templateId, from previous method, and customer details creates a new boarding pass, and sends a welcome email to deliver boarding pass url
  • delete-flight.py - takes an existing flight number as well as other details and deletes the flight associated with it
  • delete-flight-designator.py - takes an existing flight designation and deletes the flight designator associated with it
  • delete-airports.py - takes an existing airport code and deletes the airport associated with it
  • delete-carrier.py - takes an existing carrier code and deletes the carrier associated with it

Documentation

passkit-python-quickstart's People

Contributors

canderson1538 avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.