Class: Coinbase::Wallet::APIResponse
- Inherits:
-
Object
- Object
- Coinbase::Wallet::APIResponse
show all
- Defined in:
- lib/coinbase/wallet/api_response.rb
Overview
Encapsulate data for an API response
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
10
11
12
13
|
# File 'lib/coinbase/wallet/api_response.rb', line 10
def initialize(resp)
@received_at = Time.now
@response = resp
end
|
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
6
7
8
|
# File 'lib/coinbase/wallet/api_response.rb', line 6
def client
@client
end
|
#method ⇒ Object
Returns the value of attribute method.
7
8
9
|
# File 'lib/coinbase/wallet/api_response.rb', line 7
def method
@method
end
|
#params ⇒ Object
Returns the value of attribute params.
8
9
10
|
# File 'lib/coinbase/wallet/api_response.rb', line 8
def params
@params
end
|
#received_at ⇒ Object
Returns the value of attribute received_at.
5
6
7
|
# File 'lib/coinbase/wallet/api_response.rb', line 5
def received_at
@received_at
end
|
Instance Method Details
#body ⇒ Object
Also known as:
data
19
20
21
|
# File 'lib/coinbase/wallet/api_response.rb', line 19
def body
raise NotImplementedError
end
|
#body=(body) ⇒ Object
24
25
26
|
# File 'lib/coinbase/wallet/api_response.rb', line 24
def body=(body)
raise NotImplementedError
end
|
#has_more? ⇒ Boolean
36
37
38
|
# File 'lib/coinbase/wallet/api_response.rb', line 36
def has_more?
body.has_key?('pagination') && body['pagination']['next_uri'] != nil
end
|
28
29
30
|
# File 'lib/coinbase/wallet/api_response.rb', line 28
def
raise NotImplementedError
end
|
#raw ⇒ Object
15
16
17
|
# File 'lib/coinbase/wallet/api_response.rb', line 15
def raw
@response
end
|
#status ⇒ Object
32
33
34
|
# File 'lib/coinbase/wallet/api_response.rb', line 32
def status
raise NotImplementedError
end
|