billfixers-partner 1.1.3 → 1.1.4

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
  SHA256:
3
- metadata.gz: 0502075a20dd8ce469eaf99ac0c82af520bd30cdc191104966442c7c5441847a
4
- data.tar.gz: 0da7348c6e5797fb999d87aef93e990138076a6fe0572b1b4ed5b3a315d7fa34
3
+ metadata.gz: 7e455d6938fcdbad9ead03ea10b45ea55a2ab1bbe20dc9122b836460c251c6a4
4
+ data.tar.gz: fa3f60dd073845c7b9c706dd05301128e1da7bd824faee43b6485befbd42771b
5
5
  SHA512:
6
- metadata.gz: 0de40ffd16e308841a205b53e604a851635a74f1301817257fff94e7804f1e4c436a15871d4e6ca9f92b2dcba575b91c082e58ba6dd9791a87c456cc3ca72a31
7
- data.tar.gz: 10982080daa94e2b27f751c9b2a3812599a9d4e2f89b1ef8f6d500dc8e13da0f5c3d05fa974777bcecc6c6710cf2778cd61f43250e64523a87eded414c4daf0c
6
+ metadata.gz: 60b851af21aeb5467fddc4ece69267b7b213f656a069d3fac39caecb39c60004b44b5f12af1e8ba8168b88d9a5487d3f346843f8d72e8ff660cfd49a18faa826
7
+ data.tar.gz: ecf5f6c8bced4f53abf5dd47212447d0cda834a1f9f57d8de07e166c1d95fdc6597630a999cf7f6502d270824a4ae4a868cc5fb97dafd5de4f8f818593504da0
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .byebug_history
data/Gemfile CHANGED
@@ -9,4 +9,4 @@ gem 'activesupport'
9
9
  gem 'graphlient'
10
10
  gem 'minitest', '~> 5.0'
11
11
  gem 'rake', '~> 12.0'
12
- gem 'webmock'
12
+ gem 'webmock'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billfixers-partner (1.0.0)
4
+ billfixers-partner (1.1.3)
5
5
  activesupport
6
6
  graphlient
7
7
 
@@ -121,10 +121,14 @@ module Billfixers
121
121
  response.data.renegotiate_bill
122
122
  end
123
123
 
124
- def cancel_bill(bill_id)
125
- response = @gql.query(CANCEL_BILL_MUTATION, { id: bill_id })
124
+ def stop_negotiating(bill_id)
125
+ response = @gql.query(STOP_NEGOTIATING_MUTATION, { id: bill_id })
126
126
 
127
- response.data.cancel_bill.success
127
+ result = response.data.stop_negotiating
128
+
129
+ raise Error, result.errors.join(' ') unless result.success
130
+
131
+ result.success
128
132
  end
129
133
 
130
134
  def accept_offer(offer_id)
@@ -65,6 +65,7 @@ module Billfixers
65
65
  status
66
66
  content
67
67
  contentHtml
68
+ daysUntilExpiration
68
69
  createdAt
69
70
  updatedAt
70
71
  acceptedAt
@@ -219,10 +220,14 @@ module Billfixers
219
220
  }
220
221
  )
221
222
 
