Class: Rubyplat::Responses::PaymentStatusResponse
- Inherits:
-
Response
- Object
- Response
- Rubyplat::Responses::PaymentStatusResponse
show all
- Defined in:
- lib/rubyplat/responses/payment_status_response.rb
Constant Summary
collapse
- STATES =
{
1 => "payment_permission_sent",
3 => "processing",
7 => "completed"
}
Instance Method Summary
collapse
Methods inherited from Response
from_response_string, #initialize
#parse
Instance Method Details
#completed? ⇒ Boolean
22
23
24
|
# File 'lib/rubyplat/responses/payment_status_response.rb', line 22
def completed?
state == 'completed'
end
|
#payment_permission_sent? ⇒ Boolean
18
19
20
|
# File 'lib/rubyplat/responses/payment_status_response.rb', line 18
def payment_permission_sent?
state == 'payment_permission_sent'
end
|
#processing? ⇒ Boolean
14
15
16
|
# File 'lib/rubyplat/responses/payment_status_response.rb', line 14
def processing?
state == 'processing'
end
|
#state ⇒ Object
10
11
12
|
# File 'lib/rubyplat/responses/payment_status_response.rb', line 10
def state
STATES[result.to_i]
end
|
#success? ⇒ Boolean
26
27
28
|
# File 'lib/rubyplat/responses/payment_status_response.rb', line 26
def success?
result.to_i == 7 && error.to_i == 0
end
|