当前位置: 首页>>代码示例>>Python>>正文


Python Wallet.Description方法代码示例

本文整理汇总了Python中mangopaysdk.entities.wallet.Wallet.Description方法的典型用法代码示例。如果您正苦于以下问题:Python Wallet.Description方法的具体用法?Python Wallet.Description怎么用?Python Wallet.Description使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mangopaysdk.entities.wallet.Wallet的用法示例。


在下文中一共展示了Wallet.Description方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getJohnsTransfer

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
    def getJohnsTransfer(self, walletWithMoney = None, wallet = None):
        """Creates Pay-Out  Bank Wire object"""
        
        if walletWithMoney == None:
            walletWithMoney = self.getJohnsWalletWithMoney()
        if wallet == None:
            wallet = Wallet()
            wallet.Owners = [walletWithMoney.Owners[0]]
            wallet.Currency = 'EUR'
            wallet.Description = 'WALLET IN EUR'
            wallet = self.sdk.wallets.Create(wallet)

        transfer = Transfer()
        transfer.Tag = 'DefaultTag'
        transfer.AuthorId = walletWithMoney.Owners[0]
        transfer.CreditedUserId = walletWithMoney.Owners[0]
        transfer.DebitedFunds = Money()
        transfer.DebitedFunds.Currency = 'EUR'
        transfer.DebitedFunds.Amount = 100
        transfer.Fees = Money()
        transfer.Fees.Currency = 'EUR'
        transfer.Fees.Amount = 0
        transfer.DebitedWalletId = walletWithMoney.Id
        transfer.CreditedWalletId = wallet.Id
        return self.sdk.transfers.Create(transfer)
开发者ID:Kmaschta,项目名称:mangopay2-python-sdk,代码行数:27,代码来源:testbase.py

示例2: get_or_create_wallet

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
	def get_or_create_wallet(mp_user, startup_id):
		# FIXME startup_id, and get before create
		wallet = Wallet()
		wallet.Owners = [mp_user.Id]
		wallet.Currency = 'EUR'
		wallet.Description = "user ID %d's Wallet, for the startup ID %d" % (dj_user.id, startup_id)

		return self.sdk.wallets.Create(wallet)
开发者ID:coinvestclub,项目名称:api,代码行数:10,代码来源:utils.py

示例3: create

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
 def create(self, currency, description=""):
     mangopay_wallet = Wallet()
     mangopay_wallet.Owners = [str(self.mangopay_user.mangopay_id)]
     mangopay_wallet.Description = description
     mangopay_wallet.Currency = currency
     client = get_mangopay_api_client()
     created_mangopay_wallet = client.wallets.Create(mangopay_wallet)
     self.mangopay_id = created_mangopay_wallet.Id
     self.save()
开发者ID:bsvetchine,项目名称:django-mangopay,代码行数:11,代码来源:models.py

示例4: getJohnsWallet

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
 def getJohnsWallet(self):
     """Creates TestBase._johnsWallet (wallets belonging to John) if not created yet"""
     if self._johnsWallet == None:
         john = self.getJohn()
         wallet = Wallet()
         wallet.Owners = [john.Id]
         wallet.Currency = 'EUR'
         wallet.Description = 'WALLET IN EUR'            
         self._johnsWallet = self.sdk.wallets.Create(wallet)
         #TODO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         #self.assertEqualInputProps(self._johnsWallet, wallet, True)
     return self._johnsWallet
开发者ID:Kmaschta,项目名称:mangopay2-python-sdk,代码行数:14,代码来源:testbase.py

示例5: create_wallet

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
def create_wallet(db, participant):
    w = Wallet()
    w.Owners.append(participant.mangopay_user_id)
    w.Description = str(participant.id)
    w.Currency = 'EUR'
    w = mangoapi.wallets.Create(w)
    db.run("""
        UPDATE participants
           SET mangopay_wallet_id = %s
         WHERE id = %s
    """, (w.Id, participant.id))
    participant.set_attributes(mangopay_wallet_id=w.Id)
    return w.Id
开发者ID:aandis,项目名称:liberapay.com,代码行数:15,代码来源:exchanges.py

示例6: getJohnsWalletWithMoney

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
    def getJohnsWalletWithMoney(self, amount = 10000):
        """Creates static JohnsWallet (wallets belonging to John) if not created yet
        return Wallet
        """
        if self._johnsWalletWithMoney == None:
            john = self.getJohn()
            wallet = Wallet()
            wallet.Owners = [john.Id]
            wallet.Currency = 'EUR'
            wallet.Description = 'WALLET IN EUR'            
            wallet = self.sdk.wallets.Create(wallet)    
            cardRegistration = CardRegistration()
            cardRegistration.UserId = wallet.Owners[0]
            cardRegistration.Currency = 'EUR'
            cardRegistration = self.sdk.cardRegistrations.Create(cardRegistration)
            cardRegistration.RegistrationData = self.getPaylineCorrectRegistartionData(cardRegistration)
            cardRegistration = self.sdk.cardRegistrations.Update(cardRegistration)
            card = self.sdk.cards.Get(cardRegistration.CardId)
            # create pay-in CARD DIRECT
            payIn = PayIn()
            payIn.CreditedWalletId = wallet.Id
            payIn.AuthorId = cardRegistration.UserId
            payIn.DebitedFunds = Money()
            payIn.DebitedFunds.Amount = amount
            payIn.DebitedFunds.Currency = 'EUR'
            payIn.Fees = Money()
            payIn.Fees.Amount = 0
            payIn.Fees.Currency = 'EUR'
            # payment type as CARD
            payIn.PaymentDetails = PayInPaymentDetailsCard()
            if (card.CardType == 'CB' or card.CardType == 'VISA' or card.CardType == 'MASTERCARD' or card.CardType == CardType.CB_VISA_MASTERCARD):
                payIn.PaymentDetails.CardType = CardType.CB_VISA_MASTERCARD
            # elif (card.CardType == CardType.AMEX):
            #    payIn.PaymentDetails.CardType = CardType.AMEX

            # execution type as DIRECT
            payIn.ExecutionDetails = PayInExecutionDetailsDirect()
            payIn.ExecutionDetails.CardId = card.Id
            payIn.ExecutionDetails.SecureModeReturnURL = 'http://test.com'
            # create Pay-In
            self.sdk.payIns.Create(payIn)
            self._johnsWalletWithMoney = self.sdk.wallets.Get(wallet.Id)
        return self._johnsWalletWithMoney
开发者ID:ebewe,项目名称:mangopay2-python-sdk,代码行数:45,代码来源:testbase.py

示例7: make_wallet

# 需要导入模块: from mangopaysdk.entities.wallet import Wallet [as 别名]
# 或者: from mangopaysdk.entities.wallet.Wallet import Description [as 别名]
def make_wallet(mangopay_user_id):
    w = Wallet()
    w.Owners.append(mangopay_user_id)
    w.Description = 'test wallet'
    w.Currency = 'EUR'
    return mangoapi.wallets.Create(w)
开发者ID:Calinou,项目名称:liberapay.com,代码行数:8,代码来源:mangopay.py


注:本文中的mangopaysdk.entities.wallet.Wallet.Description方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。