Skip to content

Commit ecd3b70

Browse files
committed
WIP - transaction basics
1 parent f2eeabe commit ecd3b70

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ If bundler is not being used to manage dependencies, install the gem by executin
1414

1515
$ gem install blnk
1616

17-
## Usage
17+
## TODO
1818

19-
TODO:
2019
- [x] Create Ledger
2120
- [x] Find Ledger
2221
- [x] List Ledgers
@@ -27,6 +26,7 @@ TODO:
2726
- [ ] Create Transaction
2827
- [ ] Find Transaction
2928
- [ ] Search Transactions
29+
- [ ] Use Dry Schema to validate inputs
3030

3131
## Usage
3232

lib/blnk.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require_relative 'blnk/resourceable'
88
require_relative 'blnk/ledger'
99
require_relative 'blnk/balance'
10+
require_relative 'blnk/transaction'
1011

1112
module Blnk
1213
class Error < StandardError; end

lib/blnk/transaction.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
module Blnk
4+
# Transaction representation
5+
class Transaction < Resourceable
6+
def self.resource_name = :transactions
7+
8+
def persisted? = !transaction_id.nil?
9+
def body_data = {}
10+
end
11+
end

0 commit comments

Comments
 (0)