bloom_remit 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f52ece4d22394a3f7c8140d7ef698d3ea8cfb287
4
- data.tar.gz: 70fb3a8839992cb3ad8a9cbbe3b4a9c163706f47
3
+ metadata.gz: 4c49c1bdb5797d556ccf2fc881651846ae5950bf
4
+ data.tar.gz: ada79ee4075ec68a2a6f866cef76c99cc7a7c3d5
5
5
  SHA512:
6
- metadata.gz: 6a67124fa4de7b87824965aa279c52ed23e1750acbc48d121bda4eddbb030d59a5d5c0e3fd44f10e395f621da54cf4bbb4b901acf185cb75bd74af9b5c756478
7
- data.tar.gz: aa8a6826f36f5a8e26d67db7b9592ada6994e9f4c61672bbf2d9611415459d9a74e5541302e4c7d6a1de64178fb83c6db51b2128d511f66e449afe7d00761a06
6
+ metadata.gz: 805e0a344a8ee6a93d545f6df44e0a2b64429c2522ff6c96c25bfcb152e35abe6c9e72ebb69f9d7194fc0ad0a18abd3ce99831fe3d74e7e57c73e2bfacf170c7
7
+ data.tar.gz: a1638debef6f39352ac4a8a4dd6f3b996469b3575bc282472750b6d4e7500b5341db821f618cfc31707a132de3ea4364eb9a72479016dded226f5408d9173ea5
@@ -13,6 +13,7 @@ module BloomRemit
13
13
  property :owner_id
14
14
  property :owner_type
15
15
  property :external_id
16
+ property :recipient_id
16
17
 
17
18
  end
18
19
  end
@@ -9,6 +9,7 @@ module BloomRemit
9
9
  attribute :account_name, String
10
10
  attribute :account_id, String
11
11
  attribute :external_id, String
12
+ attribute :recipient_id, String
12
13
 
13
14
  include ActiveModel::Validations
14
15
  validates(
@@ -27,17 +28,21 @@ module BloomRemit
27
28
  end
28
29
 
29
30
  def call
30
- ::BloomRemit::Txns::Operations::Create.(txn: {
31
+ txn_params = attributes.slice(*%i[
32
+ amount
33
+ account_name
34
+ account_id
35
+ target_slug
36
+ external_id
37
+ recipient_id
38
+ ]).merge(
31
39
  sender_id: sender.id,
32
40
  sender_type: sender.class.base_class.name,
33
- amount: amount,
34
- account_name: account_name,
35
- account_id: account_id,
36
- target_slug: target_slug,
37
41
  owner_id: owner.id,
38
42
  owner_type: owner.class.base_class.name,
39
- external_id: external_id,
40
- })
43
+ )
44
+
45
+ ::BloomRemit::Txns::Operations::Create.(txn: txn_params)
41
46
  end
42
47
 
43
48
  end
@@ -0,0 +1,5 @@
1
+ class AddRecipientIdToBloomRemitTxns < ActiveRecord::Migration
2
+ def change
3
+ add_column :bloom_remit_txns, :recipient_id, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.11.0"
2
+ VERSION = "0.12.0"
3
3
  end
@@ -21,6 +21,7 @@ module BloomRemit
21
21
  owner_id: payment.id,
22
22
  owner_type: payment.class.base_class.name,
23
23
  external_id: external_id,
24
+ recipient_id: "recipient-id",
24
25
  })
25
26
  txn = op.model
26
27
  expect(txn.target_slug).to eq biller.slug
@@ -30,6 +31,7 @@ module BloomRemit
30
31
  expect(txn.account_id).to eq "Hooli X"
31
32
  expect(txn.owner).to eq payment
32
33
  expect(txn.external_id).to eq external_id
34
+ expect(txn.recipient_id).to eq "recipient-id"
33
35
  expect(PayoutJob).to have_enqueued_job(txn.id)
34
36
  end
35
37
 
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20160930034811) do
14
+ ActiveRecord::Schema.define(version: 20161005011429) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -43,6 +43,7 @@ ActiveRecord::Schema.define(version: 20160930034811) do
43
43
  t.string "external_id"
44
44
  t.text "status_description"
45
45
  t.string "vendor_external_id"
46
+ t.string "recipient_id"
46
47
  end
47
48
 
