synapse_pay_rest 3.2.1 → 3.2.2

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
  SHA1:
3
- metadata.gz: 2cc3f5c96ebd64735c90cee2bd7f0989bda4a731
4
- data.tar.gz: baa7445a81cddba8cb95ab2b0cbad69a34fcc4b8
3
+ metadata.gz: '0238b5f86667781ee63382a874434f1257061643'
4
+ data.tar.gz: ee3bedd0c2a1442b65c5c4eecae46ff04e742786
5
5
  SHA512:
6
- metadata.gz: 44ed5c4e073ad34f76b7e3ae71669790ccd119f6fe6c6653b5fd9130d7c6b594118f59ae14d0c6c4729fa311eb2ca4c0b03fb22a92fcfe73396509177958c50e
7
- data.tar.gz: dce13e643e09c2844dc2dac338499aa11ae834e1f05be2d25f0e3f2df8407b974f92b9ba2edb20b64e6c0b76e2052d86cad27cb8e1fb0fd46a28f9bc94d900e1
6
+ metadata.gz: eac79fe951c026a702fb481975744c26a92f1ca9c808b846e3bc4101159dce69959999dd6cfa76e7920f998c0204fd044907e0647a7a80e260804c05a783f332
7
+ data.tar.gz: 6b6f88845e3a60e9f76ff268a30bcf4e473ca6b5601b7c9e59253305e75b64f68f3767dafec43d74b87200d368fa510abc3caa0bb613b0ebdc82755b5451f7f6
data/.env.sample ADDED
@@ -0,0 +1,8 @@
1
+ # For development in a console
2
+ CLIENT_ID=your_sandbox_client_id
3
+ CLIENT_SECRET=your_sandbox_client_secret
4
+ FINGERPRINT=your_sandbox_fingerprint
5
+
6
+ # For running tests
7
+ TEST_CLIENT_ID=your_sandbox_client_id
8
+ TEST_CLIENT_SECRET=your_sandbox_client_secret
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Synapse Financial Technologies Inc.
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
 
@@ -1,4 +1,4 @@
1
1
  module SynapsePayRest
2
2
  # Gem version
3
- VERSION = '3.2.1'.freeze
3
+ VERSION = '3.2.2'.freeze
4
4
  end
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
- node = SynapsePayRest::Node.find(user: user, id: '1a3efa1231as2f')
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.1
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-23 00:00:00.000000000 Z
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