lib/emarsys/api/services.rb in emarsys-api-0.3.0 vs lib/emarsys/api/services.rb in emarsys-api-0.4.0
- old
+ new
@@ -9,11 +9,10 @@
validate_response! response
response.body['contact_ids']
end
-
def email_queue(customer_id, params)
response = client.post "customers/#{customer_id}/email_queue/", JSON.generate(params)
validate_response! response
response.body
@@ -23,10 +22,9 @@
private
def module_path
'/api/services'
end
-
def parse_for_error(response)
errors = response.body['errors']
if response.body.is_a?(Hash) && errors.is_a?(Array) && errors.first.is_a?(Hash)
[errors.first['message'], response.status, errors.first['code']]