Skip to content

Commit

Permalink
Add validationSendMoneyToEcurrency method
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Nakata authored and Erik Nakata committed May 8, 2017
1 parent 94fc7bc commit fe90c55
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ export default async ({ password, apiName, accountEmail, advcashSoapUrl = 'https
arg1: { from, count, sortOrder, startTimeFrom, startTimeTo, transactionName, transactionStatus, walletId }
}, historyMap),

validationSendMoneyToAdvcashCard: ({ amount, currency, email, cardType, walletId, note, savePaymentTemplate }) => advcashClient("validationSendMoneyToAdvcashCard", {
validationSendMoneyToAdvcashCard: ({ amount, currency, email, cardType, note, savePaymentTemplate }) => advcashClient("validationSendMoneyToAdvcashCard", {
arg0,
arg1: { amount, currency, email, cardType, walletId, note, savePaymentTemplate }
arg1: { amount, currency, email, cardType, note, savePaymentTemplate }
}),

validationSendMoneyToEcurrency: ({ amount, btcAmount, currency, ecurrency, receiver, note, savePaymentTemplate }) => advcashClient("validationSendMoneyToEcurrency", {
arg0,
arg1: { amount, btcAmount, currency, ecurrency, receiver, note, savePaymentTemplate }
}),
}
}
31 changes: 31 additions & 0 deletions test/validation-send-money-to-ecurrency.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import advcash from '../src/index'
import chai from 'chai'
import chaiAsPromised from 'chai-as-promised'

const expect = chai.expect
const password = process.env.ADVCASH_PASSWORD
const accountEmail = process.env.ADVCASH_ACCOUNT_EMAIL
const apiName = process.env.ADVCASH_API_NAME
const advcashSoapUrl = process.env.ADVCASH_SOAP_URL
const address = process.env.ECOIN_ADDRESS

chai.use(chaiAsPromised)

describe('validation Send Money To Ecurrency', () => {
it('Should return a null object', async () => {
const client = await advcash({ password, apiName, accountEmail })

const promise = client.validationSendMoneyToEcurrency({
amount: 1.00,
currency: "USD",
ecurrency: "ECOIN",
receiver: address,
note: "testing",
savePaymentTemplate: false
})

return Promise.all([
expect(promise).to.eventually.equal(null)
])
})
})

0 comments on commit fe90c55

Please sign in to comment.