Skip to content

Commit

Permalink
fix: FYLE-85ztdangu-vcf-parser-minor-fix (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kulsekar4 authored Aug 3, 2023
1 parent e50b9e4 commit 9b44b82
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [0.15.0]

### Changed

- Bug fixed in `VCFParser` to parse all transaction blocks present in a VCF feed data.

## [0.14.0]

### Changed
Expand Down
5 changes: 0 additions & 5 deletions card_data_parsers/parsers/vcf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,27 +214,22 @@ def __extract_transactions_from_block_after_index(start_index, lines, account_nu
car_rental_transactions_block_start = index + 1
if line[0].strip() == '9' and (line[4].strip() == '02' or line[4].strip() == '2') and car_rental_transactions_block_end == -1:
car_rental_transactions_block_end = index - 1
end_index = index
if line[0].strip() == '8' and (line[4].strip() == '09' or line[4].strip() == '9') and lodging_transactions_block_start == -1:
lodging_transactions_block_start = index + 1
if line[0].strip() == '9' and (line[4].strip() == '09' or line[4].strip() == '9') and lodging_transactions_block_end == -1:
lodging_transactions_block_end = index - 1
end_index = index
if line[0].strip() == '8' and line[4].strip() == '14' and airline_booking_transactions_block_start == -1:
airline_booking_transactions_block_start = index + 1
if line[0].strip() == '9' and line[4].strip() == '14' and airline_booking_transactions_block_end == -1:
airline_booking_transactions_block_end = index - 1
end_index = index
if line[0].strip() == '8' and line[4].strip() == '17' and fleet_service_transactions_block_start == -1:
fleet_service_transactions_block_start = index + 1
if line[0].strip() == '9' and line[4].strip() == '17' and fleet_service_transactions_block_end == -1:
fleet_service_transactions_block_end = index - 1
end_index = index
if line[0].strip() == '8' and line[4].strip() == '18' and fleet_product_transactions_block_start == -1:
fleet_product_transactions_block_start = index + 1
if line[0].strip() == '9' and line[4].strip() == '18' and fleet_product_transactions_block_end == -1:
fleet_product_transactions_block_end = index - 1
end_index = index

card_transactions = lines[card_transactions_block_start: card_transactions_block_end + 1]
car_rental_transactions = lines[car_rental_transactions_block_start:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='card_data_parsers',
version='0.14.0',
version='0.15.0',
author='Siva Narayanan',
author_email='[email protected]',
url='https://www.fylehq.com',
Expand Down

0 comments on commit 9b44b82

Please sign in to comment.