Class: Inttegro::Resources::Refunds
- Inherits:
-
Object
- Object
- Inttegro::Resources::Refunds
- Defined in:
- lib/inttegro/resources/refunds.rb
Instance Method Summary collapse
- #cancel(refund_id:) ⇒ Object
- #create(payload) ⇒ Object
-
#initialize(http) ⇒ Refunds
constructor
A new instance of Refunds.
- #lookup(refund_id:) ⇒ Object
- #page(payload) ⇒ Object
Constructor Details
#initialize(http) ⇒ Refunds
Returns a new instance of Refunds.
7 8 9 |
# File 'lib/inttegro/resources/refunds.rb', line 7 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#cancel(refund_id:) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/inttegro/resources/refunds.rb', line 15 def cancel(refund_id:) @http.post_resource( "/refunds/cancel", Inttegro::Refund, :refund, { refund_id: refund_id } ) end |
#create(payload) ⇒ Object
11 12 13 |
# File 'lib/inttegro/resources/refunds.rb', line 11 def create(payload) @http.post_resource("/refunds/create", Inttegro::Refund, :refund, payload) end |
#lookup(refund_id:) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/inttegro/resources/refunds.rb', line 23 def lookup(refund_id:) @http.post_resource( "/refunds/lookup", Inttegro::Refund, :refund, { refund_id: refund_id } ) end |
#page(payload) ⇒ Object
31 32 33 |
# File 'lib/inttegro/resources/refunds.rb', line 31 def page(payload) @http.post_resource("/refunds/page", Inttegro::RefundPage, :page, payload) end |