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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f20c55e590c38ec2375618c408113baff1aa4331343db485461c65109de027f5
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0f6834d79344f8a022b33272c557877587ff1a9b6204e7554088a6896010fc95
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 65cc0eb610b9c1c10158fa9ef10f536313fe0e3421a111c02b6deca10c8c613bffe7c073419bd61bfb87d4a5fd505fae985beba8bfab0fa1869febda8bc1820f
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9fdf52f505a5f4cfcaf9c9c529dd1662c00aadff250d393a9bd400b2df5d35296f16cbca6e88b5f4f9f0836bc7f22988f2847ab9d2818ca36eaf7004e4e5b8ae
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -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( 
     | 
| 
      
 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
         
     | 
    
        data/lib/modulr/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 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 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-09-07 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: faraday
         
     |