lib/sendgrid4r/rest/blocks.rb in sendgrid4r-1.11.0 vs lib/sendgrid4r/rest/blocks.rb in sendgrid4r-1.12.0

- old
+ new

@@ -33,11 +33,11 @@ params[:start_time] = start_time.to_i unless start_time.nil? params[:end_time] = end_time.to_i unless end_time.nil? params[:limit] = limit.to_i unless limit.nil? params[:offset] = offset.to_i unless offset.nil? resp = get(@auth, Blocks.url, params, &block) - Blocks.create_blocks(resp) + finish(resp, @raw_resp) { |r| Blocks.create_blocks(r) } end def delete_blocks(delete_all: nil, emails: nil, &block) if delete_all payload = { delete_all: delete_all } @@ -48,10 +48,10 @@ end def get_block(email:, &block) params = { email: email } resp = get(@auth, Blocks.url(email), params, &block) - Blocks.create_blocks(resp) + finish(resp, @raw_resp) { |r| Blocks.create_blocks(r) } end def delete_block(email:, &block) params = { email: email } delete(@auth, Blocks.url(email), params, &block)