48
49
  add_index "bloom_remit_txns", ["external_id"], name: "index_bloom_remit_txns_on_external_id", using: :btree
@@ -34739,3 +34739,586 @@ Completed 204 No Content in 53ms (ActiveRecord: 1.1ms)
34739
34739
   (0.1ms) COMMIT
34740
34740
   (0.1ms) BEGIN
34741
34741
   (0.2ms) ROLLBACK
34742
+ ActiveRecord::SchemaMigration Load (1.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
34743
+  (1.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
34744
+  (2.7ms)  SELECT schemaname || '.' || tablename
34745
+ FROM pg_tables
34746
+ WHERE
34747
+ tablename !~ '_prt_' AND
34748
+ tablename <> 'schema_migrations' AND
34749
+ schemaname = ANY (current_schemas(false))
34750
+ 
34751
+  (2.9ms) select table_name from information_schema.views where table_schema = 'app_test'
34752
+  (411.8ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
34753
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
34754
+  (1.1ms) BEGIN
34755
+  (0.5ms) COMMIT
34756
+  (0.6ms) BEGIN
34757
+  (0.5ms) SAVEPOINT active_record_1
34758
+ SQL (2.3ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34759
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34760
+  (0.4ms) SAVEPOINT active_record_1
34761
+ SQL (1.0ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34762
+  (0.5ms) RELEASE SAVEPOINT active_record_1
34763
+  (0.5ms) SAVEPOINT active_record_1
34764
+ SQL (0.8ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34765
+  (0.5ms) RELEASE SAVEPOINT active_record_1
34766
+  (0.5ms) SAVEPOINT active_record_1
34767
+ SQL (1.3ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "dab35a86-5723-4ef1-b289-c21a36d12653"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "86f5a78f3b88ed64bb99c137"]]
34768
+  (0.8ms) RELEASE SAVEPOINT active_record_1
34769
+  (0.7ms) ROLLBACK
34770
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34771
+  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
34772
+  (2.3ms)  SELECT schemaname || '.' || tablename
34773
+ FROM pg_tables
34774
+ WHERE
34775
+ tablename !~ '_prt_' AND
34776
+ tablename <> 'schema_migrations' AND
34777
+ schemaname = ANY (current_schemas(false))
34778
+ 
34779
+  (1.8ms) select table_name from information_schema.views where table_schema = 'app_test'
34780
+  (410.4ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
34781
+  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
34782
+  (1.3ms) BEGIN
34783
+  (0.6ms) COMMIT
34784
+  (0.7ms) BEGIN
34785
+  (0.4ms) ROLLBACK
34786
+  (0.5ms) BEGIN
34787
+  (0.7ms) COMMIT
34788
+  (0.3ms) BEGIN
34789
+  (5.2ms) ROLLBACK
34790
+  (0.6ms) BEGIN
34791
+  (0.6ms) COMMIT
34792
+  (0.4ms) BEGIN
34793
+  (1.0ms) ROLLBACK
34794
+  (0.7ms) BEGIN
34795
+  (0.6ms) COMMIT
34796
+  (2.3ms) BEGIN
34797
+  (0.5ms) ROLLBACK
34798
+  (1.3ms) BEGIN
34799
+  (0.9ms) COMMIT
34800
+  (1.6ms) BEGIN
34801
+  (0.6ms) ROLLBACK
34802
+  (1.2ms) BEGIN
34803
+  (0.5ms) COMMIT
34804
+  (1.5ms) BEGIN
34805
+  (4.4ms) ROLLBACK
34806
+  (0.5ms) BEGIN
34807
+  (0.7ms) COMMIT
34808
+  (0.5ms) BEGIN
34809
+  (0.6ms) ROLLBACK
34810
+  (0.6ms) BEGIN
34811
+  (1.0ms) COMMIT
34812
+  (0.7ms) BEGIN
34813
+  (0.6ms) SAVEPOINT active_record_1
34814
+ SQL (0.9ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34815
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34816
+  (0.4ms) SAVEPOINT active_record_1
34817
+ SQL (0.7ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34818
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34819
+  (0.4ms) SAVEPOINT active_record_1
34820
+ SQL (0.7ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34821
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34822
+  (0.6ms) SAVEPOINT active_record_1
34823
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "f77de180-6221-4e71-9dcd-0777ecfa0fae"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "56006a44ca4d2d7197c41881"]]
34824
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34825
+  (0.8ms) ROLLBACK
34826
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34827
+  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
34828
+  (2.4ms)  SELECT schemaname || '.' || tablename
34829
+ FROM pg_tables
34830
+ WHERE
34831
+ tablename !~ '_prt_' AND
34832
+ tablename <> 'schema_migrations' AND
34833
+ schemaname = ANY (current_schemas(false))
34834
+ 
34835
+  (2.2ms) select table_name from information_schema.views where table_schema = 'app_test'
34836
+  (417.8ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
34837
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
34838
+  (0.9ms) BEGIN
34839
+  (0.6ms) COMMIT
34840
+  (0.6ms) BEGIN
34841
+  (0.6ms) ROLLBACK
34842
+  (1.1ms) BEGIN
34843
+  (0.9ms) COMMIT
34844
+  (0.8ms) BEGIN
34845
+  (0.8ms) ROLLBACK
34846
+  (1.0ms) BEGIN
34847
+  (1.1ms) COMMIT
34848
+  (0.8ms) BEGIN
34849
+  (0.7ms) ROLLBACK
34850
+  (0.8ms) BEGIN
34851
+  (1.0ms) COMMIT
34852
+  (1.7ms) BEGIN
34853
+  (0.9ms) ROLLBACK
34854
+  (0.8ms) BEGIN
34855
+  (0.7ms) COMMIT
34856
+  (1.4ms) BEGIN
34857
+  (5.7ms) ROLLBACK
34858
+  (1.7ms) BEGIN
34859
+  (1.6ms) COMMIT
34860
+  (1.1ms) BEGIN
34861
+  (0.5ms) ROLLBACK
34862
+  (0.9ms) BEGIN
34863
+  (0.8ms) COMMIT
34864
+  (1.2ms) BEGIN
34865
+  (0.5ms) ROLLBACK
34866
+  (0.6ms) BEGIN
34867
+  (0.7ms) COMMIT
34868
+  (0.5ms) BEGIN
34869
+  (0.5ms) SAVEPOINT active_record_1
34870
+ SQL (1.1ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34871
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34872
+  (0.4ms) SAVEPOINT active_record_1
34873
+ SQL (0.7ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34874
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34875
+  (0.4ms) SAVEPOINT active_record_1
34876
+ SQL (0.7ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34877
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34878
+  (0.4ms) SAVEPOINT active_record_1
34879
+ SQL (3.8ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "331a44d6-9592-448e-aec2-cd87ac49a61f"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "b3f9a785a2f9918bef7aee06"]]
34880
+  (0.9ms) RELEASE SAVEPOINT active_record_1
34881
+  (1.0ms) ROLLBACK
34882
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
34883
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
34884
+  (2.3ms)  SELECT schemaname || '.' || tablename
34885
+ FROM pg_tables
34886
+ WHERE
34887
+ tablename !~ '_prt_' AND
34888
+ tablename <> 'schema_migrations' AND
34889
+ schemaname = ANY (current_schemas(false))
34890
+ 
34891
+  (4.2ms) select table_name from information_schema.views where table_schema = 'app_test'
34892
+  (402.7ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
34893
+  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
34894
+  (1.0ms) BEGIN
34895
+  (0.6ms) COMMIT
34896
+  (0.4ms) BEGIN
34897
+  (0.5ms) SAVEPOINT active_record_1
34898
+ SQL (0.9ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34899
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34900
+  (0.4ms) SAVEPOINT active_record_1
34901
+ SQL (0.9ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34902
+  (1.6ms) RELEASE SAVEPOINT active_record_1
34903
+  (0.4ms) SAVEPOINT active_record_1
34904
+ SQL (5.3ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
34905
+  (0.9ms) RELEASE SAVEPOINT active_record_1
34906
+  (0.4ms) SAVEPOINT active_record_1
34907
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "9c30545e-14db-4a75-87fb-454c9b2533d1"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "cf9aa6dbcb0a13e312325123"]]
34908
+  (0.6ms) RELEASE SAVEPOINT active_record_1
34909
+  (0.6ms) ROLLBACK
34910
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
34911
+ Migrating to AddRecipientIdToBloomRemitTxns (20161005011429)
34912
+  (0.4ms) BEGIN
34913
+  (15.9ms) ALTER TABLE "bloom_remit_txns" ADD "recipient_id" character varying
34914
+ SQL (2.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161005011429"]]
34915
+  (10.0ms) COMMIT
34916
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
34917
+  (6.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34918
+ FROM pg_constraint c
34919
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34920
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34921
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34922
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34923
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34924
+ WHERE c.contype = 'f'
34925
+ AND t1.relname = 'billers'
34926
+ AND t3.nspname = ANY (current_schemas(false))
34927
+ ORDER BY c.conname
34928
+ 
34929
+  (3.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34930
+ FROM pg_constraint c
34931
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34932
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34933
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34934
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34935
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34936
+ WHERE c.contype = 'f'
34937
+ AND t1.relname = 'bloom_remit_responses'
34938
+ AND t3.nspname = ANY (current_schemas(false))
34939
+ ORDER BY c.conname
34940
+
34941
+  (3.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34942
+ FROM pg_constraint c
34943
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34944
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34945
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34946
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34947
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34948
+ WHERE c.contype = 'f'
34949
+ AND t1.relname = 'bloom_remit_txns'
34950
+ AND t3.nspname = ANY (current_schemas(false))
34951
+ ORDER BY c.conname
34952
+ 
34953
+  (3.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34954
+ FROM pg_constraint c
34955
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34956
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34957
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34958
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34959
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34960
+ WHERE c.contype = 'f'
34961
+ AND t1.relname = 'payments'
34962
+ AND t3.nspname = ANY (current_schemas(false))
34963
+ ORDER BY c.conname
34964
+
34965
+  (3.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
34966
+ FROM pg_constraint c
34967
+ JOIN pg_class t1 ON c.conrelid = t1.oid
34968
+ JOIN pg_class t2 ON c.confrelid = t2.oid
34969
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
34970
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
34971
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
34972
+ WHERE c.contype = 'f'
34973
+ AND t1.relname = 'users'
34974
+ AND t3.nspname = ANY (current_schemas(false))
34975
+ ORDER BY c.conname
34976
+ 
34977
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
34978
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
34979
+  (2.0ms)  SELECT schemaname || '.' || tablename
34980
+ FROM pg_tables
34981
+ WHERE
34982
+ tablename !~ '_prt_' AND
34983
+ tablename <> 'schema_migrations' AND
34984
+ schemaname = ANY (current_schemas(false))
34985
+ 
34986
+  (1.9ms) select table_name from information_schema.views where table_schema = 'app_test'
34987
+  (436.5ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
34988
+  (1.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
34989
+  (0.4ms) BEGIN
34990
+  (0.5ms) COMMIT
34991
+  (0.4ms) BEGIN
34992
+  (1.3ms) SAVEPOINT active_record_1
34993
+ SQL (1.0ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
34994
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34995
+  (0.4ms) SAVEPOINT active_record_1
34996
+ SQL (1.0ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
34997
+  (0.4ms) RELEASE SAVEPOINT active_record_1
34998
+  (0.5ms) SAVEPOINT active_record_1
34999
+ SQL (0.8ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35000
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35001
+  (0.5ms) SAVEPOINT active_record_1
35002
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "f80fdb42-858b-44d8-92e1-6a4238c05ac7"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "74202f3cc39be62f7f4e60b2"]]
35003
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35004
+  (1.0ms) ROLLBACK
35005
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
35006
+  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35007
+  (2.1ms)  SELECT schemaname || '.' || tablename
35008
+ FROM pg_tables
35009
+ WHERE
35010
+ tablename !~ '_prt_' AND
35011
+ tablename <> 'schema_migrations' AND
35012
+ schemaname = ANY (current_schemas(false))
35013
+ 
35014
+  (2.1ms) select table_name from information_schema.views where table_schema = 'app_test'
35015
+  (422.1ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35016
+  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35017
+  (1.0ms) BEGIN
35018
+  (0.6ms) COMMIT
35019
+  (0.6ms) BEGIN
35020
+  (0.8ms) SAVEPOINT active_record_1
35021
+ SQL (1.1ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35022
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35023
+  (0.5ms) SAVEPOINT active_record_1
35024
+ SQL (1.0ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35025
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35026
+  (0.8ms) SAVEPOINT active_record_1
35027
+ SQL (1.2ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35028
+  (0.6ms) RELEASE SAVEPOINT active_record_1
35029
+  (0.5ms) SAVEPOINT active_record_1
35030
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "5552eda0-7500-4c09-8203-90d39ef46f44"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "a435985d1d12f2201ff57431"]]
35031
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35032
+  (1.7ms) ROLLBACK
35033
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
35034
+  (0.9ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35035
+  (2.1ms)  SELECT schemaname || '.' || tablename
35036
+ FROM pg_tables
35037
+ WHERE
35038
+ tablename !~ '_prt_' AND
35039
+ tablename <> 'schema_migrations' AND
35040
+ schemaname = ANY (current_schemas(false))
35041
+ 
35042
+  (2.0ms) select table_name from information_schema.views where table_schema = 'app_test'
35043
+  (430.3ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35044
+  (0.6ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35045
+  (0.4ms) BEGIN
35046
+ SQL (1.5ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35047
+  (14.5ms) COMMIT
35048
+  (0.6ms) BEGIN
35049
+ SQL (1.4ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35050
+  (16.5ms) COMMIT
35051
+  (0.4ms) BEGIN
35052
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35053
+  (12.3ms) COMMIT
35054
+  (0.6ms) BEGIN
35055
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "c2991687-ba71-421a-859f-9d87591d0661"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "29bf9fd53ec6e4121042eac4"]]
35056
+  (10.0ms) COMMIT
35057
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
35058
+ Payment Load (0.5ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
35059
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35060
+  (424.9ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35061
+  (1.0ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35062
+ ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
35063
+  (1.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35064
+  (2.3ms)  SELECT schemaname || '.' || tablename
35065
+ FROM pg_tables
35066
+ WHERE
35067
+ tablename !~ '_prt_' AND
35068
+ tablename <> 'schema_migrations' AND
35069
+ schemaname = ANY (current_schemas(false))
35070
+ 
35071
+  (1.9ms) select table_name from information_schema.views where table_schema = 'app_test'
35072
+  (437.2ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35073
+  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35074
+  (0.5ms) BEGIN
35075
+ SQL (1.2ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35076
+  (17.1ms) COMMIT
35077
+  (0.6ms) BEGIN
35078
+ SQL (0.7ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35079
+  (12.5ms) COMMIT
35080
+  (0.4ms) BEGIN
35081
+ SQL (0.7ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35082
+  (14.0ms) COMMIT
35083
+  (0.5ms) BEGIN
35084
+ SQL (2.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id", "recipient_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["secret", "1fdd5613-9d7f-4302-8692-a9f85e7298e2"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "2a4a1b13e29db02050642531"], ["recipient_id", "recipient-id"]]
35085
+  (13.3ms) COMMIT
35086
+ User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
35087
+ Payment Load (0.5ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
35088
+  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35089
+  (416.8ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35090
+  (0.8ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35091
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
35092
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35093
+  (2.3ms)  SELECT schemaname || '.' || tablename
35094
+ FROM pg_tables
35095
+ WHERE
35096
+ tablename !~ '_prt_' AND
35097
+ tablename <> 'schema_migrations' AND
35098
+ schemaname = ANY (current_schemas(false))
35099
+ 
35100
+  (2.3ms) select table_name from information_schema.views where table_schema = 'app_test'
35101
+  (386.6ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35102
+  (0.9ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35103
+  (0.7ms) BEGIN
35104
+  (0.5ms) COMMIT
35105
+  (0.7ms) BEGIN
35106
+  (0.5ms) SAVEPOINT active_record_1
35107
+ SQL (0.8ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35108
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35109
+  (0.5ms) SAVEPOINT active_record_1
35110
+ SQL (0.7ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35111
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35112
+  (0.5ms) SAVEPOINT active_record_1
35113
+ SQL (0.7ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35114
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35115
+  (0.5ms) SAVEPOINT active_record_1
35116
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id", "recipient_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["secret", "54f0d850-7def-4ab4-8ee0-a11d1dc55469"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "3a28a717ee85b276374647a3"], ["recipient_id", "recipient-id"]]
35117
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35118
+  (0.9ms) ROLLBACK
35119
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
35120
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35121
+  (2.3ms)  SELECT schemaname || '.' || tablename
35122
+ FROM pg_tables
35123
+ WHERE
35124
+ tablename !~ '_prt_' AND
35125
+ tablename <> 'schema_migrations' AND
35126
+ schemaname = ANY (current_schemas(false))
35127
+ 
35128
+  (1.9ms) select table_name from information_schema.views where table_schema = 'app_test'
35129
+  (470.6ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35130
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35131
+  (0.5ms) BEGIN
35132
+  (0.6ms) COMMIT
35133
+  (0.6ms) BEGIN
35134
+  (0.7ms) ROLLBACK
35135
+  (0.6ms) BEGIN
35136
+  (0.8ms) COMMIT
35137
+  (0.6ms) BEGIN
35138
+  (0.6ms) ROLLBACK
35139
+  (2.1ms) BEGIN
35140
+ SQL (1.0ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35141
+  (15.5ms) COMMIT
35142
+  (0.4ms) BEGIN
35143
+ SQL (0.8ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35144
+  (14.9ms) COMMIT
35145
+  (0.4ms) BEGIN
35146
+ SQL (0.9ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35147
+  (12.8ms) COMMIT
35148
+  (0.6ms) BEGIN
35149
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id", "recipient_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["secret", "c9b75ab4-234c-4d9f-9743-c54a6ac93dda"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "46fcf1a919f5cf3fbae2c04d"], ["recipient_id", "recipient-id"]]
35150
+  (15.3ms) COMMIT
35151
+ User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
35152
+ Payment Load (0.6ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
35153
+  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35154
+  (482.0ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35155
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35156
+  (0.5ms) BEGIN
35157
+ SQL (1.0ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35158
+  (12.1ms) COMMIT
35159
+  (0.6ms) BEGIN
35160
+ SQL (1.2ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "79d1508c-880f-498f-ae7c-dc518753c6c6"], ["external_id", "80a7f62b77d6a95c98586d09"], ["sender_id", "1"], ["sender_type", "User"]]
35161
+  (17.1ms) COMMIT
35162
+ BloomRemit::Txn Load (1.8ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "79d1508c-880f-498f-ae7c-dc518753c6c6"]]
35163
+  (0.6ms) BEGIN
35164
+ SQL (0.8ms) UPDATE "bloom_remit_txns" SET "status" = $1, "status_description" = $2 WHERE "bloom_remit_txns"."id" = $3 [["status", 1], ["status_description", "My status description"], ["id", 1]]
35165
+  (13.2ms) COMMIT
35166
+  (0.7ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL
35167
+  (390.6ms) TRUNCATE TABLE "public"."bloom_remit_txns", "public"."billers", "public"."bloom_remit_responses", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35168
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL
35169
+  (0.8ms) BEGIN
35170
+  (0.6ms) COMMIT
35171
+  (0.6ms) BEGIN
35172
+  (0.4ms) ROLLBACK
35173
+  (0.7ms) BEGIN
35174
+  (0.7ms) COMMIT
35175
+  (0.5ms) BEGIN
35176
+  (0.5ms) ROLLBACK
35177
+  (0.8ms) BEGIN
35178
+  (0.7ms) COMMIT
35179
+  (0.4ms) BEGIN
35180
+  (0.5ms) ROLLBACK
35181
+  (0.6ms) BEGIN
35182
+  (0.6ms) COMMIT
35183
+  (0.5ms) BEGIN
35184
+  (0.6ms) ROLLBACK
35185
+  (0.6ms) BEGIN
35186
+  (0.8ms) COMMIT
35187
+  (0.4ms) BEGIN
35188
+  (1.4ms) ROLLBACK
35189
+  (0.7ms) BEGIN
35190
+  (0.8ms) COMMIT
35191
+  (0.3ms) BEGIN
35192
+  (0.5ms) ROLLBACK
35193
+  (0.6ms) BEGIN
35194
+  (0.9ms) COMMIT
35195
+  (0.5ms) BEGIN
35196
+  (0.5ms) ROLLBACK
35197
+  (0.5ms) BEGIN
35198
+  (0.6ms) COMMIT
35199
+  (0.4ms) BEGIN
35200
+  (0.4ms) SAVEPOINT active_record_1
35201
+ SQL (0.9ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35202
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35203
+  (0.6ms) SAVEPOINT active_record_1
35204
+ SQL (1.1ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "27d3964a-4858-4c6c-811e-7367025db871"], ["external_id", "312269638b3b3a8da5379a38"], ["sender_id", "1"], ["sender_type", "User"]]
35205
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35206
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-10-05 01:20:49 +0000
35207
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
35208
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
35209
+ BloomRemit::Txn Load (0.6ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", nil]]
35210
+ Rendered text template (0.1ms)
35211
+ Completed 404 Not Found in 99ms (Views: 96.7ms | ActiveRecord: 0.6ms)
35212
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-10-05 01:20:50 +0000
35213
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
35214
+ Parameters: {"secret"=>"27d3964a-4858-4c6c-811e-7367025db871", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"27d3964a-4858-4c6c-811e-7367025db871"}}
35215
+ BloomRemit::Txn Load (0.7ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "27d3964a-4858-4c6c-811e-7367025db871"]]
35216
+  (0.5ms) SAVEPOINT active_record_1
35217
+ SQL (0.6ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
35218
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35219
+ Completed 200 OK in 15ms (Views: 0.6ms | ActiveRecord: 2.3ms)
35220
+ BloomRemit::Txn Load (0.7ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
35221
+  (1.7ms) ROLLBACK
35222
+  (0.6ms) BEGIN
35223
+  (0.6ms) COMMIT
35224
+  (0.6ms) BEGIN
35225
+  (0.6ms) SAVEPOINT active_record_1
35226
+ SQL (0.9ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35227
+  (0.7ms) RELEASE SAVEPOINT active_record_1
35228
+  (0.5ms) SAVEPOINT active_record_1
35229
+ SQL (0.9ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "99a42614-d172-4c5e-bf0b-202f17902137"], ["external_id", "6504faaee4605133590d1c4f"], ["sender_id", "2"], ["sender_type", "User"]]
35230
+  (0.6ms) RELEASE SAVEPOINT active_record_1
35231
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-10-05 01:20:50 +0000
35232
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
35233
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
35234
+ BloomRemit::Txn Load (1.0ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", nil]]
35235
+ Rendered text template (0.0ms)
35236
+ Completed 404 Not Found in 6ms (Views: 2.6ms | ActiveRecord: 1.0ms)
35237
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-10-05 01:20:50 +0000
35238
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
35239
+ Parameters: {"secret"=>"99a42614-d172-4c5e-bf0b-202f17902137", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"99a42614-d172-4c5e-bf0b-202f17902137"}}
35240
+ BloomRemit::Txn Load (0.7ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", "99a42614-d172-4c5e-bf0b-202f17902137"]]
35241
+  (0.6ms) SAVEPOINT active_record_1
35242
+ SQL (0.8ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
35243
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35244
+ Completed 204 No Content in 76ms (ActiveRecord: 2.6ms)
35245
+ BloomRemit::Txn Load (0.6ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
35246
+  (0.8ms) ROLLBACK
35247
+  (1.2ms) BEGIN
35248
+  (0.7ms) COMMIT
35249
+  (0.4ms) BEGIN
35250
+  (0.4ms) SAVEPOINT active_record_1
35251
+ SQL (0.7ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35252
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35253
+  (0.4ms) SAVEPOINT active_record_1
35254
+ SQL (1.3ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35255
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35256
+  (1.3ms) SAVEPOINT active_record_1
35257
+ SQL (1.0ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35258
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35259
+  (0.5ms) SAVEPOINT active_record_1
35260
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id", "recipient_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["secret", "b3925c29-3a99-4d13-8058-bc012bbc8a5a"], ["sender_type", "User"], ["sender_id", "3"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "61c4c5d97f7117ce63aea33d"], ["recipient_id", "recipient-id"]]
35261
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35262
+  (1.0ms) ROLLBACK
35263
+  (0.6ms) BEGIN
35264
+  (0.5ms) COMMIT
35265
+  (0.8ms) BEGIN
35266
+  (0.7ms) ROLLBACK
35267
+  (0.8ms) BEGIN
35268
+  (0.6ms) COMMIT
35269
+  (0.6ms) BEGIN
35270
+  (0.6ms) SAVEPOINT active_record_1
35271
+ SQL (0.8ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
35272
+  (0.6ms) RELEASE SAVEPOINT active_record_1
35273
+  (0.5ms) SAVEPOINT active_record_1
35274
+ SQL (1.1ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35275
+  (1.3ms) RELEASE SAVEPOINT active_record_1
35276
+  (0.6ms) SAVEPOINT active_record_1
35277
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "ebe37c57-df07-4969-af06-e447a3d537af"], ["external_id", "efda82e5a2142a4602b834d4"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
35278
+  (0.6ms) RELEASE SAVEPOINT active_record_1
35279
+  (0.4ms) SAVEPOINT active_record_1
35280
+ SQL (0.7ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"i\":\"am body\"}"], ["txn_id", 4], ["created_at", "2016-10-05 01:20:50.595012"], ["updated_at", "2016-10-05 01:20:50.595012"]]
35281
+  (0.7ms) RELEASE SAVEPOINT active_record_1
35282
+  (4.5ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
35283
+ BloomRemit::Response Load (0.6ms) SELECT "bloom_remit_responses".* FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 ORDER BY "bloom_remit_responses"."id" ASC LIMIT 1 [["txn_id", 4]]
35284
+  (0.6ms) ROLLBACK
35285
+  (0.7ms) BEGIN
35286
+  (0.5ms) COMMIT
35287
+  (0.4ms) BEGIN
35288
+  (0.6ms) SAVEPOINT active_record_1
35289
+ SQL (0.9ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
35290
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35291
+  (0.5ms) SAVEPOINT active_record_1
35292
+ SQL (0.9ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35293
+  (0.6ms) RELEASE SAVEPOINT active_record_1
35294
+  (0.6ms) SAVEPOINT active_record_1
35295
+ SQL (0.8ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "e123303c-cb6b-4147-82fd-f5dbf18198db"], ["external_id", "9a2c29e007a0a9ec9612a9b7"], ["owner_id", "3"], ["owner_type", "Payment"], ["sender_id", "5"], ["sender_type", "User"]]
35296
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35297
+  (0.5ms) SAVEPOINT active_record_1
35298
+ SQL (0.9ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 7], ["id", 5]]
35299
+  (0.5ms) RELEASE SAVEPOINT active_record_1
35300
+  (0.6ms) SAVEPOINT active_record_1
35301
+ SQL (0.7ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"status\":\"500\",\"error\":\"Internal Server Error\"}"], ["txn_id", 5], ["created_at", "2016-10-05 01:20:50.664974"], ["updated_at", "2016-10-05 01:20:50.664974"]]
35302
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35303
+ BloomRemit::Txn Load (0.7ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 5]]
35304
+  (0.8ms) ROLLBACK
35305
+  (0.8ms) BEGIN
35306
+  (1.1ms) COMMIT
35307
+  (0.5ms) BEGIN
35308
+  (0.8ms) ROLLBACK
35309
+  (0.4ms) BEGIN
35310
+  (0.6ms) COMMIT
35311
+  (0.7ms) BEGIN
35312
+  (0.6ms) ROLLBACK
35313
+  (0.6ms) BEGIN
35314
+  (0.6ms) COMMIT
35315
+  (0.6ms) BEGIN
35316
+  (0.4ms) ROLLBACK
35317
+  (0.4ms) BEGIN
35318
+  (0.7ms) COMMIT
35319
+  (0.5ms) BEGIN
35320
+  (0.6ms) ROLLBACK
35321
+  (0.7ms) BEGIN
35322
+  (0.6ms) COMMIT
35323
+  (0.6ms) BEGIN
35324
+  (0.5ms) ROLLBACK
@@ -24,6 +24,7 @@ module BloomRemit
24
24
  account_name: "028109090",
25
25
  account_id: "Hooli X",
26
26
  owner: payment,
27
+ recipient_id: "recipient-id",
27
28
  external_id: external_id,
28
29
  ).model
29
30
 
@@ -34,6 +35,7 @@ module BloomRemit
34
35
  expect(txn.owner_type).to eq "Payment"
35
36
  expect(txn.owner_id).to eq payment.id.to_s
36
37
  expect(txn.external_id).to eq external_id
38
+ expect(txn.recipient_id).to eq "recipient-id"
37
39
  end
38
40
 
39
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -414,6 +414,7 @@ files:
414
414
  - db/migrate/20160809043433_add_status_description_to_bloom_remit_txns.rb
415
415
  - db/migrate/20160817003323_add_vendor_external_id_to_bloom_remit_txns.rb
416
416
  - db/migrate/20160930034811_allow_null_external_id_for_bloom_remit_txns.rb
417
+ - db/migrate/20161005011429_add_recipient_id_to_bloom_remit_txns.rb
417
418
  - lib/bloom_remit.rb
418
419
  - lib/bloom_remit/engine.rb
419
420
  - lib/bloom_remit/factories.rb