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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e294a63a303ae83089bb9bec875b7b64786c400715d11ab1fbfa779a6834272
4
- data.tar.gz: 75d43dfa0c5bf0719b463193765691543b2447df4e6cfa8d8fcf1241bee9f71f
3
+ metadata.gz: 879ebb1093cb339cd5a7e002579d405df4332c4ba1d6f4c889c546a7c33f76d5
4
+ data.tar.gz: c59b6f8da0adb599c6edc413b9abd8fdbbfdb5571582776b38c37227c7c8c2ef
5
5
  SHA512:
6
- metadata.gz: cc6785f80b3453a88000f2f759b06570a279a3f05521c8d448fb12e1c8588a22a7ea4123d3bea662cb196bf6363a9be26ff71d347b9e4120c75e6f600a413096
7
- data.tar.gz: 6fdc681126efb7416d4866b9a339f6f080e28625d51b97e7ea4e89d039f77bfa9ce0661ecfcdd62d5b83c896cdf58f0c16555f8c798a1ea6b8b1a8476550dd11
6
+ metadata.gz: e31d5fb03f2c9e7c16728663b0b47af8d1bb33578205ea8c0574434e638ec6435f564521ea58ddb52508677c5bd88b52ad7b08aff789239f36496f85f3273f9a
7
+ data.tar.gz: 0cc2161c676a5010f102585cef9f52973846638c4615baa317c85369a194ba55e346e9347b5a2990dfdd5e359c38e0d353ff0b8935f226e3189d81454f176af0
data/README.md CHANGED
@@ -59,6 +59,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
59
59
  * Lockstep::ReportPayableComingDue
60
60
  * Lockstep::ReportPayableSummary
61
61
  * Lockstep::ReportPayablesComingDueSummary
62
+ * Lockstep::ApiKey
62
63
 
63
64
  ## ActiveModel Interfaces
64
65
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module LockstepRails
2
- VERSION = "0.3.30"
2
+ VERSION = "0.3.33"
3
3
  end
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.30
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-07-01 00:00:00.000000000 Z
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