t2_airtime 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -484
  3. data/lib/t2_airtime/serializer.rb +13 -13
  4. data/lib/t2_airtime/version.rb +1 -1
  5. data/spec/dummy/log/development.log +60 -0
  6. data/spec/dummy/tmp/cache/361/BB0/accounts +0 -0
  7. data/spec/dummy/tmp/cache/3DD/470/countries +0 -0
  8. data/spec/dummy/tmp/cache/4AF/760/products%2F715 +0 -0
  9. data/spec/dummy/tmp/cache/4DE/4A0/products%2F2361 +0 -0
  10. data/spec/dummy/tmp/cache/{4B0/790/products%2F734 → 4DF/460/products%2F2074} +0 -0
  11. data/spec/dummy/tmp/cache/4E6/4F0/products%2F2099 +0 -0
  12. data/spec/dummy/tmp/cache/{4DE/490/products%2F1623 → 4EB/5F0/products%2F1879} +0 -0
  13. data/spec/dummy/tmp/cache/51A/A70/operators%2F661 +0 -0
  14. data/spec/dummy/tmp/cache/51B/A80/operators%2F662 +0 -0
  15. data/spec/dummy/tmp/cache/51C/A90/operators%2F663 +0 -0
  16. data/spec/dummy/tmp/cache/51D/AA0/operators%2F664 +0 -0
  17. data/spec/dummy/tmp/cache/51F/AC0/operators%2F666 +0 -0
  18. data/spec/dummy/tmp/cache/769/350/accounts%2Fcurrency +1 -1
  19. data/spec/dummy/tmp/cache/8B4/E50/countries%2Fserializer +6 -166
  20. data/spec/dummy/tmp/cache/986/BE0/products%2F715%2Fserializer +1 -6
  21. data/spec/dummy/tmp/cache/9B5/F50/products%2F2361%2Fserializer +2 -24
  22. data/spec/dummy/tmp/cache/9B6/FE0/products%2F2074%2Fserializer +3 -0
  23. data/spec/dummy/tmp/cache/9BD/620/products%2F2099%2Fserializer +2 -21
  24. data/spec/dummy/tmp/cache/9C2/B30/products%2F1879%2Fserializer +3 -0
  25. data/spec/dummy/tmp/cache/9F1/5E0/operators%2F661%2Fserializer +1 -4
  26. data/spec/dummy/tmp/cache/9F2/6C0/operators%2F662%2Fserializer +1 -1
  27. data/spec/dummy/tmp/cache/9F3/7A0/operators%2F663%2Fserializer +2 -0
  28. data/spec/dummy/tmp/cache/9F4/880/operators%2F664%2Fserializer +1 -1
  29. data/spec/dummy/tmp/cache/9F6/A40/operators%2F666%2Fserializer +1 -1
  30. data/spec/t2_airtime_spec.rb +160 -171
  31. metadata +14 -22
  32. data/spec/dummy/tmp/cache/632/7D0/msisdn%2F%2B628123456710 +0 -0
  33. data/spec/dummy/tmp/cache/63A/8F0/msisdn%2F%2B393801524729 +0 -0
  34. data/spec/dummy/tmp/cache/6A6/C80/msisdn%2F%2B39393801524729 +0 -0
  35. data/spec/dummy/tmp/cache/78E/3C0/transactions%2F584176053 +0 -0
  36. data/spec/dummy/tmp/cache/7C4/670/products%2Fundefined +0 -0
  37. data/spec/dummy/tmp/cache/987/CE0/products%2F734%2Fserializer +0 -12
  38. data/spec/dummy/tmp/cache/9B5/F40/products%2F1623%2Fserializer +0 -27
  39. data/spec/dummy/tmp/cache/C65/D70/transactions%2F584176053%2Fserializer +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a465a10576955be1e193df5070890b80d6884d4
4
- data.tar.gz: 1182a3ea5ee57f02f690ac599ce286fc2bc5af53
3
+ metadata.gz: 0033cb2780d4034c75f9d8b3dfa66f458921a3e1
4
+ data.tar.gz: 7e69c57be3e92fcea08fdc8779b12bea942ea352
5
5
  SHA512:
