Class: Bs2Api::Payment::Detail
- Defined in:
- lib/bs2_api/payment/detail.rb
Instance Attribute Summary collapse
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(payment_id, client_id: Bs2Api.configuration.client_id, client_secret: Bs2Api.configuration.client_secret, proxy: nil) ⇒ Detail
constructor
A new instance of Detail.
Constructor Details
#initialize(payment_id, client_id: Bs2Api.configuration.client_id, client_secret: Bs2Api.configuration.client_secret, proxy: nil) ⇒ Detail
Returns a new instance of Detail.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bs2_api/payment/detail.rb', line 6 def initialize( payment_id, client_id: Bs2Api.configuration.client_id, client_secret: Bs2Api.configuration.client_secret, proxy: nil ) @payment_id = payment_id @client_id = client_id @client_secret = client_secret @proxy = proxy end |
Instance Attribute Details
#success ⇒ Object (readonly)
Returns the value of attribute success.
4 5 6 |
# File 'lib/bs2_api/payment/detail.rb', line 4 def success @success end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 |
# File 'lib/bs2_api/payment/detail.rb', line 18 def call response = detail_request raise Bs2Api::Errors::BadRequest, ::Util::Response.parse_error(response) unless response.ok? Bs2Api::Entities::Payment.from_response(response) end |