Class: Datashake::ReviewScraper::V2::Profiles::AddBulk
- Inherits:
-
Object
- Object
- Datashake::ReviewScraper::V2::Profiles::AddBulk
- Defined in:
- lib/datashake-ruby-sdk/review_scraper/v2/profiles/add_bulk.rb
Constant Summary collapse
- PATH =
"api/v2/profiles/add_bulk"
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(version) ⇒ AddBulk
constructor
A new instance of AddBulk.
- #payload(ary) ⇒ Object
Constructor Details
#initialize(version) ⇒ AddBulk
Returns a new instance of AddBulk.
10 11 12 13 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add_bulk.rb', line 10 def initialize(version) @version = version @body = {} end |
Instance Method Details
#fetch ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add_bulk.rb', line 21 def fetch response = version.fetch(method: :post, path: PATH, body: body) response.map do |item| Datashake::ReviewScraper::V2::BulkResponse.new(item) end end |
#payload(ary) ⇒ Object
15 16 17 18 19 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add_bulk.rb', line 15 def payload(ary) @body = ary self end |