Module: Unit::Fee
- Defined in:
- lib/unit/models/fee/fee.rb,
lib/unit/models/fee/create_fee_request.rb,
lib/unit/models/fee/reverse_fee_request.rb
Defined Under Namespace
Classes: CreateFeeRequest, ReverseFeeRequest
Class Method Summary collapse
-
.create_fee(account_id:, amount:, description:, tags: nil, idempotency_key: nil) ⇒ Object
Request to create fee.
-
.reverse_fee(account_id:, transaction_id:, description:, tags: nil, idempotency_key: nil) ⇒ Object
Request to reverse a fee.
Class Method Details
.create_fee(account_id:, amount:, description:, tags: nil, idempotency_key: nil) ⇒ Object
Request to create fee
16 17 18 19 |
# File 'lib/unit/models/fee/fee.rb', line 16 def create_fee(account_id:, amount:, description:, tags: nil, idempotency_key: nil) request = CreateFeeRequest.new(account_id, amount, description, , idempotency_key) Unit::Resource::FeeResource.create_fee(request) end |
.reverse_fee(account_id:, transaction_id:, description:, tags: nil, idempotency_key: nil) ⇒ Object
Request to reverse a fee
28 29 30 31 |
# File 'lib/unit/models/fee/fee.rb', line 28 def reverse_fee(account_id:, transaction_id:, description:, tags: nil, idempotency_key: nil) request = ReverseFeeRequest.new(account_id, transaction_id, description, , idempotency_key) Unit::Resource::FeeResource.reverse_fee(request) end |