lockstep_rails 0.3.30 → 0.3.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/models/lockstep/api_key.rb +14 -0
- data/app/models/lockstep/connection.rb +2 -2
- data/app/platform_api/schema/webhook.rb +11 -11
- data/lib/lockstep_rails/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 879ebb1093cb339cd5a7e002579d405df4332c4ba1d6f4c889c546a7c33f76d5
|
4
|
+
data.tar.gz: c59b6f8da0adb599c6edc413b9abd8fdbbfdb5571582776b38c37227c7c8c2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e31d5fb03f2c9e7c16728663b0b47af8d1bb33578205ea8c0574434e638ec6435f564521ea58ddb52508677c5bd88b52ad7b08aff789239f36496f85f3273f9a
|
7
|
+
data.tar.gz: 0cc2161c676a5010f102585cef9f52973846638c4615baa317c85369a194ba55e346e9347b5a2990dfdd5e359c38e0d353ff0b8935f226e3189d81454f176af0
|
data/README.md
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
class Lockstep::ApiKey < Lockstep::ApiRecord
|
2
|
+
self.model_name_uri = "v1/ApiKeys"
|
3
|
+
self.id_ref = "api_key_id"
|
4
|
+
load_schema(Schema::ApiKey)
|
5
|
+
|
6
|
+
default_scope { where('Revoked is null') }
|
7
|
+
|
8
|
+
# Create method to override conventional create in lockstep/api_record.rb of sending attrs as an enclosed array
|
9
|
+
def create
|
10
|
+
attrs = attributes_for_saving.transform_keys { |key| key.camelize(:lower) }
|
11
|
+
resp = resource.post('', body: attrs, params: nil)
|
12
|
+
result = post_result(resp)
|
13
|
+
end
|
14
|
+
end
|
@@ -3,7 +3,7 @@ class Lockstep::Connection < Lockstep::ApiRecord
|
|
3
3
|
self.id_ref = "company_id"
|
4
4
|
load_schema(Schema::Company)
|
5
5
|
|
6
|
-
enum company_type: %w(Customer Vendor)
|
6
|
+
enum company_type: %w(Customer Vendor Group)
|
7
7
|
|
8
8
|
has_many :contacts, class_name: "Lockstep::Contact", included: true
|
9
9
|
belongs_to :created_user, class_name: "Lockstep::User", foreign_key: :created_user_id, primary_key: :user_id
|
@@ -11,7 +11,7 @@ class Lockstep::Connection < Lockstep::ApiRecord
|
|
11
11
|
|
12
12
|
validates :company_name, presence: true
|
13
13
|
|
14
|
-
default_scope { where(company_type: %w(Customer Vendor)).or(where(company_type: nil)) }
|
14
|
+
default_scope { where(company_type: %w(Customer Vendor Group)).or(where(company_type: nil)) }
|
15
15
|
|
16
16
|
scope :customers, -> { where(company_type: "Customer") }
|
17
17
|
scope :vendors, -> { where(company_type: "Vendor") }
|
@@ -5,15 +5,15 @@ def self.id_ref
|
|
5
5
|
nil
|
6
6
|
end
|
7
7
|
|
8
|
-
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
8
|
+
# The unique ID of this record, automatically assigned by Lockstep when this record is
|
9
9
|
# added to the Lockstep platform.
|
10
10
|
# @type: string
|
11
11
|
# @format: uuid
|
12
12
|
field :webhook_id
|
13
13
|
|
14
|
-
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
15
|
-
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
16
|
-
#
|
14
|
+
# The GroupKey uniquely identifies a single Lockstep Platform account. All records for this
|
15
|
+
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
|
16
|
+
#
|
17
17
|
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
18
18
|
# @type: string
|
19
19
|
# @format: uuid
|
@@ -31,7 +31,7 @@ end
|
|
31
31
|
# @type: string
|
32
32
|
field :status_message
|
33
33
|
|
34
|
-
# An secret set during webhook creation that can be used to verify that the notification
|
34
|
+
# An secret set during webhook creation that can be used to verify that the notification
|
35
35
|
# is coming from the Lockstep API.
|
36
36
|
# @type: string
|
37
37
|
field :client_secret
|
@@ -44,17 +44,17 @@ end
|
|
44
44
|
# @type: string
|
45
45
|
field :callback_http_method
|
46
46
|
|
47
|
-
# The URL where the notification will be sent via the method set in CallbackHttpMethod.
|
48
|
-
#
|
49
|
-
# When creating a webhook, the Lockstep API will make a call to this url via the method
|
50
|
-
# set in the CallbackHttpMethod property with a query parameter of "code" set to an encoded
|
51
|
-
# string. To successfully create the webhook, the call must return a successful status code
|
47
|
+
# The URL where the notification will be sent via the method set in CallbackHttpMethod.
|
48
|
+
#
|
49
|
+
# When creating a webhook, the Lockstep API will make a call to this url via the method
|
50
|
+
# set in the CallbackHttpMethod property with a query parameter of "code" set to an encoded
|
51
|
+
# string. To successfully create the webhook, the call must return a successful status code
|
52
52
|
# with the query parameter's value as the plain text content.
|
53
53
|
# @type: string
|
54
54
|
# @format: uri
|
55
55
|
field :callback_url
|
56
56
|
|
57
|
-
# The expiration date for the given webhook subscription. Once the expiration date passes,
|
57
|
+
# The expiration date for the given webhook subscription. Once the expiration date passes,
|
58
58
|
# notifications will no longer be sent to the callback url.
|
59
59
|
# @type: string
|
60
60
|
# @format: date-time
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockstep_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vivek AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -46,6 +46,7 @@ files:
|
|
46
46
|
- app/concepts/lockstep/relation_array.rb
|
47
47
|
- app/helpers/types.rb
|
48
48
|
- app/models/lockstep/account.rb
|
49
|
+
- app/models/lockstep/api_key.rb
|
49
50
|
- app/models/lockstep/app_enrollment.rb
|
50
51
|
- app/models/lockstep/connection.rb
|
51
52
|
- app/models/lockstep/contact.rb
|