From 8bc6965d2ffe16425a1717db40804c09c0ea7b21 Mon Sep 17 00:00:00 2001 From: mufaza Date: Fri, 11 Jun 2021 11:42:18 +0200 Subject: [PATCH 1/2] Added paused date to transformation and bumped version --- setup.py | 4 ++-- tap_bold/__init__.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 0231f5f..5e6616e 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='tap-bold', - version='0.4.0', + version='0.5.1', license='agpl-3.0', description='Singer.io tap for extracting data from Bold Recurring Orders Subscriptions API', author='Ori Ben Aharon', @@ -23,7 +23,7 @@ }, keywords=['SINGER', 'TAP'], include_package_data=True, - download_url='https://github.com/oriskincare/tap-bold/archive/v0.3.0.tar.gz', + download_url='https://github.com/oriskincare/tap-bold/archive/v0.5.1.tar.gz', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', diff --git a/tap_bold/__init__.py b/tap_bold/__init__.py index 2e53ee1..fa5b57d 100644 --- a/tap_bold/__init__.py +++ b/tap_bold/__init__.py @@ -163,6 +163,9 @@ def transform(row): if row['last_ship_date'] is not None: row['last_ship_date'] = bold_strptime(row['last_ship_date'], BOLD_DATE_FORMAT).strftime(ISO_DATE_TIME_FORMAT) + if row['paused_date'] is not None: + row['paused_date'] = bold_strptime(row['paused_date'], BOLD_DATE_FORMAT).strftime(ISO_DATE_TIME_FORMAT) + if row['order_fixed_recurrences'] is not None: row['total_recurrences'] = row['order_fixed_recurrences']['total_recurrences'] row['recurrence_count'] = row['order_fixed_recurrences']['recurrence_count'] From 09a6ffcc3b20e21da3b3d5837e5a04f9d96fae07 Mon Sep 17 00:00:00 2001 From: Martin Andersen Date: Fri, 11 Jun 2021 16:08:01 +0200 Subject: [PATCH 2/2] Format is datetime not date --- tap_bold/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_bold/__init__.py b/tap_bold/__init__.py index fa5b57d..c98cc6a 100644 --- a/tap_bold/__init__.py +++ b/tap_bold/__init__.py @@ -164,7 +164,7 @@ def transform(row): row['last_ship_date'] = bold_strptime(row['last_ship_date'], BOLD_DATE_FORMAT).strftime(ISO_DATE_TIME_FORMAT) if row['paused_date'] is not None: - row['paused_date'] = bold_strptime(row['paused_date'], BOLD_DATE_FORMAT).strftime(ISO_DATE_TIME_FORMAT) + row['paused_date'] = bold_strptime(row['paused_date'], BOLD_DATE_TIME_FORMAT).strftime(ISO_DATE_TIME_FORMAT) if row['order_fixed_recurrences'] is not None: row['total_recurrences'] = row['order_fixed_recurrences']['total_recurrences']