本文整理汇总了Python中securesubmit.entities.gift.HpsGiftCard类的典型用法代码示例。如果您正苦于以下问题:Python HpsGiftCard类的具体用法?Python HpsGiftCard怎么用?Python HpsGiftCard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HpsGiftCard类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_059_deactivate_gift_1
def test_059_deactivate_gift_1(self):
card = HpsGiftCard()
card.card_number = '5022440000000000098'
response = self.gift_service.deactivate().with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例2: test_058_reversal_gift_2
def test_058_reversal_gift_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
reversal_response = self.gift_service.reverse(2.00).with_card(card).execute()
self.assertIsNotNone(reversal_response)
self.assertEqual('0', reversal_response.response_code)
示例3: test_047_add_value_gift_2
def test_047_add_value_gift_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
response = self.gift_service.add_value(9.00).with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例4: test_062_balance_inquiry_rewards_2
def test_062_balance_inquiry_rewards_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
response = self.gift_service.balance().with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
self.assertEqual(u'0', response.points_balance_amount)
示例5: test_055_sale_gift_2_reversal
def test_055_sale_gift_2_reversal(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
response = self.gift_service.sale(4.00).with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
self.__class__.test_53_transaction_id = response.transaction_id
示例6: test_048_balance_inquiry_gift_1
def test_048_balance_inquiry_gift_1(self):
card = HpsGiftCard()
card.card_number = '5022440000000000098'
response = self.gift_service.balance().with_card(card).execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
self.assertEqual(u'10.00', response.balance_amount)
示例7: test_072_rewards_gift_2
def test_072_rewards_gift_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
response = self.gift_service.reward(11)\
.with_card(card)\
.execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例8: test_070_redeem_points_gift_2
def test_070_redeem_points_gift_2(self):
gift = HpsGiftCard()
gift.alias = '9725550100'
response = self.gift_service.sale(300)\
.with_currency('points')\
.with_card(gift)\
.execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例9: test_069_redeem_points_gift_2
def test_069_redeem_points_gift_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
response = self.gift_service.sale(200)\
.with_currency('points')\
.with_card(card)\
.execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例10: test_067_delete_alias_gift_1
def test_067_delete_alias_gift_1(self):
card = HpsGiftCard()
card.card_number = '5022440000000000098'
response = self.gift_service.alias()\
.with_card(card)\
.with_alias('2145550199')\
.with_action('DELETE')\
.execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例11: test_074_replace_gift_2
def test_074_replace_gift_2(self):
new_card = HpsGiftCard()
new_card.card_number = '5022440000000000098'
old_card = HpsGiftCard()
old_card.card_number = '5022440000000000007'
response = self.gift_service.replace()\
.with_old_card(old_card)\
.with_new_card(new_card)\
.execute()
self.assertIsNotNone(response)
self.assertEqual('0', response.response_code)
示例12: gift_card_2
def gift_card_2(self):
card = HpsGiftCard()
card.card_number = '5022440000000000007'
return card