Module: DataAPI
- Defined in:
- lib/dapi/products/DataAPI.rb
Instance Method Summary collapse
- #getAccounts(appSecret, userSecret, token, sync, addresses) ⇒ Object
- #getAccountsMetaData(appSecret, userSecret, sync, addresses) ⇒ Object
- #getBalance(appSecret, userSecret, accountID, token, sync, addresses) ⇒ Object
- #getCardBalance(appSecret, userSecret, cardID, token, sync, addresses) ⇒ Object
- #getCards(appSecret, userSecret, token, sync, addresses) ⇒ Object
- #getCardTransactions(appSecret, userSecret, cardID, fromDate, toDate, token, sync, addresses) ⇒ Object
- #getIdentity(appSecret, userSecret, token, sync, addresses) ⇒ Object
- #getTranscations(appSecret, userSecret, accountID, fromDate, toDate, token, sync, addresses) ⇒ Object
Instance Method Details
#getAccounts(appSecret, userSecret, token, sync, addresses) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/dapi/products/DataAPI.rb', line 20 def getAccounts(appSecret, userSecret, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/accounts/get", {body: payload.to_json, headers: headers} ) end |
#getAccountsMetaData(appSecret, userSecret, sync, addresses) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/dapi/products/DataAPI.rb', line 114 def getAccountsMetaData(appSecret, userSecret, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/transactions/get", {body: payload.to_json, headers: headers} ) end |
#getBalance(appSecret, userSecret, accountID, token, sync, addresses) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/dapi/products/DataAPI.rb', line 50 def getBalance(appSecret, userSecret, accountID, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, accountID: accountID, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/balance/get", {body: payload.to_json, headers: headers} ) end |
#getCardBalance(appSecret, userSecret, cardID, token, sync, addresses) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/dapi/products/DataAPI.rb', line 66 def getCardBalance(appSecret, userSecret, cardID, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, cardID: cardID, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/balance/get", {body: payload.to_json, headers: headers} ) end |
#getCards(appSecret, userSecret, token, sync, addresses) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/dapi/products/DataAPI.rb', line 35 def getCards(appSecret, userSecret, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/cards/get", {body: payload.to_json, headers: headers} ) end |
#getCardTransactions(appSecret, userSecret, cardID, fromDate, toDate, token, sync, addresses) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/dapi/products/DataAPI.rb', line 98 def getCardTransactions(appSecret, userSecret, cardID, fromDate, toDate, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, cardID: cardID, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/transactions/get", {body: payload.to_json, headers: headers} ) end |
#getIdentity(appSecret, userSecret, token, sync, addresses) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dapi/products/DataAPI.rb', line 5 def getIdentity(appSecret, userSecret, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/identity/get", {body: payload.to_json, headers: headers} ) end |
#getTranscations(appSecret, userSecret, accountID, fromDate, toDate, token, sync, addresses) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/dapi/products/DataAPI.rb', line 82 def getTranscations(appSecret, userSecret, accountID, fromDate, toDate, token, sync, addresses) payload = { appSecret: appSecret, userSecret: userSecret, sync: sync, accountID: accountID, addresses: addresses } headers = { "Content-Type": "application/json", Authorization: "Bearer #{token}" } response = HTTParty.post( "http://localhost:80/v1/data/transactions/get", {body: payload.to_json, headers: headers} ) end |