Class: PersonaApi::ListsResource
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#delete_request, #get_request, #handle_response, #initialize, #patch_request, #post_request, #put_request
Instance Method Details
#archive(lst_id:) ⇒ Object
11
12
13
|
# File 'lib/persona_api/resources/lists.rb', line 11
def archive(lst_id:)
delete_request("lists/#{lst_id}")
end
|
#create_browser_fingerprint_list(**attributes) ⇒ Object
15
16
17
|
# File 'lib/persona_api/resources/lists.rb', line 15
def create_browser_fingerprint_list(**attributes)
List.new post_request("lists/browser-fingerprints", body: attributes).body.dig("data")
end
|
#create_country_list(**attributes) ⇒ Object
19
20
21
|
# File 'lib/persona_api/resources/lists.rb', line 19
def create_country_list(**attributes)
List.new post_request("lists/countries", body: attributes).body.dig("data")
end
|
#create_email_address_list(**attributes) ⇒ Object
23
24
25
|
# File 'lib/persona_api/resources/lists.rb', line 23
def create_email_address_list(**attributes)
List.new post_request("lists/email-addresses", body: attributes).body.dig("data")
end
|
#create_face_list(**attributes) ⇒ Object
27
28
29
|
# File 'lib/persona_api/resources/lists.rb', line 27
def create_face_list(**attributes)
List.new post_request("lists/faces", body: attributes).body.dig("data")
end
|
#create_geolocation_list(**attributes) ⇒ Object
31
32
33
|
# File 'lib/persona_api/resources/lists.rb', line 31
def create_geolocation_list(**attributes)
List.new post_request("lists/geolocations", body: attributes).body.dig("data")
end
|
#create_government_id_number_list(**attributes) ⇒ Object
35
36
37
|
# File 'lib/persona_api/resources/lists.rb', line 35
def create_government_id_number_list(**attributes)
List.new post_request("lists/government-id-numbers", body: attributes).body.dig("data")
end
|
#create_ip_address_list(**attributes) ⇒ Object
39
40
41
|
# File 'lib/persona_api/resources/lists.rb', line 39
def create_ip_address_list(**attributes)
List.new post_request("lists/ip-addresses", body: attributes).body.dig("data")
end
|
#create_name_list(**attributes) ⇒ Object
43
44
45
|
# File 'lib/persona_api/resources/lists.rb', line 43
def create_name_list(**attributes)
List.new post_request("lists/names", body: attributes).body.dig("data")
end
|
#create_phone_number_list(**attributes) ⇒ Object
47
48
49
|
# File 'lib/persona_api/resources/lists.rb', line 47
def create_phone_number_list(**attributes)
List.new post_request("lists/phone-numbers", body: attributes).body.dig("data")
end
|
#list(**params) ⇒ Object
3
4
5
|
# File 'lib/persona_api/resources/lists.rb', line 3
def list(**params)
Collection.from_response get_request("lists", params: params), key: "data", type: List
end
|
#retrieve(lst_id:) ⇒ Object
7
8
9
|
# File 'lib/persona_api/resources/lists.rb', line 7
def retrieve(lst_id:)
List.new get_request("lists/#{lst_id}").body.dig("data")
end
|