synapse_pay_rest 3.2.1 → 3.2.2
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 +4 -4
 - data/.env.sample +8 -0
 - data/LICENSE +1 -1
 - data/lib/synapse_pay_rest/api/nodes.rb +2 -1
 - data/lib/synapse_pay_rest/models/node/node.rb +3 -2
 - data/lib/synapse_pay_rest/version.rb +1 -1
 - data/samples.md +2 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: '0238b5f86667781ee63382a874434f1257061643'
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ee3bedd0c2a1442b65c5c4eecae46ff04e742786
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: eac79fe951c026a702fb481975744c26a92f1ca9c808b846e3bc4101159dce69959999dd6cfa76e7920f998c0204fd044907e0647a7a80e260804c05a783f332
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6b6f88845e3a60e9f76ff268a30bcf4e473ca6b5601b7c9e59253305e75b64f68f3767dafec43d74b87200d368fa510abc3caa0bb613b0ebdc82755b5451f7f6
         
     | 
    
        data/.env.sample
    ADDED
    
    
    
        data/LICENSE
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            The MIT License (MIT)
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            Copyright (c)  
     | 
| 
      
 3 
     | 
    
         
            +
            Copyright (c) 2014 SynapsePay LLC
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            Permission is hereby granted, free of charge, to any person obtaining a copy of
         
     | 
| 
       6 
6 
     | 
    
         
             
            this software and associated documentation files (the "Software"), to deal in
         
     | 
| 
         @@ -3,7 +3,7 @@ module SynapsePayRest 
     | 
|
| 
       3 
3 
     | 
    
         
             
              class Nodes
         
     | 
| 
       4 
4 
     | 
    
         
             
                # Valid optional args for #get
         
     | 
| 
       5 
5 
     | 
    
         
             
                # @todo Should refactor this to HTTPClient
         
     | 
| 
       6 
     | 
    
         
            -
                VALID_QUERY_PARAMS = [:page, :per_page, :type].freeze
         
     | 
| 
      
 6 
     | 
    
         
            +
                VALID_QUERY_PARAMS = [:page, :per_page, :type, :full_dehydrate].freeze
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                # @!attribute [rw] client
         
     | 
| 
       9 
9 
     | 
    
         
             
                #   @return [SynapsePayRest::HTTPClient]
         
     | 
| 
         @@ -23,6 +23,7 @@ module SynapsePayRest 
     | 
|
| 
       23 
23 
     | 
    
         
             
                # @param per_page [String,Integer] (optional) response will default to 20
         
     | 
| 
       24 
24 
     | 
    
         
             
                # @param type [String] (optional)
         
     | 
| 
       25 
25 
     | 
    
         
             
                # @see https://docs.synapsepay.com/docs/node-resources node types
         
     | 
| 
      
 26 
     | 
    
         
            +
                # @param full_dehydrate [String, String] (optional) response will inclulde all transaction data
         
     | 
| 
       26 
27 
     | 
    
         
             
                # 
         
     | 
| 
       27 
28 
     | 
    
         
             
                # @raise [SynapsePayRest::Error] may return subclasses of error based on 
         
     | 
| 
       28 
29 
     | 
    
         
             
                # HTTP response from API
         
     | 
| 
         @@ -25,15 +25,16 @@ module SynapsePayRest 
     | 
|
| 
       25 
25 
     | 
    
         
             
                  # 
         
     | 
| 
       26 
26 
     | 
    
         
             
                  # @param user [SynapsePayRest::User]
         
     | 
| 
       27 
27 
     | 
    
         
             
                  # @param id [String] id of the node to find
         
     | 
| 
      
 28 
     | 
    
         
            +
                  # @param full_dehydrate [String] (optional) if 'yes', returns all trans data on node
         
     | 
| 
       28 
29 
     | 
    
         
             
                  # 
         
     | 
| 
       29 
30 
     | 
    
         
             
                  # @raise [SynapsePayRest::Error] if HTTP error
         
     | 
| 
       30 
31 
     | 
    
         
             
                  # 
         
     | 
| 
       31 
32 
     | 
    
         
             
                  # @return [SynapsePayRest::BaseNode] subclass depends on node type
         
     | 
| 
       32 
     | 
    
         
            -
                  def find(user:, id:)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  def find(user:, id:, full_dehydrate:)
         
     | 
| 
       33 
34 
     | 
    
         
             
                    raise ArgumentError, 'user must be a User object' unless user.is_a?(User)
         
     | 
| 
       34 
35 
     | 
    
         
             
                    raise ArgumentError, 'id must be a String' unless id.is_a?(String)
         
     | 
| 
       35 
36 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
                    response = user.client.nodes.get(user_id: user.id, node_id: id)
         
     | 
| 
      
 37 
     | 
    
         
            +
                    response = user.client.nodes.get(user_id: user.id, node_id: id, full_dehydrate: full_dehydrate)
         
     | 
| 
       37 
38 
     | 
    
         
             
                    from_response(user, response)
         
     | 
| 
       38 
39 
     | 
    
         
             
                  end
         
     | 
| 
       39 
40 
     | 
    
         | 
    
        data/samples.md
    CHANGED
    
    | 
         @@ -311,7 +311,8 @@ node = user.find_node(id: '1a3efa1231as2f') 
     | 
|
| 
       311 
311 
     | 
    
         
             
            ##### b) Node#find
         
     | 
| 
       312 
312 
     | 
    
         | 
| 
       313 
313 
     | 
    
         
             
            ```ruby
         
     | 
| 
       314 
     | 
    
         
            -
             
     | 
| 
      
 314 
     | 
    
         
            +
            # full_dehydrate: 'yes' (optional) returns all trans data on node
         
     | 
| 
      
 315 
     | 
    
         
            +
            node = SynapsePayRest::Node.find(user: user, id: '1a3efa1231as2f', full_dehydrate: 'no')
         
     | 
| 
       315 
316 
     | 
    
         
             
            # => #<SynapsePayRest::EftNpNode>
         
     | 
| 
       316 
317 
     | 
    
         
             
            ```
         
     | 
| 
       317 
318 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: synapse_pay_rest
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 3.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 3.2.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Steven Broderick
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2017-05- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2017-05-24 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rest-client
         
     | 
| 
         @@ -143,6 +143,7 @@ executables: [] 
     | 
|
| 
       143 
143 
     | 
    
         
             
            extensions: []
         
     | 
| 
       144 
144 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       145 
145 
     | 
    
         
             
            files:
         
     | 
| 
      
 146 
     | 
    
         
            +
            - ".env.sample"
         
     | 
| 
       146 
147 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
       147 
148 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       148 
149 
     | 
    
         
             
            - LICENSE
         
     |