class Garbanzo::Response
Public Class Methods
wrap(response)
click to toggle source
# File lib/garbanzo/response.rb, line 7 def self.wrap(response) new(response).to_h end
Private Instance Methods
error()
click to toggle source
# File lib/garbanzo/response.rb, line 21 def error { id: nil, error_code: node(:code), errors: [node(:text)] } end
response()
click to toggle source
# File lib/garbanzo/response.rb, line 13 def response node(:resultCode) == 'Ok' ? success : error end
success()
click to toggle source
# File lib/garbanzo/response.rb, line 17 def success { id: node(:subscriptionId).to_i } end