centralindex 0.0.1 → 0.0.2
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.
- data/lib/CentralIndex.rb +972 -0
- metadata +2 -2
data/lib/CentralIndex.rb
CHANGED
@@ -52,12 +52,26 @@ class CentralIndex
|
|
52
52
|
end
|
53
53
|
|
54
54
|
|
55
|
+
#
|
56
|
+
# Confirms that the API is active, and returns the current version number
|
57
|
+
#
|
58
|
+
# @return - the data from the api
|
59
|
+
#
|
55
60
|
def getStatus()
|
56
61
|
params = Hash.new
|
57
62
|
return doCurl("get","/status",params)
|
58
63
|
end
|
59
64
|
|
60
65
|
|
66
|
+
#
|
67
|
+
# Fetch the project logo, the symbol of the Wolf
|
68
|
+
#
|
69
|
+
# @param a
|
70
|
+
# @param b
|
71
|
+
# @param c
|
72
|
+
# @param d
|
73
|
+
# @return - the data from the api
|
74
|
+
#
|
61
75
|
def getLogo( a, b, c, d)
|
62
76
|
params = Hash.new
|
63
77
|
params['a'] = a
|
@@ -68,6 +82,12 @@ class CentralIndex
|
|
68
82
|
end
|
69
83
|
|
70
84
|
|
85
|
+
#
|
86
|
+
# Fetch the project logo, the symbol of the Wolf
|
87
|
+
#
|
88
|
+
# @param a
|
89
|
+
# @return - the data from the api
|
90
|
+
#
|
71
91
|
def putLogo( a)
|
72
92
|
params = Hash.new
|
73
93
|
params['a'] = a
|
@@ -75,6 +95,12 @@ class CentralIndex
|
|
75
95
|
end
|
76
96
|
|
77
97
|
|
98
|
+
#
|
99
|
+
# Uploads a CSV file of known format and bulk inserts into DB
|
100
|
+
#
|
101
|
+
# @param filedata
|
102
|
+
# @return - the data from the api
|
103
|
+
#
|
78
104
|
def postEntityBulkCsv( filedata)
|
79
105
|
params = Hash.new
|
80
106
|
params['filedata'] = filedata
|
@@ -82,6 +108,12 @@ class CentralIndex
|
|
82
108
|
end
|
83
109
|
|
84
110
|
|
111
|
+
#
|
112
|
+
# Shows the current status of a bulk upload
|
113
|
+
#
|
114
|
+
# @param upload_id
|
115
|
+
# @return - the data from the api
|
116
|
+
#
|
85
117
|
def getEntityBulkCsvStatus( upload_id)
|
86
118
|
params = Hash.new
|
87
119
|
params['upload_id'] = upload_id
|
@@ -89,6 +121,16 @@ class CentralIndex
|
|
89
121
|
end
|
90
122
|
|
91
123
|
|
124
|
+
#
|
125
|
+
# This entity isn't really supported anymore. You probably want PUT /business. Only to be used for testing.
|
126
|
+
#
|
127
|
+
# @param type
|
128
|
+
# @param scope
|
129
|
+
# @param country
|
130
|
+
# @param trust
|
131
|
+
# @param our_data
|
132
|
+
# @return - the data from the api
|
133
|
+
#
|
92
134
|
def putEntity( type, scope, country, trust, our_data)
|
93
135
|
params = Hash.new
|
94
136
|
params['type'] = type
|
@@ -100,6 +142,12 @@ class CentralIndex
|
|
100
142
|
end
|
101
143
|
|
102
144
|
|
145
|
+
#
|
146
|
+
# Fetches the documents that match the given masheryid and supplier_id
|
147
|
+
#
|
148
|
+
# @param supplier_id - The Supplier ID
|
149
|
+
# @return - the data from the api
|
150
|
+
#
|
103
151
|
def getEntityBy_supplier_id( supplier_id)
|
104
152
|
params = Hash.new
|
105
153
|
params['supplier_id'] = supplier_id
|
@@ -107,6 +155,20 @@ class CentralIndex
|
|
107
155
|
end
|
108
156
|
|
109
157
|
|
158
|
+
#
|
159
|
+
# Search for matching entities
|
160
|
+
#
|
161
|
+
# @param what
|
162
|
+
# @param entity_name
|
163
|
+
# @param where
|
164
|
+
# @param per_page
|
165
|
+
# @param page
|
166
|
+
# @param longitude
|
167
|
+
# @param latitude
|
168
|
+
# @param country
|
169
|
+
# @param language
|
170
|
+
# @return - the data from the api
|
171
|
+
#
|
110
172
|
def getEntitySearch( what, entity_name, where, per_page, page, longitude, latitude, country, language)
|
111
173
|
params = Hash.new
|
112
174
|
params['what'] = what
|
@@ -122,6 +184,17 @@ class CentralIndex
|
|
122
184
|
end
|
123
185
|
|
124
186
|
|
187
|
+
#
|
188
|
+
# Search for matching entities
|
189
|
+
#
|
190
|
+
# @param what - What to get results for. E.g. Plumber e.g. plumber
|
191
|
+
# @param where - The location to get results for. E.g. Dublin e.g. Dublin
|
192
|
+
# @param per_page - Number of results returned per page
|
193
|
+
# @param page - Which page number to retrieve
|
194
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
195
|
+
# @param language - An ISO compatible language code, E.g. en
|
196
|
+
# @return - the data from the api
|
197
|
+
#
|
125
198
|
def getEntitySearchWhatBylocation( what, where, per_page, page, country, language)
|
126
199
|
params = Hash.new
|
127
200
|
params['what'] = what
|
@@ -134,6 +207,20 @@ class CentralIndex
|
|
134
207
|
end
|
135
208
|
|
136
209
|
|
210
|
+
#
|
211
|
+
# Search for matching entities
|
212
|
+
#
|
213
|
+
# @param what
|
214
|
+
# @param latitude_1
|
215
|
+
# @param longitude_1
|
216
|
+
# @param latitude_2
|
217
|
+
# @param longitude_2
|
218
|
+
# @param per_page
|
219
|
+
# @param page
|
220
|
+
# @param country
|
221
|
+
# @param language
|
222
|
+
# @return - the data from the api
|
223
|
+
#
|
137
224
|
def getEntitySearchWhatByboundingbox( what, latitude_1, longitude_1, latitude_2, longitude_2, per_page, page, country, language)
|
138
225
|
params = Hash.new
|
139
226
|
params['what'] = what
|
@@ -149,6 +236,19 @@ class CentralIndex
|
|
149
236
|
end
|
150
237
|
|
151
238
|
|
239
|
+
#
|
240
|
+
# Search for matching entities
|
241
|
+
#
|
242
|
+
# @param who
|
243
|
+
# @param latitude_1
|
244
|
+
# @param longitude_1
|
245
|
+
# @param latitude_2
|
246
|
+
# @param longitude_2
|
247
|
+
# @param per_page
|
248
|
+
# @param page
|
249
|
+
# @param country
|
250
|
+
# @return - the data from the api
|
251
|
+
#
|
152
252
|
def getEntitySearchWhoByboundingbox( who, latitude_1, longitude_1, latitude_2, longitude_2, per_page, page, country)
|
153
253
|
params = Hash.new
|
154
254
|
params['who'] = who
|
@@ -163,6 +263,16 @@ class CentralIndex
|
|
163
263
|
end
|
164
264
|
|
165
265
|
|
266
|
+
#
|
267
|
+
# Search for matching entities
|
268
|
+
#
|
269
|
+
# @param who - Company Name e.g. Starbucks
|
270
|
+
# @param where - The location to get results for. E.g. Dublin e.g. Dublin
|
271
|
+
# @param per_page - Number of results returned per page
|
272
|
+
# @param page - Which page number to retrieve
|
273
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
274
|
+
# @return - the data from the api
|
275
|
+
#
|
166
276
|
def getEntitySearchWhoBylocation( who, where, per_page, page, country)
|
167
277
|
params = Hash.new
|
168
278
|
params['who'] = who
|
@@ -174,6 +284,16 @@ class CentralIndex
|
|
174
284
|
end
|
175
285
|
|
176
286
|
|
287
|
+
#
|
288
|
+
# Search for matching entities
|
289
|
+
#
|
290
|
+
# @param what - What to get results for. E.g. Plumber e.g. plumber
|
291
|
+
# @param per_page - Number of results returned per page
|
292
|
+
# @param page - The page number to retrieve
|
293
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
294
|
+
# @param language - An ISO compatible language code, E.g. en
|
295
|
+
# @return - the data from the api
|
296
|
+
#
|
177
297
|
def getEntitySearchWhat( what, per_page, page, country, language)
|
178
298
|
params = Hash.new
|
179
299
|
params['what'] = what
|
@@ -185,6 +305,15 @@ class CentralIndex
|
|
185
305
|
end
|
186
306
|
|
187
307
|
|
308
|
+
#
|
309
|
+
# Search for matching entities
|
310
|
+
#
|
311
|
+
# @param who - Company name e.g. Starbucks
|
312
|
+
# @param per_page - How many results per page
|
313
|
+
# @param page - What page number to retrieve
|
314
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
315
|
+
# @return - the data from the api
|
316
|
+
#
|
188
317
|
def getEntitySearchWho( who, per_page, page, country)
|
189
318
|
params = Hash.new
|
190
319
|
params['who'] = who
|
@@ -195,6 +324,16 @@ class CentralIndex
|
|
195
324
|
end
|
196
325
|
|
197
326
|
|
327
|
+
#
|
328
|
+
# Search for matching entities
|
329
|
+
#
|
330
|
+
# @param where - Location to search for results. E.g. Dublin e.g. Dublin
|
331
|
+
# @param per_page - How many results per page
|
332
|
+
# @param page - What page number to retrieve
|
333
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie
|
334
|
+
# @param language - An ISO compatible language code, E.g. en
|
335
|
+
# @return - the data from the api
|
336
|
+
#
|
198
337
|
def getEntitySearchBylocation( where, per_page, page, country, language)
|
199
338
|
params = Hash.new
|
200
339
|
params['where'] = where
|
@@ -206,6 +345,19 @@ class CentralIndex
|
|
206
345
|
end
|
207
346
|
|
208
347
|
|
348
|
+
#
|
349
|
+
# Search for matching entities
|
350
|
+
#
|
351
|
+
# @param latitude_1
|
352
|
+
# @param longitude_1
|
353
|
+
# @param latitude_2
|
354
|
+
# @param longitude_2
|
355
|
+
# @param per_page
|
356
|
+
# @param page
|
357
|
+
# @param country
|
358
|
+
# @param language
|
359
|
+
# @return - the data from the api
|
360
|
+
#
|
209
361
|
def getEntitySearchByboundingbox( latitude_1, longitude_1, latitude_2, longitude_2, per_page, page, country, language)
|
210
362
|
params = Hash.new
|
211
363
|
params['latitude_1'] = latitude_1
|
@@ -220,6 +372,16 @@ class CentralIndex
|
|
220
372
|
end
|
221
373
|
|
222
374
|
|
375
|
+
#
|
376
|
+
# Search for matching entities that are advertisers and return a random selection upto the limit requested
|
377
|
+
#
|
378
|
+
# @param tag - The word or words the advertiser is to appear for in searches
|
379
|
+
# @param where - The location to get results for. E.g. Dublin
|
380
|
+
# @param limit - The number of advertisers that are to be returned
|
381
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
382
|
+
# @param language - An ISO compatible language code, E.g. en
|
383
|
+
# @return - the data from the api
|
384
|
+
#
|
223
385
|
def getEntityAdvertisers( tag, where, limit, country, language)
|
224
386
|
params = Hash.new
|
225
387
|
params['tag'] = tag
|
@@ -231,6 +393,12 @@ class CentralIndex
|
|
231
393
|
end
|
232
394
|
|
233
395
|
|
396
|
+
#
|
397
|
+
# Allows a whole entity to be pulled from the datastore by its unique id
|
398
|
+
#
|
399
|
+
# @param entity_id - The unique entity ID e.g. 379236608286720
|
400
|
+
# @return - the data from the api
|
401
|
+
#
|
234
402
|
def getEntity( entity_id)
|
235
403
|
params = Hash.new
|
236
404
|
params['entity_id'] = entity_id
|
@@ -238,6 +406,12 @@ class CentralIndex
|
|
238
406
|
end
|
239
407
|
|
240
408
|
|
409
|
+
#
|
410
|
+
# Get all entiies claimed by a specific user
|
411
|
+
#
|
412
|
+
# @param user_id - The unique user ID of the user with claimed entities e.g. 379236608286720
|
413
|
+
# @return - the data from the api
|
414
|
+
#
|
241
415
|
def getEntityBy_user_id( user_id)
|
242
416
|
params = Hash.new
|
243
417
|
params['user_id'] = user_id
|
@@ -245,6 +419,12 @@ class CentralIndex
|
|
245
419
|
end
|
246
420
|
|
247
421
|
|
422
|
+
#
|
423
|
+
# Allows a list of available revisions to be returned by its entity id
|
424
|
+
#
|
425
|
+
# @param entity_id
|
426
|
+
# @return - the data from the api
|
427
|
+
#
|
248
428
|
def getEntityRevisions( entity_id)
|
249
429
|
params = Hash.new
|
250
430
|
params['entity_id'] = entity_id
|
@@ -252,6 +432,13 @@ class CentralIndex
|
|
252
432
|
end
|
253
433
|
|
254
434
|
|
435
|
+
#
|
436
|
+
# Allows a specific revision of an entity to be returned by entity id and a revision number
|
437
|
+
#
|
438
|
+
# @param entity_id
|
439
|
+
# @param revision_id
|
440
|
+
# @return - the data from the api
|
441
|
+
#
|
255
442
|
def getEntityRevisionsByRevisionID( entity_id, revision_id)
|
256
443
|
params = Hash.new
|
257
444
|
params['entity_id'] = entity_id
|
@@ -260,6 +447,14 @@ class CentralIndex
|
|
260
447
|
end
|
261
448
|
|
262
449
|
|
450
|
+
#
|
451
|
+
# Separates an entity into two distinct entities
|
452
|
+
#
|
453
|
+
# @param entity_id
|
454
|
+
# @param supplier_masheryid
|
455
|
+
# @param supplier_id
|
456
|
+
# @return - the data from the api
|
457
|
+
#
|
263
458
|
def postEntityUnmerge( entity_id, supplier_masheryid, supplier_id)
|
264
459
|
params = Hash.new
|
265
460
|
params['entity_id'] = entity_id
|
@@ -269,6 +464,12 @@ class CentralIndex
|
|
269
464
|
end
|
270
465
|
|
271
466
|
|
467
|
+
#
|
468
|
+
# Fetches the changelog documents that match the given entity_id
|
469
|
+
#
|
470
|
+
# @param entity_id
|
471
|
+
# @return - the data from the api
|
472
|
+
#
|
272
473
|
def getEntityChangelog( entity_id)
|
273
474
|
params = Hash.new
|
274
475
|
params['entity_id'] = entity_id
|
@@ -276,6 +477,13 @@ class CentralIndex
|
|
276
477
|
end
|
277
478
|
|
278
479
|
|
480
|
+
#
|
481
|
+
# Merge two entities into one
|
482
|
+
#
|
483
|
+
# @param from
|
484
|
+
# @param to
|
485
|
+
# @return - the data from the api
|
486
|
+
#
|
279
487
|
def postEntityMerge( from, to)
|
280
488
|
params = Hash.new
|
281
489
|
params['from'] = from
|
@@ -284,12 +492,25 @@ class CentralIndex
|
|
284
492
|
end
|
285
493
|
|
286
494
|
|
495
|
+
#
|
496
|
+
# Force refresh of search indexes
|
497
|
+
#
|
498
|
+
# @return - the data from the api
|
499
|
+
#
|
287
500
|
def getToolsReindex()
|
288
501
|
params = Hash.new
|
289
502
|
return doCurl("get","/tools/reindex",params)
|
290
503
|
end
|
291
504
|
|
292
505
|
|
506
|
+
#
|
507
|
+
# Supply an entity and an object within it (e.g. a phone number), and retrieve a URL that allows the user to report an issue with that object
|
508
|
+
#
|
509
|
+
# @param entity_id - The unique Entity ID e.g. 379236608286720
|
510
|
+
# @param gen_id - A Unique ID for the object you wish to report, E.g. Phone number e.g. 379236608299008
|
511
|
+
# @param language
|
512
|
+
# @return - the data from the api
|
513
|
+
#
|
293
514
|
def getEntityReport( entity_id, gen_id, language)
|
294
515
|
params = Hash.new
|
295
516
|
params['entity_id'] = entity_id
|
@@ -299,6 +520,12 @@ class CentralIndex
|
|
299
520
|
end
|
300
521
|
|
301
522
|
|
523
|
+
#
|
524
|
+
# Allows us to identify the user, entity and element from an encoded endpoint URL's token
|
525
|
+
#
|
526
|
+
# @param token
|
527
|
+
# @return - the data from the api
|
528
|
+
#
|
302
529
|
def getToolsDecodereport( token)
|
303
530
|
params = Hash.new
|
304
531
|
params['token'] = token
|
@@ -306,6 +533,14 @@ class CentralIndex
|
|
306
533
|
end
|
307
534
|
|
308
535
|
|
536
|
+
#
|
537
|
+
# Update entities that use an old category ID to a new one
|
538
|
+
#
|
539
|
+
# @param from
|
540
|
+
# @param to
|
541
|
+
# @param limit
|
542
|
+
# @return - the data from the api
|
543
|
+
#
|
309
544
|
def postEntityMigrate_category( from, to, limit)
|
310
545
|
params = Hash.new
|
311
546
|
params['from'] = from
|
@@ -315,6 +550,29 @@ class CentralIndex
|
|
315
550
|
end
|
316
551
|
|
317
552
|
|
553
|
+
#
|
554
|
+
# Create a new business entity with all it's objects
|
555
|
+
#
|
556
|
+
# @param name
|
557
|
+
# @param address1
|
558
|
+
# @param address2
|
559
|
+
# @param address3
|
560
|
+
# @param district
|
561
|
+
# @param town
|
562
|
+
# @param county
|
563
|
+
# @param postcode
|
564
|
+
# @param country
|
565
|
+
# @param latitude
|
566
|
+
# @param longitude
|
567
|
+
# @param timezone
|
568
|
+
# @param telephone_number
|
569
|
+
# @param telephone_type
|
570
|
+
# @param email
|
571
|
+
# @param website
|
572
|
+
# @param category_id
|
573
|
+
# @param category_name
|
574
|
+
# @return - the data from the api
|
575
|
+
#
|
318
576
|
def putBusiness( name, address1, address2, address3, district, town, county, postcode, country, latitude, longitude, timezone, telephone_number, telephone_type, email, website, category_id, category_name)
|
319
577
|
params = Hash.new
|
320
578
|
params['name'] = name
|
@@ -339,6 +597,12 @@ class CentralIndex
|
|
339
597
|
end
|
340
598
|
|
341
599
|
|
600
|
+
#
|
601
|
+
# Provides a personalised URL to redirect a user to add an entity to Central Index
|
602
|
+
#
|
603
|
+
# @param language - The language to use to render the add path
|
604
|
+
# @return - the data from the api
|
605
|
+
#
|
342
606
|
def getEntityAdd( language)
|
343
607
|
params = Hash.new
|
344
608
|
params['language'] = language
|
@@ -346,6 +610,13 @@ class CentralIndex
|
|
346
610
|
end
|
347
611
|
|
348
612
|
|
613
|
+
#
|
614
|
+
# Find a location from cache or cloudant depending if it is in the cache
|
615
|
+
#
|
616
|
+
# @param string
|
617
|
+
# @param country
|
618
|
+
# @return - the data from the api
|
619
|
+
#
|
349
620
|
def getLookupLocation( string, country)
|
350
621
|
params = Hash.new
|
351
622
|
params['string'] = string
|
@@ -354,6 +625,13 @@ class CentralIndex
|
|
354
625
|
end
|
355
626
|
|
356
627
|
|
628
|
+
#
|
629
|
+
# Find a category from cache or cloudant depending if it is in the cache
|
630
|
+
#
|
631
|
+
# @param string - A string to search against, E.g. Plumbers
|
632
|
+
# @param language - An ISO compatible language code, E.g. en
|
633
|
+
# @return - the data from the api
|
634
|
+
#
|
357
635
|
def getLookupCategory( string, language)
|
358
636
|
params = Hash.new
|
359
637
|
params['string'] = string
|
@@ -362,6 +640,13 @@ class CentralIndex
|
|
362
640
|
end
|
363
641
|
|
364
642
|
|
643
|
+
#
|
644
|
+
# Find a category from a legacy ID or supplier (e.g. bill_moss)
|
645
|
+
#
|
646
|
+
# @param id
|
647
|
+
# @param type
|
648
|
+
# @return - the data from the api
|
649
|
+
#
|
365
650
|
def getLookupLegacyCategory( id, type)
|
366
651
|
params = Hash.new
|
367
652
|
params['id'] = id
|
@@ -370,6 +655,14 @@ class CentralIndex
|
|
370
655
|
end
|
371
656
|
|
372
657
|
|
658
|
+
#
|
659
|
+
# With a known entity id, a name can be updated.
|
660
|
+
#
|
661
|
+
# @param entity_id
|
662
|
+
# @param name
|
663
|
+
# @param formal_name
|
664
|
+
# @return - the data from the api
|
665
|
+
#
|
373
666
|
def postEntityName( entity_id, name, formal_name)
|
374
667
|
params = Hash.new
|
375
668
|
params['entity_id'] = entity_id
|
@@ -379,6 +672,18 @@ class CentralIndex
|
|
379
672
|
end
|
380
673
|
|
381
674
|
|
675
|
+
#
|
676
|
+
# With a known entity id, an background object can be added. There can however only be one background object.
|
677
|
+
#
|
678
|
+
# @param entity_id
|
679
|
+
# @param number_of_employees
|
680
|
+
# @param turnover
|
681
|
+
# @param net_profit
|
682
|
+
# @param vat_number
|
683
|
+
# @param duns_number
|
684
|
+
# @param registered_company_number
|
685
|
+
# @return - the data from the api
|
686
|
+
#
|
382
687
|
def postEntityBackground( entity_id, number_of_employees, turnover, net_profit, vat_number, duns_number, registered_company_number)
|
383
688
|
params = Hash.new
|
384
689
|
params['entity_id'] = entity_id
|
@@ -392,6 +697,19 @@ class CentralIndex
|
|
392
697
|
end
|
393
698
|
|
394
699
|
|
700
|
+
#
|
701
|
+
# With a known entity id, an employee object can be added.
|
702
|
+
#
|
703
|
+
# @param entity_id
|
704
|
+
# @param title
|
705
|
+
# @param forename
|
706
|
+
# @param surname
|
707
|
+
# @param job_title
|
708
|
+
# @param description
|
709
|
+
# @param email
|
710
|
+
# @param phone_number
|
711
|
+
# @return - the data from the api
|
712
|
+
#
|
395
713
|
def postEntityEmployee( entity_id, title, forename, surname, job_title, description, email, phone_number)
|
396
714
|
params = Hash.new
|
397
715
|
params['entity_id'] = entity_id
|
@@ -406,6 +724,13 @@ class CentralIndex
|
|
406
724
|
end
|
407
725
|
|
408
726
|
|
727
|
+
#
|
728
|
+
# Allows an employee object to be reduced in confidence
|
729
|
+
#
|
730
|
+
# @param entity_id
|
731
|
+
# @param gen_id
|
732
|
+
# @return - the data from the api
|
733
|
+
#
|
409
734
|
def deleteEntityEmployee( entity_id, gen_id)
|
410
735
|
params = Hash.new
|
411
736
|
params['entity_id'] = entity_id
|
@@ -414,6 +739,18 @@ class CentralIndex
|
|
414
739
|
end
|
415
740
|
|
416
741
|
|
742
|
+
#
|
743
|
+
# Allows a new phone object to be added to a specified entity. A new object id will be calculated and returned to you if successful.
|
744
|
+
#
|
745
|
+
# @param entity_id
|
746
|
+
# @param number
|
747
|
+
# @param description
|
748
|
+
# @param premium_rate
|
749
|
+
# @param telephone_type
|
750
|
+
# @param tps
|
751
|
+
# @param ctps
|
752
|
+
# @return - the data from the api
|
753
|
+
#
|
417
754
|
def postEntityPhone( entity_id, number, description, premium_rate, telephone_type, tps, ctps)
|
418
755
|
params = Hash.new
|
419
756
|
params['entity_id'] = entity_id
|
@@ -427,6 +764,13 @@ class CentralIndex
|
|
427
764
|
end
|
428
765
|
|
429
766
|
|
767
|
+
#
|
768
|
+
# Allows a phone object to be reduced in confidence
|
769
|
+
#
|
770
|
+
# @param entity_id
|
771
|
+
# @param gen_id
|
772
|
+
# @return - the data from the api
|
773
|
+
#
|
430
774
|
def deleteEntityPhone( entity_id, gen_id)
|
431
775
|
params = Hash.new
|
432
776
|
params['entity_id'] = entity_id
|
@@ -435,6 +779,15 @@ class CentralIndex
|
|
435
779
|
end
|
436
780
|
|
437
781
|
|
782
|
+
#
|
783
|
+
# With a known entity id, an fax object can be added.
|
784
|
+
#
|
785
|
+
# @param entity_id
|
786
|
+
# @param number
|
787
|
+
# @param description
|
788
|
+
# @param premium_rate
|
789
|
+
# @return - the data from the api
|
790
|
+
#
|
438
791
|
def postEntityFax( entity_id, number, description, premium_rate)
|
439
792
|
params = Hash.new
|
440
793
|
params['entity_id'] = entity_id
|
@@ -445,6 +798,13 @@ class CentralIndex
|
|
445
798
|
end
|
446
799
|
|
447
800
|
|
801
|
+
#
|
802
|
+
# Allows a fax object to be reduced in confidence
|
803
|
+
#
|
804
|
+
# @param entity_id
|
805
|
+
# @param gen_id
|
806
|
+
# @return - the data from the api
|
807
|
+
#
|
448
808
|
def deleteEntityFax( entity_id, gen_id)
|
449
809
|
params = Hash.new
|
450
810
|
params['entity_id'] = entity_id
|
@@ -453,6 +813,14 @@ class CentralIndex
|
|
453
813
|
end
|
454
814
|
|
455
815
|
|
816
|
+
#
|
817
|
+
# With a known category id, an category object can be added.
|
818
|
+
#
|
819
|
+
# @param category_id
|
820
|
+
# @param language
|
821
|
+
# @param name
|
822
|
+
# @return - the data from the api
|
823
|
+
#
|
456
824
|
def putCategory( category_id, language, name)
|
457
825
|
params = Hash.new
|
458
826
|
params['category_id'] = category_id
|
@@ -462,6 +830,15 @@ class CentralIndex
|
|
462
830
|
end
|
463
831
|
|
464
832
|
|
833
|
+
#
|
834
|
+
# With a known category id, a mapping object can be added.
|
835
|
+
#
|
836
|
+
# @param category_id
|
837
|
+
# @param type
|
838
|
+
# @param id
|
839
|
+
# @param name
|
840
|
+
# @return - the data from the api
|
841
|
+
#
|
465
842
|
def postCategoryMappings( category_id, type, id, name)
|
466
843
|
params = Hash.new
|
467
844
|
params['category_id'] = category_id
|
@@ -472,6 +849,14 @@ class CentralIndex
|
|
472
849
|
end
|
473
850
|
|
474
851
|
|
852
|
+
#
|
853
|
+
# With a known category id, an synonym object can be added.
|
854
|
+
#
|
855
|
+
# @param category_id
|
856
|
+
# @param synonym
|
857
|
+
# @param language
|
858
|
+
# @return - the data from the api
|
859
|
+
#
|
475
860
|
def postCategorySynonym( category_id, synonym, language)
|
476
861
|
params = Hash.new
|
477
862
|
params['category_id'] = category_id
|
@@ -481,6 +866,14 @@ class CentralIndex
|
|
481
866
|
end
|
482
867
|
|
483
868
|
|
869
|
+
#
|
870
|
+
# With a known category id, a synonyms object can be removed.
|
871
|
+
#
|
872
|
+
# @param category_id
|
873
|
+
# @param synonym
|
874
|
+
# @param language
|
875
|
+
# @return - the data from the api
|
876
|
+
#
|
484
877
|
def deleteCategorySynonym( category_id, synonym, language)
|
485
878
|
params = Hash.new
|
486
879
|
params['category_id'] = category_id
|
@@ -490,6 +883,13 @@ class CentralIndex
|
|
490
883
|
end
|
491
884
|
|
492
885
|
|
886
|
+
#
|
887
|
+
# Allows a category object to merged with another
|
888
|
+
#
|
889
|
+
# @param from
|
890
|
+
# @param to
|
891
|
+
# @return - the data from the api
|
892
|
+
#
|
493
893
|
def postCategoryMerge( from, to)
|
494
894
|
params = Hash.new
|
495
895
|
params['from'] = from
|
@@ -498,6 +898,14 @@ class CentralIndex
|
|
498
898
|
end
|
499
899
|
|
500
900
|
|
901
|
+
#
|
902
|
+
# With a known entity id, an category object can be added.
|
903
|
+
#
|
904
|
+
# @param entity_id
|
905
|
+
# @param category_id
|
906
|
+
# @param category_name
|
907
|
+
# @return - the data from the api
|
908
|
+
#
|
501
909
|
def postEntityCategory( entity_id, category_id, category_name)
|
502
910
|
params = Hash.new
|
503
911
|
params['entity_id'] = entity_id
|
@@ -507,6 +915,13 @@ class CentralIndex
|
|
507
915
|
end
|
508
916
|
|
509
917
|
|
918
|
+
#
|
919
|
+
# Allows a category object to be reduced in confidence
|
920
|
+
#
|
921
|
+
# @param entity_id
|
922
|
+
# @param gen_id
|
923
|
+
# @return - the data from the api
|
924
|
+
#
|
510
925
|
def deleteEntityCategory( entity_id, gen_id)
|
511
926
|
params = Hash.new
|
512
927
|
params['entity_id'] = entity_id
|
@@ -515,6 +930,15 @@ class CentralIndex
|
|
515
930
|
end
|
516
931
|
|
517
932
|
|
933
|
+
#
|
934
|
+
# With a known entity id, a geopoint can be updated.
|
935
|
+
#
|
936
|
+
# @param entity_id
|
937
|
+
# @param longitude
|
938
|
+
# @param latitude
|
939
|
+
# @param accuracy
|
940
|
+
# @return - the data from the api
|
941
|
+
#
|
518
942
|
def postEntityGeopoint( entity_id, longitude, latitude, accuracy)
|
519
943
|
params = Hash.new
|
520
944
|
params['entity_id'] = entity_id
|
@@ -525,6 +949,17 @@ class CentralIndex
|
|
525
949
|
end
|
526
950
|
|
527
951
|
|
952
|
+
#
|
953
|
+
# Find all matches by phone number and then return all matches that also match company name and location. Default location_strictness is defined in Km and the default is set to 0.2 (200m)
|
954
|
+
#
|
955
|
+
# @param phone
|
956
|
+
# @param company_name
|
957
|
+
# @param latitude
|
958
|
+
# @param longitude
|
959
|
+
# @param name_strictness
|
960
|
+
# @param location_strictness
|
961
|
+
# @return - the data from the api
|
962
|
+
#
|
528
963
|
def getMatchByphone( phone, company_name, latitude, longitude, name_strictness, location_strictness)
|
529
964
|
params = Hash.new
|
530
965
|
params['phone'] = phone
|
@@ -537,6 +972,16 @@ class CentralIndex
|
|
537
972
|
end
|
538
973
|
|
539
974
|
|
975
|
+
#
|
976
|
+
# Find all matches by location and then return all matches that also match company name. Default location_strictness is set to 7, which equates to +/- 20m
|
977
|
+
#
|
978
|
+
# @param company_name
|
979
|
+
# @param latitude
|
980
|
+
# @param longitude
|
981
|
+
# @param name_strictness
|
982
|
+
# @param location_strictness
|
983
|
+
# @return - the data from the api
|
984
|
+
#
|
540
985
|
def getMatchBylocation( company_name, latitude, longitude, name_strictness, location_strictness)
|
541
986
|
params = Hash.new
|
542
987
|
params['company_name'] = company_name
|
@@ -548,6 +993,12 @@ class CentralIndex
|
|
548
993
|
end
|
549
994
|
|
550
995
|
|
996
|
+
#
|
997
|
+
# Removes stopwords from a string
|
998
|
+
#
|
999
|
+
# @param text
|
1000
|
+
# @return - the data from the api
|
1001
|
+
#
|
551
1002
|
def getToolsStopwords( text)
|
552
1003
|
params = Hash.new
|
553
1004
|
params['text'] = text
|
@@ -555,6 +1006,12 @@ class CentralIndex
|
|
555
1006
|
end
|
556
1007
|
|
557
1008
|
|
1009
|
+
#
|
1010
|
+
# Returns a stemmed version of a string
|
1011
|
+
#
|
1012
|
+
# @param text
|
1013
|
+
# @return - the data from the api
|
1014
|
+
#
|
558
1015
|
def getToolsStem( text)
|
559
1016
|
params = Hash.new
|
560
1017
|
params['text'] = text
|
@@ -562,6 +1019,12 @@ class CentralIndex
|
|
562
1019
|
end
|
563
1020
|
|
564
1021
|
|
1022
|
+
#
|
1023
|
+
# Return the phonetic representation of a string
|
1024
|
+
#
|
1025
|
+
# @param text
|
1026
|
+
# @return - the data from the api
|
1027
|
+
#
|
565
1028
|
def getToolsPhonetic( text)
|
566
1029
|
params = Hash.new
|
567
1030
|
params['text'] = text
|
@@ -569,6 +1032,12 @@ class CentralIndex
|
|
569
1032
|
end
|
570
1033
|
|
571
1034
|
|
1035
|
+
#
|
1036
|
+
# Fully process a string. This includes removing punctuation, stops words and stemming a string. Also returns the phonetic representation of this string.
|
1037
|
+
#
|
1038
|
+
# @param text
|
1039
|
+
# @return - the data from the api
|
1040
|
+
#
|
572
1041
|
def getToolsProcess_string( text)
|
573
1042
|
params = Hash.new
|
574
1043
|
params['text'] = text
|
@@ -576,6 +1045,12 @@ class CentralIndex
|
|
576
1045
|
end
|
577
1046
|
|
578
1047
|
|
1048
|
+
#
|
1049
|
+
# Attempt to process a phone number, removing anything which is not a digit
|
1050
|
+
#
|
1051
|
+
# @param number
|
1052
|
+
# @return - the data from the api
|
1053
|
+
#
|
579
1054
|
def getToolsProcess_phone( number)
|
580
1055
|
params = Hash.new
|
581
1056
|
params['number'] = number
|
@@ -583,6 +1058,12 @@ class CentralIndex
|
|
583
1058
|
end
|
584
1059
|
|
585
1060
|
|
1061
|
+
#
|
1062
|
+
# Spider a single url looking for key facts
|
1063
|
+
#
|
1064
|
+
# @param url
|
1065
|
+
# @return - the data from the api
|
1066
|
+
#
|
586
1067
|
def getToolsSpider( url)
|
587
1068
|
params = Hash.new
|
588
1069
|
params['url'] = url
|
@@ -590,6 +1071,12 @@ class CentralIndex
|
|
590
1071
|
end
|
591
1072
|
|
592
1073
|
|
1074
|
+
#
|
1075
|
+
# Supply an address to geocode - returns lat/lon and accuracy
|
1076
|
+
#
|
1077
|
+
# @param address
|
1078
|
+
# @return - the data from the api
|
1079
|
+
#
|
593
1080
|
def getToolsGeocode( address)
|
594
1081
|
params = Hash.new
|
595
1082
|
params['address'] = address
|
@@ -597,6 +1084,15 @@ class CentralIndex
|
|
597
1084
|
end
|
598
1085
|
|
599
1086
|
|
1087
|
+
#
|
1088
|
+
# Generate JSON in the format to generate Mashery's IODocs
|
1089
|
+
#
|
1090
|
+
# @param mode - The HTTP method of the API call to document. e.g. GET
|
1091
|
+
# @param path - The path of the API call to document e.g, /entity
|
1092
|
+
# @param endpoint - The Mashery 'endpoint' to prefix to our API paths e.g. v1
|
1093
|
+
# @param doctype - Mashery has two forms of JSON to describe API methods; one on github, the other on its customer dashboard
|
1094
|
+
# @return - the data from the api
|
1095
|
+
#
|
600
1096
|
def getToolsIodocs( mode, path, endpoint, doctype)
|
601
1097
|
params = Hash.new
|
602
1098
|
params['mode'] = mode
|
@@ -607,6 +1103,13 @@ class CentralIndex
|
|
607
1103
|
end
|
608
1104
|
|
609
1105
|
|
1106
|
+
#
|
1107
|
+
# Use this call to get information (in HTML or JSON) about the data structure of given entity object (e.g. a phone number or an address)
|
1108
|
+
#
|
1109
|
+
# @param object - The API call documentation is required for
|
1110
|
+
# @param format - The format of the returned data eg. JSON or HTML
|
1111
|
+
# @return - the data from the api
|
1112
|
+
#
|
610
1113
|
def getToolsDocs( object, format)
|
611
1114
|
params = Hash.new
|
612
1115
|
params['object'] = object
|
@@ -615,6 +1118,13 @@ class CentralIndex
|
|
615
1118
|
end
|
616
1119
|
|
617
1120
|
|
1121
|
+
#
|
1122
|
+
# Format a phone number according to the rules of the country supplied
|
1123
|
+
#
|
1124
|
+
# @param number - The telephone number to format
|
1125
|
+
# @param country - The country where the telephone number is based
|
1126
|
+
# @return - the data from the api
|
1127
|
+
#
|
618
1128
|
def getToolsFormatPhone( number, country)
|
619
1129
|
params = Hash.new
|
620
1130
|
params['number'] = number
|
@@ -623,6 +1133,20 @@ class CentralIndex
|
|
623
1133
|
end
|
624
1134
|
|
625
1135
|
|
1136
|
+
#
|
1137
|
+
# With a known entity id, an invoice_address object can be updated.
|
1138
|
+
#
|
1139
|
+
# @param entity_id
|
1140
|
+
# @param address1
|
1141
|
+
# @param address2
|
1142
|
+
# @param address3
|
1143
|
+
# @param district
|
1144
|
+
# @param town
|
1145
|
+
# @param county
|
1146
|
+
# @param postcode
|
1147
|
+
# @param address_type
|
1148
|
+
# @return - the data from the api
|
1149
|
+
#
|
626
1150
|
def postEntityInvoice_address( entity_id, address1, address2, address3, district, town, county, postcode, address_type)
|
627
1151
|
params = Hash.new
|
628
1152
|
params['entity_id'] = entity_id
|
@@ -638,6 +1162,12 @@ class CentralIndex
|
|
638
1162
|
end
|
639
1163
|
|
640
1164
|
|
1165
|
+
#
|
1166
|
+
# With a known entity id and a known invoice_address ID, we can delete a specific invoice_address object from an enitity.
|
1167
|
+
#
|
1168
|
+
# @param entity_id
|
1169
|
+
# @return - the data from the api
|
1170
|
+
#
|
641
1171
|
def deleteEntityInvoice_address( entity_id)
|
642
1172
|
params = Hash.new
|
643
1173
|
params['entity_id'] = entity_id
|
@@ -645,6 +1175,14 @@ class CentralIndex
|
|
645
1175
|
end
|
646
1176
|
|
647
1177
|
|
1178
|
+
#
|
1179
|
+
# With a known entity id, an tag object can be added.
|
1180
|
+
#
|
1181
|
+
# @param entity_id
|
1182
|
+
# @param tag
|
1183
|
+
# @param language
|
1184
|
+
# @return - the data from the api
|
1185
|
+
#
|
648
1186
|
def postEntityTag( entity_id, tag, language)
|
649
1187
|
params = Hash.new
|
650
1188
|
params['entity_id'] = entity_id
|
@@ -654,6 +1192,13 @@ class CentralIndex
|
|
654
1192
|
end
|
655
1193
|
|
656
1194
|
|
1195
|
+
#
|
1196
|
+
# Allows a tag object to be reduced in confidence
|
1197
|
+
#
|
1198
|
+
# @param entity_id
|
1199
|
+
# @param gen_id
|
1200
|
+
# @return - the data from the api
|
1201
|
+
#
|
657
1202
|
def deleteEntityTag( entity_id, gen_id)
|
658
1203
|
params = Hash.new
|
659
1204
|
params['entity_id'] = entity_id
|
@@ -662,6 +1207,20 @@ class CentralIndex
|
|
662
1207
|
end
|
663
1208
|
|
664
1209
|
|
1210
|
+
#
|
1211
|
+
# Create/Update a postal address
|
1212
|
+
#
|
1213
|
+
# @param entity_id
|
1214
|
+
# @param address1
|
1215
|
+
# @param address2
|
1216
|
+
# @param address3
|
1217
|
+
# @param district
|
1218
|
+
# @param town
|
1219
|
+
# @param county
|
1220
|
+
# @param postcode
|
1221
|
+
# @param address_type
|
1222
|
+
# @return - the data from the api
|
1223
|
+
#
|
665
1224
|
def postEntityPostal_address( entity_id, address1, address2, address3, district, town, county, postcode, address_type)
|
666
1225
|
params = Hash.new
|
667
1226
|
params['entity_id'] = entity_id
|
@@ -677,6 +1236,17 @@ class CentralIndex
|
|
677
1236
|
end
|
678
1237
|
|
679
1238
|
|
1239
|
+
#
|
1240
|
+
# With a known entity id, a advertiser is added
|
1241
|
+
#
|
1242
|
+
# @param entity_id
|
1243
|
+
# @param tags
|
1244
|
+
# @param locations
|
1245
|
+
# @param expiry
|
1246
|
+
# @param is_national
|
1247
|
+
# @param language
|
1248
|
+
# @return - the data from the api
|
1249
|
+
#
|
680
1250
|
def postEntityAdvertiser( entity_id, tags, locations, expiry, is_national, language)
|
681
1251
|
params = Hash.new
|
682
1252
|
params['entity_id'] = entity_id
|
@@ -689,6 +1259,13 @@ class CentralIndex
|
|
689
1259
|
end
|
690
1260
|
|
691
1261
|
|
1262
|
+
#
|
1263
|
+
# Allows an advertiser object to be reduced in confidence
|
1264
|
+
#
|
1265
|
+
# @param entity_id
|
1266
|
+
# @param gen_id
|
1267
|
+
# @return - the data from the api
|
1268
|
+
#
|
692
1269
|
def deleteEntityAdvertiser( entity_id, gen_id)
|
693
1270
|
params = Hash.new
|
694
1271
|
params['entity_id'] = entity_id
|
@@ -697,6 +1274,14 @@ class CentralIndex
|
|
697
1274
|
end
|
698
1275
|
|
699
1276
|
|
1277
|
+
#
|
1278
|
+
# With a known entity id, an email address object can be added.
|
1279
|
+
#
|
1280
|
+
# @param entity_id
|
1281
|
+
# @param email_address
|
1282
|
+
# @param email_description
|
1283
|
+
# @return - the data from the api
|
1284
|
+
#
|
700
1285
|
def postEntityEmail( entity_id, email_address, email_description)
|
701
1286
|
params = Hash.new
|
702
1287
|
params['entity_id'] = entity_id
|
@@ -706,6 +1291,13 @@ class CentralIndex
|
|
706
1291
|
end
|
707
1292
|
|
708
1293
|
|
1294
|
+
#
|
1295
|
+
# Allows a email object to be reduced in confidence
|
1296
|
+
#
|
1297
|
+
# @param entity_id
|
1298
|
+
# @param gen_id
|
1299
|
+
# @return - the data from the api
|
1300
|
+
#
|
709
1301
|
def deleteEntityEmail( entity_id, gen_id)
|
710
1302
|
params = Hash.new
|
711
1303
|
params['entity_id'] = entity_id
|
@@ -714,6 +1306,15 @@ class CentralIndex
|
|
714
1306
|
end
|
715
1307
|
|
716
1308
|
|
1309
|
+
#
|
1310
|
+
# With a known entity id, a website object can be added.
|
1311
|
+
#
|
1312
|
+
# @param entity_id
|
1313
|
+
# @param website_url
|
1314
|
+
# @param display_url
|
1315
|
+
# @param website_description
|
1316
|
+
# @return - the data from the api
|
1317
|
+
#
|
717
1318
|
def postEntityWebsite( entity_id, website_url, display_url, website_description)
|
718
1319
|
params = Hash.new
|
719
1320
|
params['entity_id'] = entity_id
|
@@ -724,6 +1325,13 @@ class CentralIndex
|
|
724
1325
|
end
|
725
1326
|
|
726
1327
|
|
1328
|
+
#
|
1329
|
+
# Allows a website object to be reduced in confidence
|
1330
|
+
#
|
1331
|
+
# @param entity_id
|
1332
|
+
# @param gen_id
|
1333
|
+
# @return - the data from the api
|
1334
|
+
#
|
727
1335
|
def deleteEntityWebsite( entity_id, gen_id)
|
728
1336
|
params = Hash.new
|
729
1337
|
params['entity_id'] = entity_id
|
@@ -732,6 +1340,14 @@ class CentralIndex
|
|
732
1340
|
end
|
733
1341
|
|
734
1342
|
|
1343
|
+
#
|
1344
|
+
# With a known entity id, a image object can be added.
|
1345
|
+
#
|
1346
|
+
# @param entity_id
|
1347
|
+
# @param filedata
|
1348
|
+
# @param image_name
|
1349
|
+
# @return - the data from the api
|
1350
|
+
#
|
735
1351
|
def postEntityImage( entity_id, filedata, image_name)
|
736
1352
|
params = Hash.new
|
737
1353
|
params['entity_id'] = entity_id
|
@@ -741,6 +1357,13 @@ class CentralIndex
|
|
741
1357
|
end
|
742
1358
|
|
743
1359
|
|
1360
|
+
#
|
1361
|
+
# Allows a image object to be reduced in confidence
|
1362
|
+
#
|
1363
|
+
# @param entity_id
|
1364
|
+
# @param gen_id
|
1365
|
+
# @return - the data from the api
|
1366
|
+
#
|
744
1367
|
def deleteEntityImage( entity_id, gen_id)
|
745
1368
|
params = Hash.new
|
746
1369
|
params['entity_id'] = entity_id
|
@@ -749,6 +1372,12 @@ class CentralIndex
|
|
749
1372
|
end
|
750
1373
|
|
751
1374
|
|
1375
|
+
#
|
1376
|
+
# Read a location with the supplied ID in the locations reference database.
|
1377
|
+
#
|
1378
|
+
# @param location_id
|
1379
|
+
# @return - the data from the api
|
1380
|
+
#
|
752
1381
|
def getLocation( location_id)
|
753
1382
|
params = Hash.new
|
754
1383
|
params['location_id'] = location_id
|
@@ -756,6 +1385,23 @@ class CentralIndex
|
|
756
1385
|
end
|
757
1386
|
|
758
1387
|
|
1388
|
+
#
|
1389
|
+
# Create/update a new location entity with the supplied ID in the locations reference database.
|
1390
|
+
#
|
1391
|
+
# @param location_id
|
1392
|
+
# @param name
|
1393
|
+
# @param formal_name
|
1394
|
+
# @param latitude
|
1395
|
+
# @param longitude
|
1396
|
+
# @param resolution
|
1397
|
+
# @param country
|
1398
|
+
# @param population
|
1399
|
+
# @param description
|
1400
|
+
# @param timezone
|
1401
|
+
# @param is_duplicate
|
1402
|
+
# @param is_default
|
1403
|
+
# @return - the data from the api
|
1404
|
+
#
|
759
1405
|
def postLocation( location_id, name, formal_name, latitude, longitude, resolution, country, population, description, timezone, is_duplicate, is_default)
|
760
1406
|
params = Hash.new
|
761
1407
|
params['location_id'] = location_id
|
@@ -774,6 +1420,14 @@ class CentralIndex
|
|
774
1420
|
end
|
775
1421
|
|
776
1422
|
|
1423
|
+
#
|
1424
|
+
# Add a new synonym to a known location
|
1425
|
+
#
|
1426
|
+
# @param location_id
|
1427
|
+
# @param synonym
|
1428
|
+
# @param language
|
1429
|
+
# @return - the data from the api
|
1430
|
+
#
|
777
1431
|
def postLocationSynonym( location_id, synonym, language)
|
778
1432
|
params = Hash.new
|
779
1433
|
params['location_id'] = location_id
|
@@ -783,6 +1437,14 @@ class CentralIndex
|
|
783
1437
|
end
|
784
1438
|
|
785
1439
|
|
1440
|
+
#
|
1441
|
+
# Remove a new synonym from a known location
|
1442
|
+
#
|
1443
|
+
# @param location_id
|
1444
|
+
# @param synonym
|
1445
|
+
# @param language
|
1446
|
+
# @return - the data from the api
|
1447
|
+
#
|
786
1448
|
def deleteLocationSynonym( location_id, synonym, language)
|
787
1449
|
params = Hash.new
|
788
1450
|
params['location_id'] = location_id
|
@@ -792,6 +1454,15 @@ class CentralIndex
|
|
792
1454
|
end
|
793
1455
|
|
794
1456
|
|
1457
|
+
#
|
1458
|
+
# Add a new source to a known location
|
1459
|
+
#
|
1460
|
+
# @param location_id
|
1461
|
+
# @param type
|
1462
|
+
# @param url
|
1463
|
+
# @param ref
|
1464
|
+
# @return - the data from the api
|
1465
|
+
#
|
795
1466
|
def postLocationSource( location_id, type, url, ref)
|
796
1467
|
params = Hash.new
|
797
1468
|
params['location_id'] = location_id
|
@@ -802,6 +1473,13 @@ class CentralIndex
|
|
802
1473
|
end
|
803
1474
|
|
804
1475
|
|
1476
|
+
#
|
1477
|
+
# With a known entity id, a status object can be updated.
|
1478
|
+
#
|
1479
|
+
# @param entity_id
|
1480
|
+
# @param status
|
1481
|
+
# @return - the data from the api
|
1482
|
+
#
|
805
1483
|
def postEntityStatus( entity_id, status)
|
806
1484
|
params = Hash.new
|
807
1485
|
params['entity_id'] = entity_id
|
@@ -810,6 +1488,14 @@ class CentralIndex
|
|
810
1488
|
end
|
811
1489
|
|
812
1490
|
|
1491
|
+
#
|
1492
|
+
# With a known entity id, a logo object can be added.
|
1493
|
+
#
|
1494
|
+
# @param entity_id
|
1495
|
+
# @param filedata
|
1496
|
+
# @param logo_name
|
1497
|
+
# @return - the data from the api
|
1498
|
+
#
|
813
1499
|
def postEntityLogo( entity_id, filedata, logo_name)
|
814
1500
|
params = Hash.new
|
815
1501
|
params['entity_id'] = entity_id
|
@@ -819,6 +1505,13 @@ class CentralIndex
|
|
819
1505
|
end
|
820
1506
|
|
821
1507
|
|
1508
|
+
#
|
1509
|
+
# Allows a phone object to be reduced in confidence
|
1510
|
+
#
|
1511
|
+
# @param entity_id
|
1512
|
+
# @param gen_id
|
1513
|
+
# @return - the data from the api
|
1514
|
+
#
|
822
1515
|
def deleteEntityLogo( entity_id, gen_id)
|
823
1516
|
params = Hash.new
|
824
1517
|
params['entity_id'] = entity_id
|
@@ -827,6 +1520,16 @@ class CentralIndex
|
|
827
1520
|
end
|
828
1521
|
|
829
1522
|
|
1523
|
+
#
|
1524
|
+
# With a known entity id, avideo object can be added.
|
1525
|
+
#
|
1526
|
+
# @param entity_id
|
1527
|
+
# @param title
|
1528
|
+
# @param description
|
1529
|
+
# @param thumbnail
|
1530
|
+
# @param embed_code
|
1531
|
+
# @return - the data from the api
|
1532
|
+
#
|
830
1533
|
def postEntityVideo( entity_id, title, description, thumbnail, embed_code)
|
831
1534
|
params = Hash.new
|
832
1535
|
params['entity_id'] = entity_id
|
@@ -838,6 +1541,13 @@ class CentralIndex
|
|
838
1541
|
end
|
839
1542
|
|
840
1543
|
|
1544
|
+
#
|
1545
|
+
# Allows a video object to be reduced in confidence
|
1546
|
+
#
|
1547
|
+
# @param entity_id
|
1548
|
+
# @param gen_id
|
1549
|
+
# @return - the data from the api
|
1550
|
+
#
|
841
1551
|
def deleteEntityVideo( entity_id, gen_id)
|
842
1552
|
params = Hash.new
|
843
1553
|
params['entity_id'] = entity_id
|
@@ -846,6 +1556,16 @@ class CentralIndex
|
|
846
1556
|
end
|
847
1557
|
|
848
1558
|
|
1559
|
+
#
|
1560
|
+
# With a known entity id, an affiliate link object can be added.
|
1561
|
+
#
|
1562
|
+
# @param entity_id
|
1563
|
+
# @param affiliate_name
|
1564
|
+
# @param affiliate_link
|
1565
|
+
# @param affiliate_message
|
1566
|
+
# @param affiliate_logo
|
1567
|
+
# @return - the data from the api
|
1568
|
+
#
|
849
1569
|
def postEntityAffiliate_link( entity_id, affiliate_name, affiliate_link, affiliate_message, affiliate_logo)
|
850
1570
|
params = Hash.new
|
851
1571
|
params['entity_id'] = entity_id
|
@@ -857,6 +1577,13 @@ class CentralIndex
|
|
857
1577
|
end
|
858
1578
|
|
859
1579
|
|
1580
|
+
#
|
1581
|
+
# Allows an affiliate link object to be reduced in confidence
|
1582
|
+
#
|
1583
|
+
# @param entity_id
|
1584
|
+
# @param gen_id
|
1585
|
+
# @return - the data from the api
|
1586
|
+
#
|
860
1587
|
def deleteEntityAffiliate_link( entity_id, gen_id)
|
861
1588
|
params = Hash.new
|
862
1589
|
params['entity_id'] = entity_id
|
@@ -865,6 +1592,14 @@ class CentralIndex
|
|
865
1592
|
end
|
866
1593
|
|
867
1594
|
|
1595
|
+
#
|
1596
|
+
# With a known entity id, a description object can be added.
|
1597
|
+
#
|
1598
|
+
# @param entity_id
|
1599
|
+
# @param headline
|
1600
|
+
# @param body
|
1601
|
+
# @return - the data from the api
|
1602
|
+
#
|
868
1603
|
def postEntityDescription( entity_id, headline, body)
|
869
1604
|
params = Hash.new
|
870
1605
|
params['entity_id'] = entity_id
|
@@ -874,6 +1609,13 @@ class CentralIndex
|
|
874
1609
|
end
|
875
1610
|
|
876
1611
|
|
1612
|
+
#
|
1613
|
+
# Allows a description object to be reduced in confidence
|
1614
|
+
#
|
1615
|
+
# @param entity_id
|
1616
|
+
# @param gen_id
|
1617
|
+
# @return - the data from the api
|
1618
|
+
#
|
877
1619
|
def deleteEntityDescription( entity_id, gen_id)
|
878
1620
|
params = Hash.new
|
879
1621
|
params['entity_id'] = entity_id
|
@@ -882,6 +1624,14 @@ class CentralIndex
|
|
882
1624
|
end
|
883
1625
|
|
884
1626
|
|
1627
|
+
#
|
1628
|
+
# With a known entity id, a list description object can be added.
|
1629
|
+
#
|
1630
|
+
# @param entity_id
|
1631
|
+
# @param headline
|
1632
|
+
# @param body
|
1633
|
+
# @return - the data from the api
|
1634
|
+
#
|
885
1635
|
def postEntityList( entity_id, headline, body)
|
886
1636
|
params = Hash.new
|
887
1637
|
params['entity_id'] = entity_id
|
@@ -891,6 +1641,13 @@ class CentralIndex
|
|
891
1641
|
end
|
892
1642
|
|
893
1643
|
|
1644
|
+
#
|
1645
|
+
# Allows a list description object to be reduced in confidence
|
1646
|
+
#
|
1647
|
+
# @param gen_id
|
1648
|
+
# @param entity_id
|
1649
|
+
# @return - the data from the api
|
1650
|
+
#
|
894
1651
|
def deleteEntityList( gen_id, entity_id)
|
895
1652
|
params = Hash.new
|
896
1653
|
params['gen_id'] = gen_id
|
@@ -899,6 +1656,14 @@ class CentralIndex
|
|
899
1656
|
end
|
900
1657
|
|
901
1658
|
|
1659
|
+
#
|
1660
|
+
# With a known entity id, an document object can be added.
|
1661
|
+
#
|
1662
|
+
# @param entity_id
|
1663
|
+
# @param name
|
1664
|
+
# @param filedata
|
1665
|
+
# @return - the data from the api
|
1666
|
+
#
|
902
1667
|
def postEntityDocument( entity_id, name, filedata)
|
903
1668
|
params = Hash.new
|
904
1669
|
params['entity_id'] = entity_id
|
@@ -908,6 +1673,13 @@ class CentralIndex
|
|
908
1673
|
end
|
909
1674
|
|
910
1675
|
|
1676
|
+
#
|
1677
|
+
# Allows a phone object to be reduced in confidence
|
1678
|
+
#
|
1679
|
+
# @param entity_id
|
1680
|
+
# @param gen_id
|
1681
|
+
# @return - the data from the api
|
1682
|
+
#
|
911
1683
|
def deleteEntityDocument( entity_id, gen_id)
|
912
1684
|
params = Hash.new
|
913
1685
|
params['entity_id'] = entity_id
|
@@ -916,6 +1688,16 @@ class CentralIndex
|
|
916
1688
|
end
|
917
1689
|
|
918
1690
|
|
1691
|
+
#
|
1692
|
+
# With a known entity id, a testimonial object can be added.
|
1693
|
+
#
|
1694
|
+
# @param entity_id
|
1695
|
+
# @param title
|
1696
|
+
# @param text
|
1697
|
+
# @param date
|
1698
|
+
# @param testifier_name
|
1699
|
+
# @return - the data from the api
|
1700
|
+
#
|
919
1701
|
def postEntityTestimonial( entity_id, title, text, date, testifier_name)
|
920
1702
|
params = Hash.new
|
921
1703
|
params['entity_id'] = entity_id
|
@@ -927,6 +1709,13 @@ class CentralIndex
|
|
927
1709
|
end
|
928
1710
|
|
929
1711
|
|
1712
|
+
#
|
1713
|
+
# Allows a testimonial object to be reduced in confidence
|
1714
|
+
#
|
1715
|
+
# @param entity_id
|
1716
|
+
# @param gen_id
|
1717
|
+
# @return - the data from the api
|
1718
|
+
#
|
930
1719
|
def deleteEntityTestimonial( entity_id, gen_id)
|
931
1720
|
params = Hash.new
|
932
1721
|
params['entity_id'] = entity_id
|
@@ -935,6 +1724,21 @@ class CentralIndex
|
|
935
1724
|
end
|
936
1725
|
|
937
1726
|
|
1727
|
+
#
|
1728
|
+
# With a known entity id, a opening times object can be added. Each day can be either 'closed' to indicate that the entity is closed that day, '24hour' to indicate that the entity is open all day or single/split time ranges can be supplied in 4-digit 24-hour format, such as '09001730' or '09001200,13001700' to indicate hours of opening.
|
1729
|
+
#
|
1730
|
+
# @param entity_id - The id of the entity to edit
|
1731
|
+
# @param monday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1732
|
+
# @param tuesday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1733
|
+
# @param wednesday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1734
|
+
# @param thursday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1735
|
+
# @param friday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1736
|
+
# @param saturday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1737
|
+
# @param sunday - e.g. 'closed', '24hour' , '09001730' , '09001200,13001700'
|
1738
|
+
# @param closed - a comma-separated list of dates that the entity is closed e.g. '2013-04-29,2013-05-02'
|
1739
|
+
# @param closed_public_holidays - whether the entity is closed on public holidays
|
1740
|
+
# @return - the data from the api
|
1741
|
+
#
|
938
1742
|
def postEntityOpening_times( entity_id, monday, tuesday, wednesday, thursday, friday, saturday, sunday, closed, closed_public_holidays)
|
939
1743
|
params = Hash.new
|
940
1744
|
params['entity_id'] = entity_id
|
@@ -951,6 +1755,19 @@ class CentralIndex
|
|
951
1755
|
end
|
952
1756
|
|
953
1757
|
|
1758
|
+
#
|
1759
|
+
# With a known entity id, a website object can be added.
|
1760
|
+
#
|
1761
|
+
# @param entity_id
|
1762
|
+
# @param title
|
1763
|
+
# @param description
|
1764
|
+
# @param terms
|
1765
|
+
# @param start_date
|
1766
|
+
# @param expiry_date
|
1767
|
+
# @param url
|
1768
|
+
# @param image_url
|
1769
|
+
# @return - the data from the api
|
1770
|
+
#
|
954
1771
|
def postEntitySpecial_offer( entity_id, title, description, terms, start_date, expiry_date, url, image_url)
|
955
1772
|
params = Hash.new
|
956
1773
|
params['entity_id'] = entity_id
|
@@ -965,6 +1782,13 @@ class CentralIndex
|
|
965
1782
|
end
|
966
1783
|
|
967
1784
|
|
1785
|
+
#
|
1786
|
+
# Allows a special offer object to be reduced in confidence
|
1787
|
+
#
|
1788
|
+
# @param entity_id
|
1789
|
+
# @param gen_id
|
1790
|
+
# @return - the data from the api
|
1791
|
+
#
|
968
1792
|
def deleteEntitySpecial_offer( entity_id, gen_id)
|
969
1793
|
params = Hash.new
|
970
1794
|
params['entity_id'] = entity_id
|
@@ -973,6 +1797,20 @@ class CentralIndex
|
|
973
1797
|
end
|
974
1798
|
|
975
1799
|
|
1800
|
+
#
|
1801
|
+
# Update user based on email address or social_network/social_network_id
|
1802
|
+
#
|
1803
|
+
# @param email
|
1804
|
+
# @param first_name
|
1805
|
+
# @param last_name
|
1806
|
+
# @param active
|
1807
|
+
# @param trust
|
1808
|
+
# @param creation_date
|
1809
|
+
# @param user_type
|
1810
|
+
# @param social_network
|
1811
|
+
# @param social_network_id
|
1812
|
+
# @return - the data from the api
|
1813
|
+
#
|
976
1814
|
def postUser( email, first_name, last_name, active, trust, creation_date, user_type, social_network, social_network_id)
|
977
1815
|
params = Hash.new
|
978
1816
|
params['email'] = email
|
@@ -988,6 +1826,12 @@ class CentralIndex
|
|
988
1826
|
end
|
989
1827
|
|
990
1828
|
|
1829
|
+
#
|
1830
|
+
# With a unique email address an user can be retrieved
|
1831
|
+
#
|
1832
|
+
# @param email
|
1833
|
+
# @return - the data from the api
|
1834
|
+
#
|
991
1835
|
def getUserBy_email( email)
|
992
1836
|
params = Hash.new
|
993
1837
|
params['email'] = email
|
@@ -995,6 +1839,12 @@ class CentralIndex
|
|
995
1839
|
end
|
996
1840
|
|
997
1841
|
|
1842
|
+
#
|
1843
|
+
# With a unique ID address an user can be retrieved
|
1844
|
+
#
|
1845
|
+
# @param user_id
|
1846
|
+
# @return - the data from the api
|
1847
|
+
#
|
998
1848
|
def getUser( user_id)
|
999
1849
|
params = Hash.new
|
1000
1850
|
params['user_id'] = user_id
|
@@ -1002,6 +1852,13 @@ class CentralIndex
|
|
1002
1852
|
end
|
1003
1853
|
|
1004
1854
|
|
1855
|
+
#
|
1856
|
+
# With a unique ID address an user can be retrieved
|
1857
|
+
#
|
1858
|
+
# @param name
|
1859
|
+
# @param id
|
1860
|
+
# @return - the data from the api
|
1861
|
+
#
|
1005
1862
|
def getUserBy_social_media( name, id)
|
1006
1863
|
params = Hash.new
|
1007
1864
|
params['name'] = name
|
@@ -1010,6 +1867,13 @@ class CentralIndex
|
|
1010
1867
|
end
|
1011
1868
|
|
1012
1869
|
|
1870
|
+
#
|
1871
|
+
# The search matches a category name or synonym on a given string and language.
|
1872
|
+
#
|
1873
|
+
# @param str - A string to search against, E.g. Plumbers e.g. but
|
1874
|
+
# @param language - An ISO compatible language code, E.g. en e.g. en
|
1875
|
+
# @return - the data from the api
|
1876
|
+
#
|
1013
1877
|
def getAutocompleteCategory( str, language)
|
1014
1878
|
params = Hash.new
|
1015
1879
|
params['str'] = str
|
@@ -1018,6 +1882,13 @@ class CentralIndex
|
|
1018
1882
|
end
|
1019
1883
|
|
1020
1884
|
|
1885
|
+
#
|
1886
|
+
# The search matches a location name or synonym on a given string and language.
|
1887
|
+
#
|
1888
|
+
# @param str - A string to search against, E.g. Dub e.g. dub
|
1889
|
+
# @param country - Which country to return results for. An ISO compatible country code, E.g. ie e.g. ie
|
1890
|
+
# @return - the data from the api
|
1891
|
+
#
|
1021
1892
|
def getAutocompleteLocation( str, country)
|
1022
1893
|
params = Hash.new
|
1023
1894
|
params['str'] = str
|
@@ -1026,6 +1897,13 @@ class CentralIndex
|
|
1026
1897
|
end
|
1027
1898
|
|
1028
1899
|
|
1900
|
+
#
|
1901
|
+
# Create a queue item
|
1902
|
+
#
|
1903
|
+
# @param queue_name
|
1904
|
+
# @param data
|
1905
|
+
# @return - the data from the api
|
1906
|
+
#
|
1029
1907
|
def putQueue( queue_name, data)
|
1030
1908
|
params = Hash.new
|
1031
1909
|
params['queue_name'] = queue_name
|
@@ -1034,6 +1912,12 @@ class CentralIndex
|
|
1034
1912
|
end
|
1035
1913
|
|
1036
1914
|
|
1915
|
+
#
|
1916
|
+
# With a known queue id, a queue item can be removed.
|
1917
|
+
#
|
1918
|
+
# @param queue_id
|
1919
|
+
# @return - the data from the api
|
1920
|
+
#
|
1037
1921
|
def deleteQueue( queue_id)
|
1038
1922
|
params = Hash.new
|
1039
1923
|
params['queue_id'] = queue_id
|
@@ -1041,6 +1925,13 @@ class CentralIndex
|
|
1041
1925
|
end
|
1042
1926
|
|
1043
1927
|
|
1928
|
+
#
|
1929
|
+
# Retrieve queue items.
|
1930
|
+
#
|
1931
|
+
# @param limit
|
1932
|
+
# @param queue_name
|
1933
|
+
# @return - the data from the api
|
1934
|
+
#
|
1044
1935
|
def getQueue( limit, queue_name)
|
1045
1936
|
params = Hash.new
|
1046
1937
|
params['limit'] = limit
|
@@ -1049,6 +1940,13 @@ class CentralIndex
|
|
1049
1940
|
end
|
1050
1941
|
|
1051
1942
|
|
1943
|
+
#
|
1944
|
+
# Unlock queue items.
|
1945
|
+
#
|
1946
|
+
# @param queue_name
|
1947
|
+
# @param seconds
|
1948
|
+
# @return - the data from the api
|
1949
|
+
#
|
1052
1950
|
def postQueueUnlock( queue_name, seconds)
|
1053
1951
|
params = Hash.new
|
1054
1952
|
params['queue_name'] = queue_name
|
@@ -1057,6 +1955,13 @@ class CentralIndex
|
|
1057
1955
|
end
|
1058
1956
|
|
1059
1957
|
|
1958
|
+
#
|
1959
|
+
# Add an error to a queue item
|
1960
|
+
#
|
1961
|
+
# @param queue_id
|
1962
|
+
# @param error
|
1963
|
+
# @return - the data from the api
|
1964
|
+
#
|
1060
1965
|
def postQueueError( queue_id, error)
|
1061
1966
|
params = Hash.new
|
1062
1967
|
params['queue_id'] = queue_id
|
@@ -1065,6 +1970,13 @@ class CentralIndex
|
|
1065
1970
|
end
|
1066
1971
|
|
1067
1972
|
|
1973
|
+
#
|
1974
|
+
# Find a queue item by its type and id
|
1975
|
+
#
|
1976
|
+
# @param type
|
1977
|
+
# @param id
|
1978
|
+
# @return - the data from the api
|
1979
|
+
#
|
1068
1980
|
def getQueueSearch( type, id)
|
1069
1981
|
params = Hash.new
|
1070
1982
|
params['type'] = type
|
@@ -1073,6 +1985,17 @@ class CentralIndex
|
|
1073
1985
|
end
|
1074
1986
|
|
1075
1987
|
|
1988
|
+
#
|
1989
|
+
# Create a new transaction
|
1990
|
+
#
|
1991
|
+
# @param entity_id
|
1992
|
+
# @param user_id
|
1993
|
+
# @param basket_total
|
1994
|
+
# @param basket
|
1995
|
+
# @param currency
|
1996
|
+
# @param notes
|
1997
|
+
# @return - the data from the api
|
1998
|
+
#
|
1076
1999
|
def putTransaction( entity_id, user_id, basket_total, basket, currency, notes)
|
1077
2000
|
params = Hash.new
|
1078
2001
|
params['entity_id'] = entity_id
|
@@ -1085,6 +2008,13 @@ class CentralIndex
|
|
1085
2008
|
end
|
1086
2009
|
|
1087
2010
|
|
2011
|
+
#
|
2012
|
+
# Set a transactions status to inprogess
|
2013
|
+
#
|
2014
|
+
# @param transaction_id
|
2015
|
+
# @param paypal_setexpresscheckout
|
2016
|
+
# @return - the data from the api
|
2017
|
+
#
|
1088
2018
|
def postTransactionInprogress( transaction_id, paypal_setexpresscheckout)
|
1089
2019
|
params = Hash.new
|
1090
2020
|
params['transaction_id'] = transaction_id
|
@@ -1093,6 +2023,13 @@ class CentralIndex
|
|
1093
2023
|
end
|
1094
2024
|
|
1095
2025
|
|
2026
|
+
#
|
2027
|
+
# Set a transactions status to authorised
|
2028
|
+
#
|
2029
|
+
# @param transaction_id
|
2030
|
+
# @param paypal_getexpresscheckoutdetails
|
2031
|
+
# @return - the data from the api
|
2032
|
+
#
|
1096
2033
|
def postTransactionAuthorised( transaction_id, paypal_getexpresscheckoutdetails)
|
1097
2034
|
params = Hash.new
|
1098
2035
|
params['transaction_id'] = transaction_id
|
@@ -1101,6 +2038,15 @@ class CentralIndex
|
|
1101
2038
|
end
|
1102
2039
|
|
1103
2040
|
|
2041
|
+
#
|
2042
|
+
# Set a transactions status to complete
|
2043
|
+
#
|
2044
|
+
# @param transaction_id
|
2045
|
+
# @param paypal_doexpresscheckoutpayment
|
2046
|
+
# @param user_id
|
2047
|
+
# @param entity_id
|
2048
|
+
# @return - the data from the api
|
2049
|
+
#
|
1104
2050
|
def postTransactionComplete( transaction_id, paypal_doexpresscheckoutpayment, user_id, entity_id)
|
1105
2051
|
params = Hash.new
|
1106
2052
|
params['transaction_id'] = transaction_id
|
@@ -1111,6 +2057,12 @@ class CentralIndex
|
|
1111
2057
|
end
|
1112
2058
|
|
1113
2059
|
|
2060
|
+
#
|
2061
|
+
# Set a transactions status to cancelled
|
2062
|
+
#
|
2063
|
+
# @param transaction_id
|
2064
|
+
# @return - the data from the api
|
2065
|
+
#
|
1114
2066
|
def postTransactionCancelled( transaction_id)
|
1115
2067
|
params = Hash.new
|
1116
2068
|
params['transaction_id'] = transaction_id
|
@@ -1118,6 +2070,12 @@ class CentralIndex
|
|
1118
2070
|
end
|
1119
2071
|
|
1120
2072
|
|
2073
|
+
#
|
2074
|
+
# Given a transaction_id retrieve information on it
|
2075
|
+
#
|
2076
|
+
# @param transaction_id
|
2077
|
+
# @return - the data from the api
|
2078
|
+
#
|
1121
2079
|
def getTransaction( transaction_id)
|
1122
2080
|
params = Hash.new
|
1123
2081
|
params['transaction_id'] = transaction_id
|
@@ -1125,6 +2083,12 @@ class CentralIndex
|
|
1125
2083
|
end
|
1126
2084
|
|
1127
2085
|
|
2086
|
+
#
|
2087
|
+
# Given a transaction_id retrieve information on it
|
2088
|
+
#
|
2089
|
+
# @param paypal_transaction_id
|
2090
|
+
# @return - the data from the api
|
2091
|
+
#
|
1128
2092
|
def getTransactionBy_paypal_transaction_id( paypal_transaction_id)
|
1129
2093
|
params = Hash.new
|
1130
2094
|
params['paypal_transaction_id'] = paypal_transaction_id
|
@@ -1132,6 +2096,14 @@ class CentralIndex
|
|
1132
2096
|
end
|
1133
2097
|
|
1134
2098
|
|
2099
|
+
#
|
2100
|
+
# Allow an entity to be claimed by a valid user
|
2101
|
+
#
|
2102
|
+
# @param entity_id
|
2103
|
+
# @param claimed_user_id
|
2104
|
+
# @param claimed_date
|
2105
|
+
# @return - the data from the api
|
2106
|
+
#
|
1135
2107
|
def postEntityClaim( entity_id, claimed_user_id, claimed_date)
|
1136
2108
|
params = Hash.new
|
1137
2109
|
params['entity_id'] = entity_id
|