Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(currency): add RON and TRY currencies (#1455)

Kartikeya Hegde495a98f04547
diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs
index c0223d3c0c..380f4917d2 100644
--- a/crates/api_models/src/enums.rs
+++ b/crates/api_models/src/enums.rs
@@ -230,6 +230,7 @@ pub enum Currency {
PKR,
PLN,
QAR,
+ RON,
RUB,
SAR,
SCR,
@@ -241,6 +242,7 @@ pub enum Currency {
SVC,
SZL,
THB,
+ TRY,
TTD,
TWD,
TZS,
diff --git a/crates/storage_models/src/enums.rs b/crates/storage_models/src/enums.rs
index 6a5815ab6a..0b7ff4ba7a 100644
--- a/crates/storage_models/src/enums.rs
+++ b/crates/storage_models/src/enums.rs
@@ -243,6 +243,7 @@ pub enum Currency {
PKR,
PLN,
QAR,
+ RON,
RUB,
SAR,
SCR,
@@ -254,6 +255,7 @@ pub enum Currency {
SVC,
SZL,
THB,
+ TRY,
TTD,
TWD,
TZS,
diff --git a/migrations/2023-06-16-073615_add_ron_currency_to_db/down.sql b/migrations/2023-06-16-073615_add_ron_currency_to_db/down.sql
new file mode 100644
index 0000000000..e0ac49d1ec
--- /dev/null
+++ b/migrations/2023-06-16-073615_add_ron_currency_to_db/down.sql
@@ -0,0 +1 @@
+SELECT 1;
diff --git a/migrations/2023-06-16-073615_add_ron_currency_to_db/up.sql b/migrations/2023-06-16-073615_add_ron_currency_to_db/up.sql
new file mode 100644
index 0000000000..fdbadfade9
--- /dev/null
+++ b/migrations/2023-06-16-073615_add_ron_currency_to_db/up.sql
@@ -0,0 +1,3 @@
+-- Your SQL goes here
+ALTER TYPE "Currency" ADD VALUE IF NOT EXISTS 'RON' AFTER 'QAR';
+ALTER TYPE "Currency" ADD VALUE IF NOT EXISTS 'TRY' AFTER 'TTD';