bloom_remit 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c49c1bdb5797d556ccf2fc881651846ae5950bf
4
- data.tar.gz: ada79ee4075ec68a2a6f866cef76c99cc7a7c3d5
3
+ metadata.gz: d172da9d1f522ec820c15851f28e0c6009ea8cab
4
+ data.tar.gz: e2fab57e8438c27185cbae34b54f7cb968635dcf
5
5
  SHA512:
6
- metadata.gz: 805e0a344a8ee6a93d545f6df44e0a2b64429c2522ff6c96c25bfcb152e35abe6c9e72ebb69f9d7194fc0ad0a18abd3ce99831fe3d74e7e57c73e2bfacf170c7
7
- data.tar.gz: a1638debef6f39352ac4a8a4dd6f3b996469b3575bc282472750b6d4e7500b5341db821f618cfc31707a132de3ea4364eb9a72479016dded226f5408d9173ea5
6
+ metadata.gz: f6273cdaabbe79286cffbce3d97f1180bb5362cd144a18a9358e003bb2c2287d5f6239e6864ce9577e16fcb7af96c2ba8f1fe88ff78295b69c5fb0bc1d4f091a
7
+ data.tar.gz: 690aa92172c6ce0126c53110a77cc50166a52402bf843692a7d2624eb258221be8d221af6b7963436656b8b3195e468e0a9dbf2bb85b0ba4f198dbec100c599e
@@ -20,6 +20,7 @@ module BloomRemit
20
20
  target_slug: txn.target_slug,
21
21
  amount: txn.amount,
22
22
  client_external_id: txn.external_id,
23
+ recipient_id: txn.recipient_id,
23
24
  )
24
25
  end
25
26
 
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.1"
3
3
  end
@@ -35322,3 +35322,322 @@ Completed 204 No Content in 76ms (ActiveRecord: 2.6ms)
35322
35322
   (0.6ms) COMMIT
35323
35323
   (0.6ms) BEGIN
35324
35324
   (0.5ms) ROLLBACK
