Class: FacebookCommerce::ReturnApi
Instance Attribute Summary
Attributes inherited from Api
#access_token, #cms_id, #logger
Instance Method Summary collapse
-
#create_return(order_id, items, return_status, return_message, merchant_return_id) ⇒ Hash
Return response, eg.
- #update_return(return_id, update_event, options = {}) ⇒ Object
Methods inherited from Api
Constructor Details
This class inherits a constructor from FacebookCommerce::Api
Instance Method Details
#create_return(order_id, items, return_status, return_message, merchant_return_id) ⇒ Hash
Return response, eg. { id: ‘1234567890’ }
167 168 169 170 171 172 173 174 175 |
# File 'lib/facebook_commerce.rb', line 167 def create_return(order_id, items, return_status, , merchant_return_id) data = { items: items.to_json, return_status: return_status, return_message: , merchant_return_id: merchant_return_id } post("#{order_id}/returns", data) end |
#update_return(return_id, update_event, options = {}) ⇒ Object
183 184 185 |
# File 'lib/facebook_commerce.rb', line 183 def update_return(return_id, update_event, = {}) post("#{return_id}/update_return", .merge(update_event: update_event)) end |