Module: Slips
- Included in:
- Volabit::API
- Defined in:
- lib/volabit/api/slips.rb
Overview
Methods to manage slips in the user wallet.
Instance Method Summary collapse
-
#delete_slip(id:) ⇒ Object
Deletes a specific slip.
-
#get_slip_data(id:) ⇒ Object
(also: #slip_data)
Gets the information of a specific slip.
-
#load_methods ⇒ Object
(also: #get_load_methods)
Lists the available options to load a slip.
-
#new_slip(currency:, amount:, type:) ⇒ Object
(also: #create_slip)
Creates a slip that can be used to load the user wallet.
-
#report_receipt(id:, amount:, affiliation:, authorization:) ⇒ Object
Informs of a receipt used to load a wallet’s slip.
Instance Method Details
#delete_slip(id:) ⇒ Object
Deletes a specific slip.
23 24 25 26 |
# File 'lib/volabit/api/slips.rb', line 23 def delete_slip(id:) empty_param_error('id') if id.to_s.eql? '' resource :delete, "api/v1/users/me/slips/#{id}" end |
#get_slip_data(id:) ⇒ Object Also known as: slip_data
Gets the information of a specific slip.
15 16 17 18 |
# File 'lib/volabit/api/slips.rb', line 15 def get_slip_data(id:) empty_param_error('id') if id.to_s.eql? '' resource :get, "api/v1/users/me/slips/#{id}" end |
#load_methods ⇒ Object Also known as: get_load_methods
Lists the available options to load a slip.
38 39 40 |
# File 'lib/volabit/api/slips.rb', line 38 def load_methods resource :get, 'api/v1/users/me/slips/methods' end |
#new_slip(currency:, amount:, type:) ⇒ Object Also known as: create_slip
Creates a slip that can be used to load the user wallet.
5 6 7 8 9 10 |
# File 'lib/volabit/api/slips.rb', line 5 def new_slip(currency:, amount:, type:) resource :post, 'api/v1/users/me/slips', currency: currency, amount: amount, type: type end |
#report_receipt(id:, amount:, affiliation:, authorization:) ⇒ Object
Informs of a receipt used to load a wallet’s slip.
29 30 31 32 33 34 35 |
# File 'lib/volabit/api/slips.rb', line 29 def report_receipt(id:, amount:, affiliation:, authorization:) empty_param_error('id') if id.to_s.eql? '' resource :post, "api/v1/users/me/slips/#{id}/report", amount: amount, affiliation_number: affiliation, authorization_number: end |