Class: TreezorConnect::ApiResource
Direct Known Subclasses
Beneficiary, Card, CardImage, Payin, Payout, Sca::ExternalOperation, Sca::Passcode, Sca::Wallet, SctInst::Payin, SctInst::Recall, TaxResidence, User
Class Method Summary
collapse
included
Class Method Details
.custom_action(http_method, *actions, ignores_id: false, first_letter_upcased: false) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/treezor_connect/api_resource.rb', line 14
def custom_action(http_method, *actions, ignores_id: false, first_letter_upcased: false)
actions.each do |action|
case http_method
when :post
define_method_with_params(http_method, action, first_letter_upcased)
when :put, :patch
define_put_path_methods(http_method, action, ignores_id, first_letter_upcased)
else
raise ArgumentError, "Unsupported HTTP method: #{http_method}"
end
end
end
|
.resource_url ⇒ Object
8
9
10
11
12
|
# File 'lib/treezor_connect/api_resource.rb', line 8
def resource_url
raise NotImplementedError,
'APIResource is an abstract class. You should perform actions ' \
'on its subclasses (Payin, Payout, Transfer ...)'
end
|