Class: MWS::Reports::Requests::ReportAcknowledgements

Inherits:
Peddler::Request show all
Defined in:
lib/mws/reports/requests/report_acknowledgements.rb

Instance Attribute Summary

Attributes inherited from Peddler::Request

#body, #client, #last_parsed_response

Instance Method Summary collapse

Methods inherited from Peddler::Request

#execute, #has_next_token?, #initialize, #next_token, #parameters

Constructor Details

This class inherits a constructor from Peddler::Request

Instance Method Details

#acknowledge(*ids) ⇒ Object



17
18
19
# File 'lib/mws/reports/requests/report_acknowledgements.rb', line 17

def acknowledge(*ids)
  update(true, *ids)
end

#unacknowledge(*ids) ⇒ Object



21
22
23
# File 'lib/mws/reports/requests/report_acknowledgements.rb', line 21

def unacknowledge(*ids)
  update(false, *ids)
end

#update(acknowledged, *ids) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/mws/reports/requests/report_acknowledgements.rb', line 8

def update(acknowledged, *ids)
  parameters(:update_report_acknowledgements)
    .update(report_id_list: ids, acknowledged: acknowledged)
    .format_structured_lists!
    .camelize_keys!

  execute
end