dipps-client 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 030611f374109f4a252e81751aa420d1db645face15b56a9a410453630df70e4
4
- data.tar.gz: 25b49de4b84b41b10600c07c00396980cd619c0ce1e9cfc7a4b3204413ccbb48
3
+ metadata.gz: 6d6f57bbadb064a385918339afd3d132c3a037b8cf875b0fe005c1fc3f8298fb
4
+ data.tar.gz: d5dce5ea6e0b511be6aecf6c55d79d37fc644a1070faff4322abe259bbbbdc4c
5
5
  SHA512:
6
- metadata.gz: de90cf81eb26fc30df999bd8cd29956e8dce1fe850099b31d6d43694dd88a76cf0e9aceb70b750fefc51c90fc796013482173826eb8f820c531bc8e798303015
7
- data.tar.gz: 253044b488281b9422fc57057401599efe44dc81f7b5d5fbce4324b2b431594edb75ffa561a00a7502384e62c484b85f23f6a67508469e0c5edb5e23a02f029a
6
+ metadata.gz: 0e860c4dd776d0e20843e598a6ba46a1e5723860aff6e2884a5124aa674620201d8b9ed7b07e9bf3432052403a0ce40323924d39ccfff984459cddf7d1bd6f9e
7
+ data.tar.gz: 53bb6b11a07090126ee0045f455ae08c7a2ba2a819417ac77c0e15f811eac1ca6800f976b76aad68e33755c2ad13492bc42da15f3bfbf535af05bdbc93ddf02a
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  .rspec_status
12
12
 
13
13
  .envrc
14
+ *.gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dipps-client (0.2.0)
4
+ dipps-client (0.3.0)
5
5
  activesupport (>= 4.0)
6
6
  graphql-client (~> 0.17.0)
7
7
 
@@ -2,8 +2,11 @@ module Dipps
2
2
  module Client
3
3
  module Queries
4
4
  Clients = GraphqlClient.parse <<~GQL
5
- query {
6
- clients {
5
+ query($orgNumber: String, $email: String) {
6
+ clients(
7
+ orgNumber: $orgNumber,
8
+ email: $email
9
+ ) {
7
10
  id
8
11
  clientType
9
12
  clientNumber
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dipps
4
4
  module Client
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
data/lib/dipps/client.rb CHANGED
@@ -32,9 +32,13 @@ module Dipps
32
32
  ).data.to_h['createOwnInvoice']
33
33
  end
34
34
 
35
- def clients
35
+ def clients(org_number: nil, email: nil)
36
36
  GraphqlClient.query(
37
- Dipps::Client::Queries::Clients
37
+ Dipps::Client::Queries::Clients,
38
+ variables: {
39
+ orgNumber: org_number,
40
+ email: email
41
+ }
38
42
  ).data.to_h['clients']
39
43
  end
40
44
 
data/vendor/schema.json CHANGED
@@ -782,6 +782,18 @@
782
782
  "defaultValue": null,
783
783
  "isDeprecated": false,
784
784
  "deprecationReason": null
785
+ },
786
+ {
787
+ "name": "clientNumberSeries",
788
+ "description": null,
789
+ "type": {
790
+ "kind": "INPUT_OBJECT",
791
+ "name": "RangeAttributes",
792
+ "ofType": null
793
+ },
794
+ "defaultValue": null,
795
+ "isDeprecated": false,
796
+ "deprecationReason": null
785
797
  }
786
798
  ],
787
799
  "interfaces": null,
@@ -3483,7 +3495,30 @@
3483
3495
  "name": "clients",
3484
3496
  "description": null,
3485
3497
  "args": [
3486
-
3498
+ {
3499
+ "name": "orgNumber",
3500
+ "description": null,
3501
+ "type": {
3502
+ "kind": "SCALAR",
3503
+ "name": "String",
3504
+ "ofType": null
3505
+ },
3506
+ "defaultValue": null,
3507
+ "isDeprecated": false,
3508
+ "deprecationReason": null
3509
+ },
3510
+ {
3511
+ "name": "email",
3512
+ "description": null,
3513
+ "type": {
3514
+ "kind": "SCALAR",
3515
+ "name": "String",
3516
+ "ofType": null
3517
+ },
3518
+ "defaultValue": null,
3519
+ "isDeprecated": false,
3520
+ "deprecationReason": null
3521
+ }
3487
3522
  ],
3488
3523
  "type": {
3489
3524
  "kind": "NON_NULL",
@@ -3631,6 +3666,49 @@
3631
3666
  "enumValues": null,
3632
3667
  "possibleTypes": null
3633
3668
  },
3669
+ {
3670
+ "kind": "INPUT_OBJECT",
3671
+ "name": "RangeAttributes",
3672
+ "description": null,
3673
+ "fields": null,
3674
+ "inputFields": [
3675
+ {
3676
+ "name": "from",
3677
+ "description": null,
3678
+ "type": {
3679
+ "kind": "NON_NULL",
3680
+ "name": null,
3681
+ "ofType": {
3682
+ "kind": "SCALAR",
3683
+ "name": "Int",
3684
+ "ofType": null
3685
+ }
3686
+ },
3687
+ "defaultValue": null,
3688
+ "isDeprecated": false,
3689
+ "deprecationReason": null
3690
+ },
3691
+ {
3692
+ "name": "to",
3693
+ "description": null,
3694
+ "type": {
3695
+ "kind": "NON_NULL",
3696
+ "name": null,
3697
+ "ofType": {
3698
+ "kind": "SCALAR",
3699
+ "name": "Int",
3700
+ "ofType": null
3701
+ }
3702
+ },
3703
+ "defaultValue": null,
3704
+ "isDeprecated": false,
3705
+ "deprecationReason": null
3706
+ }
3707
+ ],
3708
+ "interfaces": null,
3709
+ "enumValues": null,
3710
+ "possibleTypes": null
3711
+ },
3634
3712
  {
3635
3713
  "kind": "OBJECT",
3636
3714
  "name": "ReferencePerson",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dipps-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kuznietsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-09 00:00:00.000000000 Z
11
+ date: 2021-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql-client