modulr-api 0.0.33 → 0.0.35

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: f18a9a4738ddda14b40cc77627da9f29e2a643f6dce53f0521d0dc3bdae126d4
4
- data.tar.gz: d2b2f95e40bcd78b8092c9ac2e52df3711af21eec1998e8164ae9747467661b1
3
+ metadata.gz: f20c55e590c38ec2375618c408113baff1aa4331343db485461c65109de027f5
4
+ data.tar.gz: 0f6834d79344f8a022b33272c557877587ff1a9b6204e7554088a6896010fc95
5
5
  SHA512:
6
- metadata.gz: efeddc4731f875ef59ce4694795dbcc2cf12af8875b02534a2e25b3926ce043830935e019fa23e3e2e774f53577de564fc9b996a9cda17d3a241d08274249d4e
7
- data.tar.gz: 7838cc0b1a79731e40f4a73badb46559182d366ef1cd41c4013d4b9d4f86bcfa8d8915b5db0ac53bf9b6e153a0ad46b7e3970a33dfd9ea0d94f0fdbad5308049
6
+ metadata.gz: 65cc0eb610b9c1c10158fa9ef10f536313fe0e3421a111c02b6deca10c8c613bffe7c073419bd61bfb87d4a5fd505fae985beba8bfab0fa1869febda8bc1820f
7
+ data.tar.gz: 9fdf52f505a5f4cfcaf9c9c529dd1662c00aadff250d393a9bd400b2df5d35296f16cbca6e88b5f4f9f0836bc7f22988f2847ab9d2818ca36eaf7004e4e5b8ae
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modulr-api (0.0.33)
4
+ modulr-api (0.0.35)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
@@ -5,7 +5,11 @@ module Modulr
5
5
  class AccountsService < Service
6
6
  def find(id:)
7
7
  response = client.get("/accounts/#{id}")
8
- Resources::Accounts::Account.new(response.env[:raw_body], response.body)
8
+ Resources::Accounts::Account.new(
9
+ response.env[:raw_body],
10
+ response.body,
11
+ { requested_at: response.headers["date"] }
12
+ )
9
13
  end
10
14
 
11
15
  def create(customer_id:, currency:, product_code:, **opts)
@@ -35,7 +35,7 @@ module Modulr
35
35
  end
36
36
 
37
37
  private def build_query_params(opts) # rubocop:disable Metrics/AbcSize
38
- same_name_params = [:type, :status]
38
+ same_name_params = [:type, :status, :size, :page]
39
39
  date_params = { to: :toCreatedDate, from: :fromCreatedDate, updated_since: :modifiedSince }
40
40
  mapped_params = {
41
41
  external_reference: :externalReference,
@@ -9,7 +9,7 @@ module Modulr
9
9
  end
10
10
 
11
11
  private def build_query_params(opts) # rubocop:disable Metrics/AbcSize
12
- same_name_params = [:credit, :type]
12
+ same_name_params = [:credit, :type, :size, :page]
13
13
  date_params = { to: :toTransactionDate, from: :fromTransactionDate, to_posted: :toPostedDate,
14
14
  from_posted: :fromPostedDate, }
15
15
  mapped_params = {
@@ -4,7 +4,7 @@ module Modulr
4
4
  module Resources
5
5
  module Accounts
6
6
  class Account < Base
7
- attr_reader :identifiers
7
+ attr_reader :identifiers, :requested_at
8
8
 
9
9
  STATUS = {
10
10
  active: "ACTIVE",
@@ -23,8 +23,9 @@ module Modulr
23
23
  map :createdDate, :created_at
24
24
  map :directDebit, :direct_debit
25
25
 
26
- def initialize(raw_response, attributes = {})
26
+ def initialize(raw_response, attributes = {}, opts = { requested_at: nil })
27
27
  super(raw_response, attributes)
28
+ @requested_at = opts[:requested_at]
28
29
  @identifiers = Accounts::Identifiers.new(nil, attributes[:identifiers])
29
30
  end
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulr
4
- VERSION = "0.0.33"
4
+ VERSION = "0.0.35"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulr-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aitor García Rey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-25 00:00:00.000000000 Z
11
+ date: 2023-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday