Skip to main content

GiftReaper เป็นแพ็กเกจสำหรับช่วยในทำธุรกรรมจากการส่งซองทรูมันนี่

Project description

GiftReaper

GiftReaper เป็นแพ็กเกจสำหรับช่วยในทำธุรกรรมจากการส่งซองทรูมันนี่

ความสามารถของแพ็กเกจ

  • ตรวจสอบข้อมูลจากซองทรูมันนี่
  • รับเงินจากซองทรูมันนี่
  • เปรียบเทียบจำนวนเงินจากซองทรูมันนี่กับราคาสินค้าที่สนใจ
  • ตรวจสอบจำนวนเงินจากซองทรูมันนี่

วิธีติดตั้ง

pip install GiftReaper

วิธีตรวจสอบข้อมูลจากซองทรูมันนี่

verify_voucher(${ิงก์บัตรกำนัลหรือรหัสบัตรกำนัล}, ${หมายเลขโทรศัพท์ของบัญชีรับเงิน})

วิธีรับเงินจากซองทรูมันนี่

redeem_voucher(${ิงก์บัตรกำนัลหรือรหัสบัตรกำนัล}, ${หมายเลขโทรศัพท์ของบัญชีรับเงิน})

วิธีเปรียบเทียบจำนวนเงินจากซองทรูมันนี่กับราคาสินค้าที่สนใจ

is_voucher_balance_sufficient(${ิงก์บัตรกำนัลหรือรหัสบัตรกำนัล}, ${หมายเลขโทรศัพท์ของบัญชีรับเงิน}, ${ราคาสินค้าที่สนใจ})

วิธีตรวจสอบจำนวนเงินจากซองทรูมันนี่

check_voucher_amount_baht(${ิงก์บัตรกำนัลหรือรหัสบัตรกำนัล}, ${หมายเลขโทรศัพท์ของบัญชีรับเงิน})

ตัวอย่างรูปแบบข้อมูลต่าง ๆ

# รูปแบบลิงก์หรือรหัสบัตรกำนัล
voucher_url_first_format: str = 'https://gift.truemoney.com/campaign/?v={รหัสบัตรกำนัล}'
voucher_url_second_format: str = '{รหัสบัตรกำนัล}'

# รูปแบบหมายเลขโทรศัพท์
mobile_number_first_format: str = '08x-xxx-xxxx'
mobile_number_second_format: str = '08xxxxxxxx'

# รูปแบบราคาสินค้า
product_price_500: int = 500
product_price_500_0: float = 500.0

ตัวอย่าง

from GiftReaper import verify_voucher, redeem_voucher, is_voucher_balance_sufficient, check_voucher_amount_baht

voucher_url_10_baht: str = '{รหัสบัตรกำนัล}'
mobile_number: str = '08x-xxx-xxxx'

product_price_9_50: float = 9.50
product_price_10: int = 10
product_price_10_50: float = 10.50

if __name__ == '__main__':
    # check_voucher_amount_baht()
    print(check_voucher_amount_baht(voucher_url_10_baht, mobile_number)) # ผลลัพธ์ 10.0

    # is_voucher_balance_sufficient()
    print(is_voucher_balance_sufficient(voucher_url_10_baht, mobile_number, product_price_9_50)) # ผลลัพธ์ False
    print(is_voucher_balance_sufficient(voucher_url_10_baht, mobile_number, product_price_10)) # ผลลัพธ์ True
    print(is_voucher_balance_sufficient(voucher_url_10_baht, mobile_number, product_price_10_50)) # ผลลัพธ์ False

    # verify_voucher()
    verify_voucher(voucher_url_10_baht, mobile_number)
    
    # redeem_voucher()
    redeem_voucher(voucher_url_10_baht, mobile_number)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

giftreaper-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GiftReaper-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file giftreaper-0.0.1.tar.gz.

File metadata

  • Download URL: giftreaper-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for giftreaper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f42d513b8627da33e9de8afa9be445c4eb3a151c40a5655012a2ca5f42863d7f
MD5 1187e35e403e806c46886b14372958c9
BLAKE2b-256 5ad4cc59a3446032759257b20dc12893365130e30300c7b06f23b92f0b16f350

See more details on using hashes here.

File details

Details for the file GiftReaper-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: GiftReaper-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for GiftReaper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b0061e528a813de21bff71a6a9288603ece26be5da2f6e4c3fcd246f462133d
MD5 31fda833fd3c6d5a4b99a91de4e48101
BLAKE2b-256 e70b982b16fc0c5a1ff12caefe5de05c5627482f4f1b0d813724797516bea7d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page