222
- CANCEL_BILL_MUTATION = %(
223
+ STOP_NEGOTIATING_MUTATION = %(
223
224
  mutation($id: ID!) {
224
- CancelBill(input: { id: $id }) {
225
+ StopNegotiating(input: { id: $id }) {
225
226
  success
227
+ errors
228
+ bill {
229
+ #{BILL_FRAGMENT}
230
+ }
226
231
  }
227
232
  }
228
233
  )
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Billfixers
4
4
  module Partner
5
- VERSION = '1.1.3'
5
+ VERSION = '1.1.4'
6
6
  end
7
7
  end
data/partner_schema.json CHANGED
@@ -124,6 +124,50 @@
124
124
  "name": "Bill",
125
125
  "description": null,
126
126
  "fields": [
127
+ {
128
+ "name": "allowsContract",
129
+ "description": "",
130
+ "args": [],
131
+ "type": {
132
+ "kind": "NON_NULL",
133
+ "name": null,
134
+ "ofType": {
135
+ "kind": "SCALAR",
136
+ "name": "Boolean",
137
+ "ofType": null
138
+ }
139
+ },
140
+ "isDeprecated": false,
141
+ "deprecationReason": null
142
+ },
143
+ {
144
+ "name": "autoRenegotiate",
145
+ "description": "",
146
+ "args": [],
147
+ "type": {
148
+ "kind": "NON_NULL",
149
+ "name": null,
150
+ "ofType": {
151
+ "kind": "SCALAR",
152
+ "name": "Boolean",
153
+ "ofType": null
154
+ }
155
+ },
156
+ "isDeprecated": false,
157
+ "deprecationReason": null
158
+ },
159
+ {
160
+ "name": "cancelledAt",
161
+ "description": "The date the bill negotiations were cancelled, if present",
162
+ "args": [],
163
+ "type": {
164
+ "kind": "SCALAR",
165
+ "name": "DateTime",
166
+ "ofType": null
167
+ },
168
+ "isDeprecated": false,
169
+ "deprecationReason": null
170
+ },
127
171
  {
128
172
  "name": "createdAt",
129
173
  "description": "The date the record was created",
@@ -587,80 +631,6 @@
587
631
  "enumValues": null,
588
632
  "possibleTypes": null
589
633
  },
590
- {
591
- "kind": "INPUT_OBJECT",
592
- "name": "CancelBillInput",
593
- "description": "Autogenerated input type of CancelBill",
594
- "fields": null,
595
- "inputFields": [
596
- {
597
- "name": "id",
598
- "description": null,
599
- "type": {
600
- "kind": "NON_NULL",
601
- "name": null,
602
- "ofType": {
603
- "kind": "SCALAR",
604
- "name": "String",
605
- "ofType": null
606
- }
607
- },
608
- "defaultValue": null
609
- },
610
- {
611
- "name": "clientMutationId",
612
- "description": "A unique identifier for the client performing the mutation.",
613
- "type": {
614
- "kind": "SCALAR",
615
- "name": "String",
616
- "ofType": null
617
- },
618
- "defaultValue": null
619
- }
620
- ],
621
- "interfaces": null,
622
- "enumValues": null,
623
- "possibleTypes": null
624
- },
625
- {
626
- "kind": "OBJECT",
627
- "name": "CancelBillPayload",
628
- "description": "Autogenerated return type of CancelBill",
629
- "fields": [
630
- {
631
- "name": "clientMutationId",
632
- "description": "A unique identifier for the client performing the mutation.",
633
- "args": [],
634
- "type": {
635
- "kind": "SCALAR",
636
- "name": "String",
637
- "ofType": null
638
- },
639
- "isDeprecated": false,
640
- "deprecationReason": null
641
- },
642
- {
643
- "name": "success",
644
- "description": null,
645
- "args": [],
646
- "type": {
647
- "kind": "NON_NULL",
648
- "name": null,
649
- "ofType": {
650
- "kind": "SCALAR",
651
- "name": "Boolean",
652
- "ofType": null
653
- }
654
- },
655
- "isDeprecated": false,
656
- "deprecationReason": null
657
- }
658
- ],
659
- "inputFields": null,
660
- "interfaces": [],
661
- "enumValues": null,
662
- "possibleTypes": null
663
- },
664
634
  {
665
635
  "kind": "INPUT_OBJECT",
666
636
  "name": "CreateBillInput",
@@ -2314,7 +2284,7 @@
2314
2284
  "args": [
2315
2285
  {
2316
2286
  "name": "input",
2317
- "description": null,
2287
+ "description": "Parameters for AcceptOffer",
2318
2288
  "type": {
2319
2289
  "kind": "NON_NULL",
2320
2290
  "name": null,
@@ -2336,18 +2306,18 @@
2336
2306
  "deprecationReason": null
2337
2307
  },
2338
2308
  {
2339
- "name": "CancelBill",
2309
+ "name": "CreateBill",
2340
2310
  "description": null,
2341
2311
  "args": [
2342
2312
  {
2343
2313
  "name": "input",
2344
- "description": null,
2314
+ "description": "Parameters for CreateBill",
2345
2315
  "type": {
2346
2316
  "kind": "NON_NULL",
2347
2317
  "name": null,
2348
2318
  "ofType": {
2349
2319
  "kind": "INPUT_OBJECT",
2350
- "name": "CancelBillInput",
2320
+ "name": "CreateBillInput",
2351
2321
  "ofType": null
2352
2322
  }
2353
2323
  },
@@ -2356,25 +2326,25 @@
2356
2326
  ],
2357
2327
  "type": {
2358
2328
  "kind": "OBJECT",
2359
- "name": "CancelBillPayload",
2329
+ "name": "CreateBillPayload",
2360
2330
  "ofType": null
2361
2331
  },
2362
2332
  "isDeprecated": false,
2363
2333
  "deprecationReason": null
2364
2334
  },
2365
2335
  {
2366
- "name": "CreateBill",
2336
+ "name": "CreateCustomer",
2367
2337
  "description": null,
2368
2338
  "args": [
2369
2339
  {
2370
2340
  "name": "input",
2371
- "description": null,
2341
+ "description": "Parameters for CreateCustomer",
2372
2342
  "type": {
2373
2343
  "kind": "NON_NULL",
2374
2344
  "name": null,
2375
2345
  "ofType": {
2376
2346
  "kind": "INPUT_OBJECT",
2377
- "name": "CreateBillInput",
2347
+ "name": "CreateCustomerInput",
2378
2348
  "ofType": null
2379
2349
  }
2380
2350
  },
@@ -2383,25 +2353,25 @@
2383
2353
  ],
2384
2354
  "type": {
2385
2355
  "kind": "OBJECT",
2386
- "name": "CreateBillPayload",
2356
+ "name": "CreateCustomerPayload",
2387
2357
  "ofType": null
2388
2358
  },
2389
2359
  "isDeprecated": false,
2390
2360
  "deprecationReason": null
2391
2361
  },
2392
2362
  {
2393
- "name": "CreateCustomer",
2394
- "description": null,
2363
+ "name": "RejectOffer",
2364
+ "description": "Reject an offer",
2395
2365
  "args": [
2396
2366
  {
2397
2367
  "name": "input",
2398
- "description": null,
2368
+ "description": "Parameters for RejectOffer",
2399
2369
  "type": {
2400
2370
  "kind": "NON_NULL",
2401
2371
  "name": null,
2402
2372
  "ofType": {
2403
2373
  "kind": "INPUT_OBJECT",
2404
- "name": "CreateCustomerInput",
2374
+ "name": "RejectOfferInput",
2405
2375
  "ofType": null
2406
2376
  }
2407
2377
  },
@@ -2410,25 +2380,25 @@
2410
2380
  ],
2411
2381
  "type": {
2412
2382
  "kind": "OBJECT",
2413
- "name": "CreateCustomerPayload",
2383
+ "name": "RejectOfferPayload",
2414
2384
  "ofType": null
2415
2385
  },
2416
2386
  "isDeprecated": false,
2417
2387
  "deprecationReason": null
2418
2388
  },
2419
2389
  {
2420
- "name": "RejectOffer",
2421
- "description": "Reject an offer",
2390
+ "name": "RenegotiateBill",
2391
+ "description": null,
2422
2392
  "args": [
2423
2393
  {
2424
2394
  "name": "input",
2425
- "description": null,
2395
+ "description": "Parameters for RenegotiateBill",
2426
2396
  "type": {
2427
2397
  "kind": "NON_NULL",
2428
2398
  "name": null,
2429
2399
  "ofType": {
2430
2400
  "kind": "INPUT_OBJECT",
2431
- "name": "RejectOfferInput",
2401
+ "name": "RenegotiateBillInput",
2432
2402
  "ofType": null
2433
2403
  }
2434
2404
  },
@@ -2437,25 +2407,25 @@
2437
2407
  ],
2438
2408
  "type": {
2439
2409
  "kind": "OBJECT",
2440
- "name": "RejectOfferPayload",
2410
+ "name": "RenegotiateBillPayload",
2441
2411
  "ofType": null
2442
2412
  },
2443
2413
  "isDeprecated": false,
2444
2414
  "deprecationReason": null
2445
2415
  },
2446
2416
  {
2447
- "name": "RenegotiateBill",
2417
+ "name": "RespondToInformationRequest",
2448
2418
  "description": null,
2449
2419
  "args": [
2450
2420
  {
2451
2421
  "name": "input",
2452
- "description": null,
2422
+ "description": "Parameters for RespondToInformationRequest",
2453
2423
  "type": {
2454
2424
  "kind": "NON_NULL",
2455
2425
  "name": null,
2456
2426
  "ofType": {
2457
2427
  "kind": "INPUT_OBJECT",
2458
- "name": "RenegotiateBillInput",
2428
+ "name": "RespondToInformationRequestInput",
2459
2429
  "ofType": null
2460
2430
  }
2461
2431
  },
@@ -2464,25 +2434,25 @@
2464
2434
  ],
2465
2435
  "type": {
2466
2436
  "kind": "OBJECT",
2467
- "name": "RenegotiateBillPayload",
2437
+ "name": "RespondToInformationRequestPayload",
2468
2438
  "ofType": null
2469
2439
  },
2470
2440
  "isDeprecated": false,
2471
2441
  "deprecationReason": null
2472
2442
  },
2473
2443
  {
2474
- "name": "RespondToInformationRequest",
2444
+ "name": "StopNegotiating",
2475
2445
  "description": null,
2476
2446
  "args": [
2477
2447
  {
2478
2448
  "name": "input",
2479
- "description": null,
2449
+ "description": "Parameters for StopNegotiating",
2480
2450
  "type": {
2481
2451
  "kind": "NON_NULL",
2482
2452
  "name": null,
2483
2453
  "ofType": {
2484
2454
  "kind": "INPUT_OBJECT",
2485
- "name": "RespondToInformationRequestInput",
2455
+ "name": "StopNegotiatingInput",
2486
2456
  "ofType": null
2487
2457
  }
2488
2458
  },
@@ -2491,7 +2461,7 @@
2491
2461
  ],
2492
2462
  "type": {
2493
2463
  "kind": "OBJECT",
2494
- "name": "RespondToInformationRequestPayload",
2464
+ "name": "StopNegotiatingPayload",
2495
2465
  "ofType": null
2496
2466
  },
2497
2467
  "isDeprecated": false,
@@ -2503,7 +2473,7 @@
2503
2473
  "args": [
2504
2474
  {
2505
2475
  "name": "input",
2506
- "description": null,
2476
+ "description": "Parameters for UpdateCustomer",
2507
2477
  "type": {
2508
2478
  "kind": "NON_NULL",
2509
2479
  "name": null,
@@ -2530,7 +2500,7 @@
2530
2500
  "args": [
2531
2501
  {
2532
2502
  "name": "input",
2533
- "description": null,
2503
+ "description": "Parameters for UpdateWebhookUrls",
2534
2504
  "type": {
2535
2505
  "kind": "NON_NULL",
2536
2506
  "name": null,
@@ -3005,6 +2975,22 @@
3005
2975
  "isDeprecated": false,
3006
2976
  "deprecationReason": null
3007
2977
  },
2978
+ {
2979
+ "name": "daysUntilExpiration",
2980
+ "description": null,
2981
+ "args": [],
2982
+ "type": {
2983
+ "kind": "NON_NULL",
2984
+ "name": null,
2985
+ "ofType": {
2986
+ "kind": "SCALAR",
2987
+ "name": "Int",
2988
+ "ofType": null
2989
+ }
2990
+ },
2991
+ "isDeprecated": false,
2992
+ "deprecationReason": null
2993
+ },
3008
2994
  {
3009
2995
  "name": "id",
3010
2996
  "description": "Alpha-numeric unique identifier",
@@ -4664,6 +4650,116 @@
4664
4650
  "enumValues": null,
4665
4651
  "possibleTypes": null
4666
4652
  },
4653
+ {
4654
+ "kind": "INPUT_OBJECT",
4655
+ "name": "StopNegotiatingInput",
4656
+ "description": "Autogenerated input type of StopNegotiating",
4657
+ "fields": null,
4658
+ "inputFields": [
4659
+ {
4660
+ "name": "id",
4661
+ "description": null,
4662
+ "type": {
4663
+ "kind": "NON_NULL",
4664
+ "name": null,
4665
+ "ofType": {
4666
+ "kind": "SCALAR",
4667
+ "name": "ID",
4668
+ "ofType": null
4669
+ }
4670
+ },
4671
+ "defaultValue": null
4672
+ },
4673
+ {
4674
+ "name": "clientMutationId",
4675
+ "description": "A unique identifier for the client performing the mutation.",
4676
+ "type": {
4677
+ "kind": "SCALAR",
4678
+ "name": "String",
4679
+ "ofType": null
4680
+ },
4681
+ "defaultValue": null
4682
+ }
4683
+ ],
4684
+ "interfaces": null,
4685
+ "enumValues": null,
4686
+ "possibleTypes": null
4687
+ },
4688
+ {
4689
+ "kind": "OBJECT",
4690
+ "name": "StopNegotiatingPayload",
4691
+ "description": "Autogenerated return type of StopNegotiating",
4692
+ "fields": [
4693
+ {
4694
+ "name": "bill",
4695
+ "description": null,
4696
+ "args": [],
4697
+ "type": {
4698
+ "kind": "OBJECT",
4699
+ "name": "Bill",
4700
+ "ofType": null
4701
+ },
4702
+ "isDeprecated": false,
4703
+ "deprecationReason": null
4704
+ },
4705
+ {
4706
+ "name": "clientMutationId",
4707
+ "description": "A unique identifier for the client performing the mutation.",
4708
+ "args": [],
4709
+ "type": {
4710
+ "kind": "SCALAR",
4711
+ "name": "String",
4712
+ "ofType": null
4713
+ },
4714
+ "isDeprecated": false,
4715
+ "deprecationReason": null
4716
+ },
4717
+ {
4718
+ "name": "errors",
4719
+ "description": null,
4720
+ "args": [],
4721
+ "type": {
4722
+ "kind": "NON_NULL",
4723
+ "name": null,
4724
+ "ofType": {
4725
+ "kind": "LIST",
4726
+ "name": null,
4727
+ "ofType": {
4728
+ "kind": "NON_NULL",
4729
+ "name": null,
4730
+ "ofType": {
4731
+ "kind": "SCALAR",
4732
+ "name": "String",
4733
+ "ofType": null
4734
+ }
4735
+ }
4736
+ }
4737
+ },
4738
+ "isDeprecated": false,
4739
+ "deprecationReason": null
4740
+ },
4741
+ {
4742
+ "name": "success",
4743
+ "description": null,
4744
+ "args": [],
4745
+ "type": {
4746
+ "kind": "NON_NULL",
4747
+ "name": null,
4748
+ "ofType": {
4749
+ "kind": "SCALAR",
4750
+ "name": "Boolean",
4751
+ "ofType": null
4752
+ }
4753
+ },
4754
+ "isDeprecated": false,
4755
+ "deprecationReason": null
4756
+ }
4757
+ ],
4758
+ "inputFields": null,
4759
+ "interfaces": [],
4760
+ "enumValues": null,
4761
+ "possibleTypes": null
4762
+ },
4667
4763
  {
4668
4764
  "kind": "SCALAR",
4669
4765
  "name": "String",
@@ -4926,7 +5022,18 @@
4926
5022
  {
4927
5023
  "name": "args",
4928
5024
  "description": null,
4929
- "args": [],
5025
+ "args": [
5026
+ {
5027
+ "name": "includeDeprecated",
5028
+ "description": null,
5029
+ "type": {
5030
+ "kind": "SCALAR",
5031
+ "name": "Boolean",
5032
+ "ofType": null
5033
+ },
5034
+ "defaultValue": "false"
5035
+ }
5036
+ ],
4930
5037
  "type": {
4931
5038
  "kind": "NON_NULL",
4932
5039
  "name": null,
@@ -5247,7 +5354,18 @@
5247
5354
  {
5248
5355
  "name": "args",
5249
5356
  "description": null,
5250
- "args": [],
5357
+ "args": [
5358
+ {
5359
+ "name": "includeDeprecated",
5360
+ "description": null,
5361
+ "type": {
5362
+ "kind": "SCALAR",
5363
+ "name": "Boolean",
5364
+ "ofType": null
5365
+ },
5366
+ "defaultValue": "false"
5367
+ }
5368
+ ],
5251
5369
  "type": {
5252
5370
  "kind": "NON_NULL",
5253
5371
  "name": null,
@@ -5363,6 +5481,18 @@
5363
5481
  "isDeprecated": false,
5364
5482
  "deprecationReason": null
5365
5483
  },
5484
+ {
5485
+ "name": "deprecationReason",
5486
+ "description": null,
5487
+ "args": [],
5488
+ "type": {
5489
+ "kind": "SCALAR",
5490
+ "name": "String",
5491
+ "ofType": null
5492
+ },
5493
+ "isDeprecated": false,
5494
+ "deprecationReason": null
5495
+ },
5366
5496
  {
5367
5497
  "name": "description",
5368
5498
  "description": null,
@@ -5375,6 +5505,22 @@
5375
5505
  "isDeprecated": false,
5376
5506
  "deprecationReason": null
5377
5507
  },
5508
+ {
5509
+ "name": "isDeprecated",
5510
+ "description": null,
5511
+ "args": [],
5512
+ "type": {
5513
+ "kind": "NON_NULL",
5514
+ "name": null,
5515
+ "ofType": {
5516
+ "kind": "SCALAR",
5517
+ "name": "Boolean",
5518
+ "ofType": null
5519
+ }
5520
+ },
5521
+ "isDeprecated": false,
5522
+ "deprecationReason": null
5523
+ },
5378
5524
  {
5379
5525
  "name": "name",
5380
5526
  "description": null,
@@ -5594,7 +5740,18 @@
5594
5740
  {
5595
5741
  "name": "inputFields",
5596
5742
  "description": null,
5597
- "args": [],
5743
+ "args": [
5744
+ {
5745
+ "name": "includeDeprecated",
5746
+ "description": null,
5747
+ "type": {
5748
+ "kind": "SCALAR",
5749
+ "name": "Boolean",
5750
+ "ofType": null
5751
+ },
5752
+ "defaultValue": "false"
5753
+ }
5754
+ ],
5598
5755
  "type": {
5599
5756
  "kind": "LIST",
5600
5757
  "name": null,
@@ -5813,7 +5970,9 @@
5813
5970
  "description": "Marks an element of a GraphQL schema as no longer supported.",
5814
5971
  "locations": [
5815
5972
  "FIELD_DEFINITION",
5816
- "ENUM_VALUE"
5973
+ "ENUM_VALUE",
5974
+ "ARGUMENT_DEFINITION",
5975
+ "INPUT_FIELD_DEFINITION"
5817
5976
  ],
5818
5977
  "args": [
5819
5978
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billfixers-partner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - BillFixers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport