Sha256: 3fdfa6923680e806e2bbf7d0a738792dca2d14ff6cbf76667cb8288ac458e2dd

Contents?: true

Size: 346 Bytes

Versions: 12

Compression:

Stored size: 346 Bytes

Contents

class Smartsend::RequestError
  attr_accessor :links, :errors, :message, :code, :id

  def self.build(response)
    self.new.tap do |error|
      error.id = response['id']
      error.code = response['code']
      error.message = response['message']
      error.links = response['links']
      error.errors = response['errors']
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
smartsend-ruby-0.5.1 lib/smartsend/request_error.rb
smartsend-ruby-0.5.0 lib/smartsend/request_error.rb
smartsend-ruby-0.4.3 lib/smartsend/request_error.rb
smartsend-ruby-0.4.2 lib/smartsend/request_error.rb
smartsend-ruby-0.4.1 lib/smartsend/request_error.rb
smartsend-ruby-0.4.0 lib/smartsend/request_error.rb
smartsend-ruby-0.3.2 lib/smartsend/request_error.rb
smartsend-ruby-0.3.1 lib/smartsend/request_error.rb
smartsend-ruby-0.3 lib/smartsend/request_error.rb
smartsend-ruby-0.2.2 lib/smartsend/request_error.rb
smartsend-ruby-0.2.1 lib/smartsend/request_error.rb
smartsend-ruby-0.2.0 lib/smartsend/request_error.rb