6
- metadata.gz: b77299b057c64afb6e9a4591d89cb308b027bc89d08c79c98c24eeab8ade528cc39e37160c7efce85a5abb4ed9f6f61dd86a8a53e21a8e57c85b430a5936290d
7
- data.tar.gz: 5d13a4d7bb0f2bfa5ee5daf76eed8e3f67f897b5b667d464a8c72189bd2c316377ff34913a022e7e3a8b8fc5a03ee2371eb9c3df81bac68665d7a08d303edac5
6
+ metadata.gz: 7a63458e982c66c080ff02c11f7aa53601245360b5e28dcf2b471d61f86599b2acbad88da2c36329acc5c295e86319189c17c6dbf6e63951c4731d39bcfa3802
7
+ data.tar.gz: 3f02005f4df0ead3e41b99e726c86373217e96ac6c6e33d23c658fcfd278c2bf20edb49938245e5a2e999bb778e0203d4ed0f287e22b3fac34325ac7768ffc33
data/README.md CHANGED
@@ -1,518 +1,83 @@
1
- FORMAT: 1A
2
- HOST: http://polls.apiblueprint.org/
1
+ [![Build Status](https://travis-ci.org/matteolc/t2_airtime.svg?branch=master)](https://travis-ci.org/matteolc/t2_airtime)
2
+ [![Gem Version](https://badge.fury.io/rb/t2_airtime.svg)](https://badge.fury.io/rb/t2_airtime)
3
+ [![GitHub version](https://badge.fury.io/gh/matteolc%2Ft2_airtime.svg)](https://badge.fury.io/gh/matteolc%2Ft2_airtime)
4
+ [![Dependency Status](https://gemnasium.com/badges/github.com/matteolc/t2_airtime.svg)](https://gemnasium.com/github.com/matteolc/t2_airtime)
3
5
 
4
- # t2-airtime
6
+ t2-airtime
7
+ ==========
5
8
 
6
- T2-Airtime is a Ruby gem providing a proxy cache and a REST API to [TransferTo](https://www.transfer-to.com/home) Airtime service.
7
-
8
- ## Authorization
9
-
10
- + Two Factor Authentication (2FA) is enabled in your [TransferTo Shop](https://shop.transferto.com) Security Center section
11
- + You have your Transfer-To Shop username and Airtime secret key generated by 2FA
12
- + Export the secrets as environment variables `T2_SHOP_USER`, `T2_AIRTIME_KEY`
13
-
14
- # Account
9
+ [T2-Airtime](https://matteolc.github.io/t2_airtime/) client, `t2_airtime`.
15
10
 
16
- ```ruby
17
- irb(main)> account= T2Airtime::Account.get
18
- irb(main)> T2Airtime::Account.serialize(account.data)
19
- ```
11
+ T2-Airtime is a Ruby gem providing a proxy cache and a REST API to [TransferTo](https://www.transfer-to.com/home) Airtime service.
20
12
 
21
- ## Account Attributes
22
- - `id` (string) - Transfer-To TShop login name
23
- - `type` (string) - `Master` (main account) or `Retailer` (subaccount)
24
- - `name` (string) - Transfer-To TShop account name
25
- - `currency` (string) - Account currency (USD, GBP, EUR, etc...)
26
- - `balance` (float) - For `Master` account returns the account’s remaining balance.
27
- For `Retailer` returns the account’s remaining limit balance of the day
28
- if a daily limit is fixed. Else, returns the account remaining balance
29
- - `wallet` (float) - For `Master` returns the total remaining balance (sum
30
- of all sub-accounts and current master). For `Retailer`:
31
- 1. If balance is shared and daily limit is fixed: returns the fixed daily limit amount
32
- 2. If balance is shared but daily limit is not fixed: returns "No Limit"
33
- 3. Else if balance is not shared: returns the remaining balance
34
- - `fetchedAt` (string) - The date and time at which the information was fetched
13
+ ## Installation
35
14
 
36
- # Country
15
+ ### Install as a Ruby gem
37
16
 
38
- ```ruby
39
- irb(main)> countries= T2Airtime::Country.all
40
- irb(main)> T2Airtime::Country.serialize(countries.data)
17
+ ``` sh
18
+ gem install t2_airtime
41
19
  ```
42
20
 
43
- ## Country Attributes
44
- - `id` (integer) - Country Airtime ID
45
- - `name` (string) - The country name
46
- - `alpha3` (string) - The alpha3 code of the country
47
- - `callingCode` (float) - The international dialing code of the country
48
- - `fetchedAt` (string) - The date and time at which the information was fetched
21
+ ### Using Docker - alternative if you don't install ruby or installation not work for you
49
22
 
50
- # Operator
23
+ Download image:
51
24
 
52
- ```ruby
53
- irb(main)> operators= T2Airtime::Operator.all(666)
54
- irb(main)> T2Airtime::Operator.serialize(operators.data)
55
25
  ```
56
-
57
- ## Operator Attributes
58
- - `id` (integer) - Operator Airtime ID
59
- - `name` (string) - The operator name
60
- - `logo` (string) - The URL to the operator logo
61
- - `countryId` (float) - The country Airtime ID of the operator
62
- - `countryName` (float) - The country name
63
- - `countryAlpha3` (float) - The country alpha3
64
- - `fetchedAt` (string) - The date and time at which the information was fetched
65
-
66
- ## Operator Relationships
67
- - `country.id` (integer) - Country Airtime ID
68
-
69
- # Product
70
-
71
- ```ruby
72
- irb(main)> products= T2Airtime::Product.all(2361)
73
- irb(main)> T2Airtime::Product.serialize(products.data)
26
+ docker pull voxbox/t2_airtime
74
27
  ```
28
+ Run `docker run voxbox/t2_airtime`
75
29
 
76
- ## Product Attributes
77
- - `id` (integer) - Product Airtime ID
78
- - `name` (string) - The product name
79
- - `localCurrency` (string) - The currency code of the product
80
- - `localCurrencySymbol` (string) - The currency symbol of the product
81
- - `currency` (string) - The curreny of your account
82
- - `currencySymbol` (string) - The currency symbol of your account
83
- - `localPrice` (float) - The face-value of the topup
84
- - `retailPrice` (float) - The retail price of the product
85
- - `wholesalePrice` (float) - The wholesale price of the product
86
- - `countryId` (float) - The country Airtime ID of the product
87
- - `countryName` (float) - The country name
88
- - `countryAlpha3` (float) - The country alpha3
89
- - `operatorId` (string) - The operator Airtime ID of the product
90
- - `operatorName` (string) - The operator name
91
- - `operatorLogo` (string) - The URL to the operator logo
92
- - `fetchedAt` (string) - The date and time at which the information was fetched
30
+ Build from source code:
93
31
 
94
- ## Product Relationships
95
- - `country.id` (integer) - Country Airtime ID
96
- - `operator.id` (integer) - Operator Airtime ID
97
-
98
- # Transaction
99
-
100
- ```ruby
101
- irb(main)> transactions= T2Airtime::API.api.transaction_list
102
- irb(main)> T2Airtime::Transaction.serialize(transactions.data)
103
32
  ```
104
-
105
- ```ruby
106
- irb(main)> transaction= T2Airtime::Transaction.get("584171224")
107
- irb(main)> T2Airtime::Transaction.serialize_one(transaction.data)
33
+ docker build -t "voxbox/t2_airtime" .
108
34
  ```
109
35
 
110
- ## Transaction Attributes
111
- - `id` (integer) - Transaction Airtime ID
112
- - `msisdn` (string) - The international phone number or name of
113
- the user (sender) requesting to credit a phone number
114
- - `destinationMsisdn` (string) - Destination MSISDN (usually recipient phone number)
115
- - `transactionAuthenticationKey` (string) - Authentication key used during the transaction
116
- - `transactionErrorCode` (string) - Error code for the transaction
117
- - `transactionErrorTxt` (string) - Description of the error code for the transaction
118
- - `referenceOperator` (string) - Reference of the operator (returned only if available)
119
- - `actualProductSent` (string) - Returns the value requested to the operator
120
- (equals to product_requested in case of successful transaction). It equals to 0 when Top-up
121
- failed or in a simulation.
122
- - `sms` (string) - The custom message appended to the default notification SMS sent
123
- to the recipient
124
- - `cid1` (string) - Value of the customized field cid1 sent in the Top-up request
125
- - `cid2` (string) - Value of the customized field cid2 sent in the Top-up request
126
- - `cid3` (string) - Value of the customized field cid3 sent in the Top-up request
127
- - `date` (string) - Date of the transaction (GMT)
128
- - `currency` (string) - Currency of the account from which the transaction is requested
129
- - `localCurrency` (string) - Currency of the destination country
130
- - `pinBased` (string) - Type of product returned ("Yes", default "No" if not set)
131
- - `localInfoAmount` (string) - Final amount received by recipient. Indicative value only
132
- - `localInfoCurrency` (string) - Local currency in destination
133
- - `localInfoValue` (string) - Value of the transaction before tax and service fee in local currency
134
- - `errorCode` (string) - Error code for the transaction
135
- - `errorTxt` (string) - Description of the error code for the transaction
136
- - `productName` (string) - The product name
137
- - `productLocalCurrency` (string) - The currency code of the product
138
- - `productLocalCurrencySymbol` (string) - The currency symbol of the product
139
- - `productCurrency` (string) - The curreny of your account
140
- - `productCurrencySymbol` (string) - The currency symbol of your account
141
- - `productLocalPrice` (float) - The face-value of the topup
142
- - `productRetailPrice` (float) - The retail price of the product
143
- - `productWholesalePrice` (float) - The wholesale price of the product
144
- - `countryId` (float) - The country Airtime ID of the product
145
- - `countryName` (float) - The country name
146
- - `countryAlpha3` (float) - The country alpha3
147
- - `operatorId` (string) - The operator Airtime ID of the product
148
- - `operatorName` (string) - The operator name
149
- - `operatorLogo` (string) - The URL to the operator logo
150
- - `fetchedAt` (string) - The date and time at which the information was fetched
36
+ ### Setup Transfer-To credentials
151
37
 
152
- ## Transaction Relationships
153
- - `country.id` (integer) - Country Airtime ID
154
- - `operator.id` (integer) - Operator Airtime ID
155
- - `product.id` (integer) - Product Airtime ID
38
+ 1. Make sure you are a registered user of [Transfer-To](https://www.transfer-to.com/home).
39
+ 2. Enable Two Factor Authentication (2FA) in your [Transfer-To Shop](https://shop.transferto.com) Security Center section
40
+ 2. Retrieve API key (token) created by Transfer-To Shop.
41
+ 3. Export your secrets as an environment variables:
156
42
 
157
- # Topup
158
-
159
- ```ruby
160
- irb(main)> topup= T2Airtime::API.api.topup params
161
- irb(main)> T2Airtime::Topup.serialize(topup.data)
43
+ ```sh
44
+ export T2_SHOP_USER=<your_username>
45
+ export T2_AIRTIME_KEY=<your_token>
162
46
  ```
163
47
 
164
- ## Topup Attributes
165
- - `balance` (string) - For main account: returns the account’s remaining
166
- balance. For sub-account: returns the account’s remaining
167
- limit balance of the day if a daily limit is fixed. Else,
168
- returns the account remaining balance.
169
- - `balanceDisplay` (string) - The `balance` value formatted in the currency of your account
170
- - `transactionId` (integer) - Airtime ID of the transaction.
171
- - `msisdn` (string) - The international phone number or name of
172
- the user (sender) requesting to credit a phone number
173
- - `destinationMsisdn` (string) - Destination MSISDN (usually recipient phone number)
174
- - `transactionAuthenticationKey` (string) - Authentication key used during the transaction
175
- - `transactionErrorCode` (string) - Error code for the transaction
176
- - `transactionErrorTxt` (string) - Description of the error code for the transaction
177
- - `referenceOperator` (string) - Reference of the operator (returned only if available)
178
- - `actualProductSent` (string) - Returns the value requested to the operator
179
- (equals to product_requested in case of successful transaction). It equals to 0 when Top-up
180
- failed or in a simulation.
181
- - `sms` (string) - The custom message appended to the default notification SMS sent
182
- to the recipient
183
- - `smsSent` (string) - Defines the status of the notification SMS sent to the
184
- recipient. Returns `yes` only if the SMS has been successfully sent.
185
- - `smsText` (string) - The custom message appended to the default
186
- notification SMS sent to the sender.
187
- - `cid1` (string) - Value of the customized field cid1 sent in the Top-up request
188
- - `cid2` (string) - Value of the customized field cid2 sent in the Top-up request
189
- - `cid3` (string) - Value of the customized field cid3 sent in the Top-up request
190
- - `currency` (string) - Currency of the account from which the transaction is requested
191
- - `localCurrency` (string) - Currency of the destination country
192
- - `productName` (string) - The product name
193
- - `productLocalCurrency` (string) - The currency code of the product
194
- - `productLocalCurrencySymbol` (string) - The currency symbol of the product
195
- - `productCurrency` (string) - The curreny of your account
196
- - `productCurrencySymbol` (string) - The currency symbol of your account
197
- - `productLocalPrice` (float) - The face-value of the topup
198
- - `productRetailPrice` (float) - The retail price of the product
199
- - `productWholesalePrice` (float) - The wholesale price of the product
200
- - `countryId` (float) - The country Airtime ID of the product
201
- - `countryName` (float) - The country name
202
- - `countryAlpha3` (float) - The country alpha3
203
- - `operatorId` (string) - The operator Airtime ID of the product
204
- - `operatorName` (string) - The operator name
205
- - `operatorLogo` (string) - The URL to the operator logo
206
- - `executedAt` (string) - The date and time at which the information was fetched
207
-
208
- # Msisdn
209
-
210
- ```ruby
211
- irb(main)> msisdn= T2Airtime::Msisdn.info("+628123456710")
212
- irb(main)> T2Airtime::Msisdn.serialize(msisdn.data)
213
- ```
214
-
215
- ## Msisdn Attributes
216
- - `msisdn` (string) - The international mobile number
217
- - `country` (string) - The country of the number
218
- - `countryId` (string) - Country Airtime ID
219
- - `operator` (string) - The operator of the number
220
- - `operatorId` (string) - Operator Airtime ID
221
- - `fetchedAt` (string) - The date and time at which the information was fetched
222
-
223
- ## Accounts [/accounts]
224
- Cached for 1 hour.
48
+ ## Development
225
49
 
226
- ### Show Account [GET]
227
- + Response 200 (application/json)
50
+ 1. If needed, install bundler:
228
51
 
229
- {
230
- "type": "accounts",
231
- "id": "my-t2-shop-account",
232
- "attributes": {
233
- "type": "Master",
234
- "name": "my-t2-shop-account-name",
235
- "currency": "USD",
236
- "balance": 16.2,
237
- "wallet": 16.2,
238
- "fetchedAt": "2017-09-17T13:48:34Z"
239
- }
240
- }
52
+ ```sh
53
+ $ gem install bundler
54
+ ```
241
55
 
242
- ## Countries [/countries]
243
- Cached for 1 hour.
56
+ 2. Clone the repo:
244
57
 
245
- ### List all Countries [GET]
58
+ ```sh
59
+ $ git clone git@github.com:matteolc/t2_airtime.git
60
+ $ cd t2_airtime
61
+ ```
246
62
 
247
- + Response 200 (application/json)
63
+ 3. Install dependencies:
248
64
 
249
- [
250
- {
251
- "type": "countries"
252
- "id": 661
253
- "attributes": {
254
- "name": "Afghanistan"
255
- "alpha3": "AFG"
256
- "callingCode": "93"
257
- "fetchedAt": "2017-09-17T13:58:46Z"
258
- }
259
- }
260
- ...
261
- ]
65
+ ```sh
66
+ $ bundle install
67
+ ```
262
68
 
263
- ## Operators [/operators]
69
+ ## Test
264
70
 
265
- ### List all Operators [GET]
266
- Cached for 1 hour.
71
+ Inside the `t2_airtime` repository directory run:
267
72
 
268
- + Response 200 (application/json)
269
-
270
- [
271
- {
272
- "type": "operators"
273
- "id": 2361
274
- "attributes": {
275
- "name": "Movicel Angola USD"
276
- "logo": "https://operator-logo.transferto.com/logo-2361-1.png"
277
- "countryId": 666
278
- "countryName": "Angola"
279
- "countryAlpha3": "AGO"
280
- "fetchedAt": "2017-09-17T16:44:08Z"
281
- },
282
- "relationships": {
283
- "country": {
284
- "data":{
285
- "type": "countries"
286
- "id": 666
287
- }
288
- }
289
- }
290
- },
291
- ...
292
- ]
293
-
294
- ## Products [/products]
295
- Cached for 1 hour.
296
-
297
- ### List all Products [GET]
298
-
299
- + Response 200 (application/json)
300
-
301
- [
302
- {
303
- "type": "products"
304
- "id": 1
305
- "attributes": {
306
- "name": "$1.00"
307
- "localCurrency": "USD"
308
- "localCurrencySymbol": "$"
309
- "currency": "USD"
310
- "currencySymbol": "$"
311
- "localPrice": 1.0
312
- "retailPrice": 1.1
313
- "wholesalePrice": 1.03
314
- "countryId": 666
315
- "countryName": "Angola"
316
- "countryAlpha3": "AGO"
317
- "operatorId": 2361
318
- "operatorName": "Movicel Angola USD"
319
- "operatorLogo": "https://operator-logo.transferto.com/logo-2361-1.png"
320
- "fetchedAt": "2017-09-17T16:48:20Z"
321
- },
322
- "relationships": {
323
- "country": {
324
- "data": {
325
- "type": "countries"
326
- "id": 666
327
- }
328
- },
329
- "operator": {
330
- "data": {
331
- "type": "operators"
332
- "id": 2361
333
- }
334
- }
335
- },
336
- ...
337
- ]
338
-
339
- ## Transactions [/transactions]
340
-
341
- ### List all Transactions [GET]
342
-
343
- + Response 200 (application/json)
344
-
345
- [
346
- {
347
- "type": "transactions"
348
- "id": 584176053
349
- "attributes": {
350
- "msisdn": "+393800000000"
351
- "destinationMsisdn": "393800000001"
352
- "transactionAuthenticationKey": "1505553036"
353
- "transactionErrorCode": 0
354
- "transactionErrorTxt": "Transaction successful"
355
- "referenceOperator": nil
356
- "actualProductSent": "5"
357
- "sms": nil
358
- "smsText": "Test"
359
- "cid1": "Cid1"
360
- "cid2": "Cid2"
361
- "cid3": "Cid3"
362
- "date": "2017-09-16 09:10:39"
363
- "currency": "USD"
364
- "localCurrency": "EUR"
365
- "pinBased": "no"
366
- "localInfoAmount": "5.00"
367
- "localInfoCurrency": "EUR"
368
- "localInfoValue": "5.00"
369
- "errorCode": 0
370
- "errorTxt": "Transaction successful"
371
- "countryId": 772
372
- "countryName": "Italy"
373
- "countryAlpha3": "ITA"
374
- "operatorId": 734
375
- "operatorName": "Wind Italy"
376
- "operatorLogo": "https://operator-logo.transferto.com/logo-734-1.png"
377
- "productName": "€5.00"
378
- "productLocalCurrency": "EUR"
379
- "productLocalCurrencySymbol": "€"
380
- "productCurrency": "USD"
381
- "productCurrencySymbol": "$"
382
- "productLocalPrice": 5.0
383
- "productRetailPrice": 7.5
384
- "productWholesalePrice": 6.9
385
- "fetchedAt": "2017-09-17T16:56:29Z"
386
- },
387
- "relationships": {
388
- "country": {
389
- "data": {
390
- "type": "countries"
391
- "id": 772
392
- }
393
- },
394
- "operator": {
395
- "data": {
396
- "type": "operators"
397
- "id": 734
398
- }
399
- },
400
- "product": {
401
- "data": {
402
- "type": "products"
403
- "id": 5
404
- }
405
- }
406
- }
407
- },
408
- ...
409
- ]
410
-
411
- ### Show Transactions [GET]
412
-
413
- + Response 200 (application/json)
414
-
415
- {
416
- "type": "transactions"
417
- "id": 584176053
418
- "attributes": {
419
- "msisdn": "+393800000000"
420
- "destinationMsisdn": "393800000001"
421
- "transactionAuthenticationKey": "1505553036"
422
- "transactionErrorCode": 0
423
- "transactionErrorTxt": "Transaction successful"
424
- "referenceOperator": nil
425
- "actualProductSent": "5"
426
- "sms": nil
427
- "smsText": "Test"
428
- "cid1": "Cid1"
429
- "cid2": "Cid2"
430
- "cid3": "Cid3"
431
- "date": "2017-09-16 09:10:39"
432
- "currency": "USD"
433
- "localCurrency": "EUR"
434
- "pinBased": "no"
435
- "localInfoAmount": "5.00"
436
- "localInfoCurrency": "EUR"
437
- "localInfoValue": "5.00"
438
- "errorCode": 0
439
- "errorTxt": "Transaction successful"
440
- "countryId": 772
441
- "countryName": "Italy"
442
- "countryAlpha3": "ITA"
443
- "operatorId": 734
444
- "operatorName": "Wind Italy"
445
- "operatorLogo": "https://operator-logo.transferto.com/logo-734-1.png"
446
- "productName": "€5.00"
447
- "productLocalCurrency": "EUR"
448
- "productLocalCurrencySymbol": "€"
449
- "productCurrency": "USD"
450
- "productCurrencySymbol": "$"
451
- "productLocalPrice": 5.0
452
- "productRetailPrice": 7.5
453
- "productWholesalePrice": 6.9
454
- "fetchedAt": "2017-09-17T16:56:29Z"
455
- },
456
- "relationships": {
457
- "country": {
458
- "data": {
459
- "type": "countries"
460
- "id": 772
461
- }
462
- },
463
- "operator": {
464
- "data": {
465
- "type": "operators"
466
- "id": 734
467
- }
468
- },
469
- "product": {
470
- "data": {
471
- "type": "products"
472
- "id": 5
473
- }
474
- }
475
- }
476
- }
477
-
478
- ### Create (Reserve) Transaction [POST]
479
-
480
- + Response 200 (application/json)
481
-
482
- {
483
- "type": "transactions"
484
- "id": 584176053
485
- }
486
-
487
- ## Number Information [/msisdn_info]
488
- Cached for 24 hours.
489
-
490
- ### Show Number Information [GET]
491
-
492
- + Response 200 (application/json)
493
-
494
- {
495
- "type": "msisdn"
496
- "msisdn": "628123456710"
497
- "country": "Indonesia"
498
- "countryId": "767"
499
- "operator": "AAA-TESTING Indonesia USD"
500
- "operatorId": "1562"
501
- "fetchedAt": "2017-09-17T17:05:08Z"
502
- }
73
+ ```sh
74
+ $ bundle exec rspec
75
+ ```
503
76
 
504
- ## Topup [/topup]
505
77
 
506
- ### Create Topup [POST]
78
+ ## License
507
79
 
508
- + Response 200 (application/json)
80
+ Copyright 2015-17 (c) Matteo La Cognata
509
81
 
510
- {
511
- "type": "msisdn"
512
- "msisdn": "628123456710"
513
- "country": "Indonesia"
514
- "countryId": "767"
515
- "operator": "AAA-TESTING Indonesia USD"
516
- "operatorId": "1562"
517
- "fetchedAt": "2017-09-17T17:05:08Z"
518
- }
82
+ Released under MIT license.
83
+ See [LICENSE](https://raw.githubusercontent.com/apiaryio/apiary-client/master/LICENSE) file for further details.