lib/billfixers/partner/client.rb in billfixers-partner-1.1.3 vs lib/billfixers/partner/client.rb in billfixers-partner-1.1.4

- old
+ new

@@ -119,13 +119,17 @@ response = @gql.query(RENEGOTIATE_BILL_MUTATION, { id: bill_id }) response.data.renegotiate_bill end - def cancel_bill(bill_id) - response = @gql.query(CANCEL_BILL_MUTATION, { id: bill_id }) + def stop_negotiating(bill_id) + response = @gql.query(STOP_NEGOTIATING_MUTATION, { id: bill_id }) - response.data.cancel_bill.success + result = response.data.stop_negotiating + + raise Error, result.errors.join(' ') unless result.success + + result.success end def accept_offer(offer_id) response = @gql.query(ACCEPT_OFFER_MUTATION, { id: offer_id })