lockstep_rails 0.3.77 → 0.3.78

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: 0b11735a0987825c57902116838b940c6608f445cf95dacc7ff6de87d4275451
4
- data.tar.gz: 7f3f535488efead415353fa0130ddf0e930818ef88dfd58b34a16d070c323e29
3
+ metadata.gz: 14486c21419a49912f1077b56941908125a5d7fee51a32c696eb6050c2247ffe
4
+ data.tar.gz: d93da0bc1de0bff829a1e61e7d71c2120295754139c90c7a650b3bda6a3272ec
5
5
  SHA512:
6
- metadata.gz: 4644b5e562d8513f231c567026a2154a7b0c0916ae37c9142300369bcceb595cdcc3d9566527de8a00de4b99dfc5d25f354ac07ae98633f3edf0beda4c58d4ee
7
- data.tar.gz: 2e118cc92126576c690fedb783b1e939bc24c1f40647ad3849d752744295b611c211a0fdee6405c52d5a074f645e2bc59f4c97fcaaf8c1cecec858d058e90e2d
6
+ metadata.gz: 18e7493b2530aba59359f35577bc21a3c5bedd52b1be87d50fc1b99457dacc2b35a8acfd430a5ede4e9a1d67f36f6569425cf90d2c9a78d0d159a678e1ac178d
7
+ data.tar.gz: 22e7181e9f1477676c7e6eae5cc8b1152cd4dd0f2cf9ea7a4769a161b5774ee31c671e88ea4179095c93dd509452d06b3a9bbd5c2d2341b66fcfff1af243d5af
data/README.md CHANGED
@@ -61,6 +61,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
61
61
  - Lockstep::InvoiceAtRiskSummary
62
62
  - Lockstep::InvoiceSummary
63
63
  - Lockstep::MagicLink
64
+ - Lockstep::MagicLinkSummary
64
65
  - Lockstep::Note
65
66
  - Lockstep::Payments
66
67
  - Lockstep::PaymentApplied
@@ -2,4 +2,5 @@ module Lockstep::Exceptions
2
2
  class UnauthorizedError < StandardError; end
3
3
  class BadRequestError < StandardError; end
4
4
  class RecordNotFound < StandardError; end
5
+ class ApiResponseError < StandardError; end
5
6
  end
@@ -0,0 +1,16 @@
1
+ class Lockstep::MagicLinkSummary < Lockstep::ApiRecord
2
+ self.model_name_uri = "v1/useraccounts/magic-links/summary"
3
+ self.id_ref = "group_key"
4
+ self.query_path = ""
5
+ load_schema(Schema::MagicLinkSummary)
6
+
7
+ def self.with_date(from_date: nil, to_date: nil)
8
+ resp = resource.get('', params: { from: from_date, to: to_date })
9
+ raise Lockstep::Exceptions::BadRequestError, 'Endpoint not found' if resp.code == '404'
10
+ raise Lockstep::Exceptions::ApiResponseError.new("#{resp.code} error while fetching: #{resp.body}") unless %w(201 200).include?(resp.code.to_s)
11
+
12
+ summary = JSON.parse(resp.body)
13
+
14
+ summary.deep_transform_keys!(&:underscore).deep_symbolize_keys!
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LockstepRails
4
- VERSION = '0.3.77'
4
+ VERSION = '0.3.78'
5
5
  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.77
4
+ version: 0.3.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-26 00:00:00.000000000 Z
11
+ date: 2023-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -61,6 +61,7 @@ files:
61
61
  - app/models/lockstep/invoice_summary.rb
62
62
  - app/models/lockstep/invoices/address.rb
63
63
  - app/models/lockstep/magic_link.rb
64
+ - app/models/lockstep/magic_link_summary.rb
64
65
  - app/models/lockstep/note.rb
65
66
  - app/models/lockstep/payment.rb
66
67
  - app/models/lockstep/payment_applied.rb