unit-ruby 0.2.3 → 0.2.4
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/unit-ruby/customer_token.rb +18 -0
- data/lib/unit-ruby/customer_token_verification.rb +14 -0
- data/lib/unit-ruby/util/api_resource.rb +3 -1
- data/lib/unit-ruby/util/resource_operations.rb +3 -2
- data/lib/unit-ruby/version.rb +1 -1
- data/lib/unit-ruby.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bb24533446bfd10538c49ee2a9c28c6428bcc93c316d64e5278308809ab963f
|
4
|
+
data.tar.gz: f995e561b1d6c63249dac9d9270ecae0ba01bf00c955a7ba9e07a89e7c082b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac97dd5692904c8c2fd902343ea29f7c0da8d9e12fb8d042d5671795f4d221d9f3600415412cd4f6562c294f6549615a5d158781a9addceeae2ad3e971f8dea
|
7
|
+
data.tar.gz: 7263a5879b85e666707d506f10f0b0e4ad7b0023fd3e2760163d687268b865f6713bc437e1bedba9153517687fe5a07294a370e9d6e310befc31692b815c4ef4
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Unit
|
2
|
+
class CustomerToken < APIResource
|
3
|
+
path '/customers'
|
4
|
+
|
5
|
+
attribute :scope, Types::String
|
6
|
+
attribute :verification_token, Types::String
|
7
|
+
attribute :verification_code, Types::String
|
8
|
+
attribute :expires_in, Types::Integer
|
9
|
+
|
10
|
+
attribute :token, Types::String, readonly: true
|
11
|
+
|
12
|
+
def self.resources_path(id)
|
13
|
+
"#{super(id)}/token"
|
14
|
+
end
|
15
|
+
|
16
|
+
include ResourceOperations::Create
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Unit
|
2
|
+
class CustomerTokenVerification < APIResource
|
3
|
+
path '/customers'
|
4
|
+
|
5
|
+
attribute :channel, Types::String
|
6
|
+
attribute :verification_token, Types::String, readonly: true
|
7
|
+
|
8
|
+
def self.resources_path(id)
|
9
|
+
"#{super(id)}/token/verification"
|
10
|
+
end
|
11
|
+
|
12
|
+
include ResourceOperations::Create
|
13
|
+
end
|
14
|
+
end
|
@@ -21,7 +21,8 @@ module Unit
|
|
21
21
|
|
22
22
|
module ClassMethods
|
23
23
|
def create(attributes)
|
24
|
-
|
24
|
+
id = attributes.fetch(:id, nil)
|
25
|
+
resource = new(attributes.without(:id))
|
25
26
|
|
26
27
|
data = {
|
27
28
|
type: resource.resource_type,
|
@@ -32,7 +33,7 @@ module Unit
|
|
32
33
|
resource.relationships
|
33
34
|
end
|
34
35
|
|
35
|
-
created_resource = connection.post(resources_path, { data: data })
|
36
|
+
created_resource = connection.post(resources_path(id), { data: data })
|
36
37
|
|
37
38
|
build_resource_from_json_api(created_resource)
|
38
39
|
end
|
data/lib/unit-ruby/version.rb
CHANGED
data/lib/unit-ruby.rb
CHANGED
@@ -23,6 +23,8 @@ require 'unit-ruby/types/string'
|
|
23
23
|
require 'unit-ruby/ach_payment'
|
24
24
|
require 'unit-ruby/application_form'
|
25
25
|
require 'unit-ruby/atm_location'
|
26
|
+
require 'unit-ruby/customer_token_verification'
|
27
|
+
require 'unit-ruby/customer_token'
|
26
28
|
require 'unit-ruby/deposit_account'
|
27
29
|
require 'unit-ruby/individual_application'
|
28
30
|
require 'unit-ruby/individual_customer'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unit-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chloe Isacke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-04-
|
12
|
+
date: 2022-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -163,6 +163,8 @@ files:
|
|
163
163
|
- lib/unit-ruby/ach_payment.rb
|
164
164
|
- lib/unit-ruby/application_form.rb
|
165
165
|
- lib/unit-ruby/atm_location.rb
|
166
|
+
- lib/unit-ruby/customer_token.rb
|
167
|
+
- lib/unit-ruby/customer_token_verification.rb
|
166
168
|
- lib/unit-ruby/deposit_account.rb
|
167
169
|
- lib/unit-ruby/individual_application.rb
|
168
170
|
- lib/unit-ruby/individual_customer.rb
|