35325
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
35326
+  (136.5ms) DROP DATABASE IF EXISTS "app_test"
35327
+  (519.7ms) CREATE DATABASE "app_test" ENCODING = 'unicode'
35328
+ SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
35329
+  (81.4ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying)
35330
+  (78.5ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
35331
+  (62.5ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" USING btree ("txn_id")
35332
+  (86.5ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "sender_id" character varying NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL, "target_slug" character varying NOT NULL, "owner_id" character varying, "owner_type" character varying, "external_id" character varying, "status_description" text, "vendor_external_id" character varying, "recipient_id" character varying) 
35333
+  (78.4ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" USING btree ("external_id")
35334
+  (63.0ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" USING btree ("owner_id", "owner_type")
35335
+  (51.2ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" USING btree ("vendor_external_id")
35336
+  (86.1ms) CREATE TABLE "payments" ("id" serial primary key, "type" character varying) 
35337
+  (81.3ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying, "type" character varying)
35338
+  (49.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
35339
+  (43.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
35340
+  (0.9ms) SELECT version FROM "schema_migrations"
35341
+  (16.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161005011429')
35342
+  (14.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160729085500')
35343
+  (13.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805001840')
35344
+  (17.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805042105')
35345
+  (16.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806011259')
35346
+  (16.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806012210')
35347
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
35348
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
35349
+  (16.6ms) DROP TABLE "billers" CASCADE
35350
+  (59.6ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
35351
+  (13.2ms) DROP TABLE "bloom_remit_responses" CASCADE
35352
+  (58.1ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
35353
+  (33.6ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" USING btree ("txn_id")
35354
+  (17.4ms) DROP TABLE "bloom_remit_txns" CASCADE
35355
+  (73.5ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "sender_id" character varying NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL, "target_slug" character varying NOT NULL, "owner_id" character varying, "owner_type" character varying, "external_id" character varying, "status_description" text, "vendor_external_id" character varying, "recipient_id" character varying)
35356
+  (44.5ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" USING btree ("external_id")
35357
+  (46.9ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" USING btree ("owner_id", "owner_type")
35358
+  (42.5ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" USING btree ("vendor_external_id")
35359
+  (14.5ms) DROP TABLE "payments" CASCADE
35360
+  (79.2ms) CREATE TABLE "payments" ("id" serial primary key, "type" character varying) 
35361
+  (12.6ms) DROP TABLE "users" CASCADE
35362
+  (67.1ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying, "type" character varying) 
35363
+  (0.8ms) SELECT version FROM "schema_migrations"
35364
+  (12.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20160729070509')
35365
+  (11.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805004223')
35366
+  (14.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805004350')
35367
+  (13.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805040950')
35368
+  (13.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805095308')
35369
+  (17.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806054012')
35370
+  (16.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20160808081300')
35371
+  (13.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160809043433')
35372
+  (13.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20160817003323')
35373
+  (13.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160930034811')
35374
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
35375
+  (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
35376
+  (1.5ms)  SELECT schemaname || '.' || tablename
35377
+ FROM pg_tables
35378
+ WHERE
35379
+ tablename !~ '_prt_' AND
35380
+ tablename <> 'schema_migrations' AND
35381
+ schemaname = ANY (current_schemas(false))
35382
+ 
35383
+  (1.5ms) select table_name from information_schema.views where table_schema = 'app_test'
35384
+  (436.4ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35385
+  (0.4ms) 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
35386
+  (0.4ms) BEGIN
35387
+  (0.3ms) COMMIT
35388
+  (0.2ms) BEGIN
35389
+  (0.5ms) ROLLBACK
35390
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35391
+  (0.4ms) 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
35392
+  (1.4ms)  SELECT schemaname || '.' || tablename
35393
+ FROM pg_tables
35394
+ WHERE
35395
+ tablename !~ '_prt_' AND
35396
+ tablename <> 'schema_migrations' AND
35397
+ schemaname = ANY (current_schemas(false))
35398
+ 
35399
+  (1.1ms) select table_name from information_schema.views where table_schema = 'app_test'
35400
+  (462.9ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35401
+  (0.5ms) 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
35402
+  (0.2ms) BEGIN
35403
+  (0.2ms) COMMIT
35404
+  (0.2ms) BEGIN
35405
+  (0.2ms) ROLLBACK
35406
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35407
+  (0.3ms) 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
35408
+  (1.1ms)  SELECT schemaname || '.' || tablename
35409
+ FROM pg_tables
35410
+ WHERE
35411
+ tablename !~ '_prt_' AND
35412
+ tablename <> 'schema_migrations' AND
35413
+ schemaname = ANY (current_schemas(false))
35414
+ 
35415
+  (1.0ms) select table_name from information_schema.views where table_schema = 'app_test'
35416
+  (412.1ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35417
+  (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
35418
+  (0.2ms) BEGIN
35419
+  (0.4ms) COMMIT
35420
+  (0.3ms) BEGIN
35421
+  (0.3ms) ROLLBACK
35422
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
35423
+  (0.4ms) 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
35424
+  (1.5ms)  SELECT schemaname || '.' || tablename
35425
+ FROM pg_tables
35426
+ WHERE
35427
+ tablename !~ '_prt_' AND
35428
+ tablename <> 'schema_migrations' AND
35429
+ schemaname = ANY (current_schemas(false))
35430
+ 
35431
+  (1.3ms) select table_name from information_schema.views where table_schema = 'app_test'
35432
+  (447.2ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35433
+  (0.4ms) 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
35434
+  (0.2ms) BEGIN
35435
+  (0.2ms) COMMIT
35436
+  (0.2ms) BEGIN
35437
+  (0.3ms) ROLLBACK
35438
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35439
+  (0.4ms) 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
35440
+  (1.2ms)  SELECT schemaname || '.' || tablename
35441
+ FROM pg_tables
35442
+ WHERE
35443
+ tablename !~ '_prt_' AND
35444
+ tablename <> 'schema_migrations' AND
35445
+ schemaname = ANY (current_schemas(false))
35446
+ 
35447
+  (1.0ms) select table_name from information_schema.views where table_schema = 'app_test'
35448
+  (425.2ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35449
+  (1.0ms) 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
35450
+  (0.3ms) BEGIN
35451
+  (0.2ms) COMMIT
35452
+  (0.2ms) BEGIN
35453
+  (0.2ms) ROLLBACK
35454
+  (0.2ms) BEGIN
35455
+  (0.2ms) COMMIT
35456
+  (0.2ms) BEGIN
35457
+  (0.4ms) ROLLBACK
35458
+  (0.4ms) BEGIN
35459
+ SQL (0.4ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35460
+  (11.0ms) COMMIT
35461
+  (0.2ms) BEGIN
35462
+ SQL (0.4ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35463
+  (9.6ms) COMMIT
35464
+  (0.2ms) BEGIN
35465
+ SQL (0.4ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35466
+  (14.8ms) COMMIT
35467
+  (0.2ms) BEGIN
35468
+ SQL (0.6ms) 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", "a74fee53-1a8c-400e-8272-9b5f2c389a7a"], ["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", "d1c358c2f6364d6d8be84cbb"], ["recipient_id", "recipient-id"]]
35469
+  (12.5ms) COMMIT
35470
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
35471
+ Payment Load (0.3ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
35472
+  (0.2ms) 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
35473
+  (401.2ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35474
+  (0.3ms) 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
35475
+  (0.1ms) BEGIN
35476
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35477
+  (9.5ms) COMMIT
35478
+  (0.2ms) BEGIN
35479
+ SQL (0.7ms) 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", "35d8dbd0-e059-4c8d-aeb5-279db433e037"], ["external_id", "3ff8211f76453c013913338e"], ["sender_id", "1"], ["sender_type", "User"]]
35480
+  (11.0ms) COMMIT
35481
+ BloomRemit::Txn Load (0.4ms) 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", "35d8dbd0-e059-4c8d-aeb5-279db433e037"]]
35482
+  (0.2ms) BEGIN
35483
+ SQL (0.3ms) 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]]
35484
+  (10.5ms) COMMIT
35485
+  (0.2ms) 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
35486
+  (371.2ms) TRUNCATE TABLE "public"."billers", "public"."bloom_remit_responses", "public"."bloom_remit_txns", "public"."payments", "public"."users" RESTART IDENTITY CASCADE;
35487
+  (0.3ms) 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
35488
+  (0.1ms) BEGIN
35489
+  (0.2ms) COMMIT
35490
+  (0.2ms) BEGIN
35491
+  (0.2ms) ROLLBACK
35492
+  (0.1ms) BEGIN
35493
+  (0.2ms) COMMIT
35494
+  (0.1ms) BEGIN
35495
+  (0.3ms) ROLLBACK
35496
+  (0.2ms) BEGIN
35497
+  (0.2ms) COMMIT
35498
+  (0.2ms) BEGIN
35499
+  (0.3ms) ROLLBACK
35500
+  (0.2ms) BEGIN
35501
+  (0.2ms) COMMIT
35502
+  (0.2ms) BEGIN
35503
+  (0.2ms) ROLLBACK
35504
+  (0.2ms) BEGIN
35505
+  (0.2ms) COMMIT
35506
+  (0.2ms) BEGIN
35507
+  (0.2ms) ROLLBACK
35508
+  (0.2ms) BEGIN
35509
+  (0.3ms) COMMIT
35510
+  (0.2ms) BEGIN
35511
+  (0.4ms) ROLLBACK
35512
+  (0.2ms) BEGIN
35513
+  (0.2ms) COMMIT
35514
+  (0.1ms) BEGIN
35515
+  (0.3ms) ROLLBACK
35516
+  (0.2ms) BEGIN
35517
+  (0.4ms) COMMIT
35518
+  (0.3ms) BEGIN
35519
+  (0.2ms) SAVEPOINT active_record_1
35520
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35521
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35522
+  (0.2ms) SAVEPOINT active_record_1
35523
+ SQL (0.6ms) 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", "f4ccc2c9-5eff-409e-a865-0d0332f59d94"], ["external_id", "2943eb63c3ed81f7ea40dac5"], ["sender_id", "1"], ["sender_type", "User"]]
35524
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35525
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-10-05 07:01:02 +0000
35526
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
35527
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
35528
+ BloomRemit::Txn Load (0.4ms) 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]]
35529
+ Rendered text template (0.0ms)
35530
+ Completed 404 Not Found in 51ms (Views: 49.5ms | ActiveRecord: 0.4ms)
35531
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-10-05 07:01:02 +0000
35532
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
35533
+ Parameters: {"secret"=>"f4ccc2c9-5eff-409e-a865-0d0332f59d94", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"f4ccc2c9-5eff-409e-a865-0d0332f59d94"}}
35534
+ BloomRemit::Txn Load (0.4ms) 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", "f4ccc2c9-5eff-409e-a865-0d0332f59d94"]]
35535
+  (0.2ms) SAVEPOINT active_record_1
35536
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
35537
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35538
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.0ms)
35539
+ BloomRemit::Txn Load (0.3ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
35540
+  (0.2ms) ROLLBACK
35541
+  (0.1ms) BEGIN
35542
+  (0.2ms) COMMIT
35543
+  (0.2ms) BEGIN
35544
+  (0.2ms) SAVEPOINT active_record_1
35545
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35546
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35547
+  (0.2ms) SAVEPOINT active_record_1
35548
+ SQL (0.3ms) 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", "7f466448-4c9f-467b-a836-19a829c67f83"], ["external_id", "53d42ed623937f3f553b5f47"], ["sender_id", "2"], ["sender_type", "User"]]
35549
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35550
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-10-05 07:01:02 +0000
35551
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
35552
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
35553
+ BloomRemit::Txn Load (0.3ms) 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]]
35554
+ Rendered text template (0.0ms)
35555
+ Completed 404 Not Found in 2ms (Views: 0.8ms | ActiveRecord: 0.3ms)
35556
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-10-05 07:01:02 +0000
35557
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
35558
+ Parameters: {"secret"=>"7f466448-4c9f-467b-a836-19a829c67f83", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"7f466448-4c9f-467b-a836-19a829c67f83"}}
35559
+ BloomRemit::Txn Load (0.4ms) 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", "7f466448-4c9f-467b-a836-19a829c67f83"]]
35560
+  (0.2ms) SAVEPOINT active_record_1
35561
+ SQL (0.4ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
35562
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35563
+ Completed 204 No Content in 43ms (ActiveRecord: 1.2ms)
35564
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
35565
+  (0.2ms) ROLLBACK
35566
+  (0.2ms) BEGIN
35567
+  (0.2ms) COMMIT
35568
+  (0.2ms) BEGIN
35569
+  (0.2ms) SAVEPOINT active_record_1
35570
+ SQL (0.3ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
35571
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35572
+  (0.2ms) SAVEPOINT active_record_1
35573
+ SQL (0.5ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
35574
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35575
+  (0.2ms) SAVEPOINT active_record_1
35576
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
35577
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35578
+  (0.2ms) SAVEPOINT active_record_1
35579
+ SQL (0.4ms) 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", "ddf2a4d3-a3ec-4447-bfe7-6af882e56017"], ["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", "5572b7d8262d034e78836fc7"], ["recipient_id", "recipient-id"]]
35580
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35581
+  (0.3ms) ROLLBACK
35582
+  (0.1ms) BEGIN
35583
+  (0.2ms) COMMIT
35584
+  (0.2ms) BEGIN
35585
+  (0.2ms) ROLLBACK
35586
+  (0.1ms) BEGIN
35587
+  (0.2ms) COMMIT
35588
+  (0.2ms) BEGIN
35589
+  (0.2ms) SAVEPOINT active_record_1
35590
+ SQL (0.3ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
35591
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35592
+  (0.2ms) SAVEPOINT active_record_1
35593
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35594
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35595
+  (0.2ms) SAVEPOINT active_record_1
35596
+ 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", "abe685a1-af94-4f9d-be97-575927237b93"], ["external_id", "0c76b0d303984b6a4becaf39"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
35597
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35598
+  (0.2ms) SAVEPOINT active_record_1
35599
+ SQL (0.6ms) 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 07:01:02.730799"], ["updated_at", "2016-10-05 07:01:02.730799"]]
35600
+  (0.3ms) RELEASE SAVEPOINT active_record_1
35601
+  (0.4ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
35602
+ BloomRemit::Response Load (0.5ms) 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]]
35603
+  (0.3ms) ROLLBACK
35604
+  (0.2ms) BEGIN
35605
+  (0.3ms) COMMIT
35606
+  (0.3ms) BEGIN
35607
+  (0.3ms) SAVEPOINT active_record_1
35608
+ SQL (0.6ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
35609
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35610
+  (0.3ms) SAVEPOINT active_record_1
35611
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
35612
+  (0.2ms) RELEASE SAVEPOINT active_record_1
35613
+  (0.2ms) SAVEPOINT active_record_1
35614
+ SQL (0.6ms) 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", "dd23d350-e371-4985-8756-1111b85c779f"], ["external_id", "405c497a8cab7473f7f00b1d"], ["owner_id", "3"], ["owner_type", "Payment"], ["sender_id", "5"], ["sender_type", "User"]]
35615
+  (0.3ms) RELEASE SAVEPOINT active_record_1
35616
+  (0.2ms) SAVEPOINT active_record_1
35617
+ SQL (0.7ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 7], ["id", 5]]
35618
+  (0.4ms) RELEASE SAVEPOINT active_record_1
35619
+  (0.4ms) SAVEPOINT active_record_1
35620
+ SQL (0.5ms) 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 07:01:02.776864"], ["updated_at", "2016-10-05 07:01:02.776864"]]
35621
+  (0.3ms) RELEASE SAVEPOINT active_record_1
35622
+ BloomRemit::Txn Load (0.5ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 5]]
35623
+  (0.4ms) ROLLBACK
35624
+  (0.3ms) BEGIN
35625
+  (0.2ms) COMMIT
35626
+  (0.4ms) BEGIN
35627
+  (0.3ms) ROLLBACK
35628
+  (0.2ms) BEGIN
35629
+  (0.3ms) COMMIT
35630
+  (0.2ms) BEGIN
35631
+  (0.2ms) ROLLBACK
35632
+  (0.2ms) BEGIN
35633
+  (0.2ms) COMMIT
35634
+  (0.2ms) BEGIN
35635
+  (0.2ms) ROLLBACK
35636
+  (0.3ms) BEGIN
35637
+  (0.3ms) COMMIT
35638
+  (0.3ms) BEGIN
35639
+  (0.2ms) ROLLBACK
35640
+  (0.2ms) BEGIN
35641
+  (0.2ms) COMMIT
35642
+  (0.2ms) BEGIN
35643
+  (0.2ms) ROLLBACK
@@ -8,6 +8,7 @@ module BloomRemit
8
8
  build_stubbed(:bloom_remit_dummy_user, bloom_remit_id: "sender-id")
9
9
  end
10
10
  let(:external_id) { SecureRandom.hex(12) }
11
+ let(:recipient_id) { SecureRandom.uuid }
11
12
  let(:txn) do
12
13
  build_stubbed(:bloom_remit_txn, {
13
14
  target_slug: "PLDT",
@@ -16,6 +17,7 @@ module BloomRemit
16
17
  account_name: "029925252",
17
18
  account_id: "12345678",
18
19
  external_id: external_id,
20
+ recipient_id: recipient_id,
19
21
  })
20
22
  end
21
23
  let(:callback_url) do
@@ -34,6 +36,7 @@ module BloomRemit
34
36
  target_slug: "PLDT",
35
37
  amount: BigDecimal.new(2000),
36
38
  client_external_id: external_id,
39
+ recipient_id: recipient_id,
37
40
  ).and_return(response)
38
41
 
39
42
  resulting_ctx = described_class.execute(txn: txn, client: client)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag