paxful_client 1.2.0 → 1.3.0

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: 445e56c7910f8f51f1029e5f0af8513452c6824ecfc974972abb780f124587ab
4
- data.tar.gz: e49d1a66ebe40915efe9e832876b63d646597a53d7272dbddc64b70fe13c4772
3
+ metadata.gz: e31445632e6df99df0ecdec87a56d68eeeb475287b881d53eb3a75a9d3292f35
4
+ data.tar.gz: 63ec0e3c38e12fe71ac6b41880e4008e4a51fd658464172de59cb628d4038ebe
5
5
  SHA512:
6
- metadata.gz: 9a75f633fcd0778ac1ba08d9915412e085c5499862f8430c100548673b942ae1659e08bf3c229846ee6c594e878c9f521b0dc8a256da4f88935b391af9d8f5aa
7
- data.tar.gz: 6967c3a4737520d0e04328144c8422fe4e072bf12617b9bc8ae01fe3b60009c6c6cc166ce96c798ae394ba26f4f1af3878497f9ad57df348e662935a33c61865
6
+ metadata.gz: 0a521e88fb719f7376433db827da71458d46309e3ac61e61f8af72dd910bcda757ff63c1d03c078f98140bf76f73c34803423fbc42091d01613010da37508061
7
+ data.tar.gz: 7326e16e3bdebb80b3c5fab4c2a806d9bc75a2dba5a57319d5eb8a5f783c1465c35a58bdebdc51303f26a0835e0c7e587208440b6198b33f46b1705c782ec213
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.3.0] - 2021-01-06
8
+ ### Changed
9
+ - `get_balance#success?` now checks if the response body has a `data` element. Sometimes Paxful returns 200, but has an empty body
10
+
7
11
  ## [1.2.0] - 2020-12-15
8
12
  ### Changed
9
13
  - Only consider success for `get_completed_trades` if it meets certain criteria
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paxful_client (1.2.0)
4
+ paxful_client (1.3.0)
5
5
  activesupport
6
6
  api_client_base
7
7
  dry-validation (~> 0.13)
@@ -35,10 +35,9 @@ GEM
35
35
  descendants_tracker (0.0.4)
36
36
  thread_safe (~> 0.3, >= 0.3.1)
37
37
  diff-lcs (1.4.4)
38
- dry-configurable (0.11.6)
38
+ dry-configurable (0.12.0)
39
39
  concurrent-ruby (~> 1.0)
40
- dry-core (~> 0.4, >= 0.4.7)
41
- dry-equalizer (~> 0.2)
40
+ dry-core (~> 0.5, >= 0.5.0)
42
41
  dry-container (0.7.2)
43
42
  concurrent-ruby (~> 1.0)
44
43
  dry-configurable (~> 0.1, >= 0.1.3)
@@ -67,14 +66,14 @@ GEM
67
66
  equalizer (0.0.11)
68
67
  ethon (0.12.0)
69
68
  ffi (>= 1.3.0)
70
- ffi (1.13.1)
69
+ ffi (1.14.2)
71
70
  gem_config (0.3.2)
72
71
  hashdiff (1.0.1)
73
- i18n (1.8.5)
72
+ i18n (1.8.7)
74
73
  concurrent-ruby (~> 1.0)
75
74
  ice_nine (0.11.2)
76
75
  method_source (1.0.0)
77
- minitest (5.14.2)
76
+ minitest (5.14.3)
78
77
  pry (0.13.1)
79
78
  coderay (~> 1.1)
80
79
  method_source (~> 1.0)
@@ -97,7 +96,7 @@ GEM
97
96
  thread_safe (0.3.6)
98
97
  typhoeus (1.4.0)
99
98
  ethon (>= 0.9.0)
100
- tzinfo (2.0.3)
99
+ tzinfo (2.0.4)
101
100
  concurrent-ruby (~> 1.0)
102
101
  vcr (3.0.3)
103
102
  virtus (1.0.5)
@@ -5,6 +5,7 @@ module PaxfulClient
5
5
 
6
6
  attribute :body, Object, lazy: true, default: :default_body
7
7
  attribute :parsed_body, String, lazy: true, default: :default_parsed_body
8
+ attribute :error_message, String, lazy: true
8
9
 
9
10
  private
10
11
 
@@ -1,7 +1,5 @@
1
1
  module PaxfulClient
2
- class GetBalanceResponse
3
-
4
- include APIClientBase::Response.module
2
+ class GetBalanceResponse < BaseResponse
5
3
 
6
4
  attribute :wallet, PaxfulClient::Wallet, lazy: true, default: :default_wallet
7
5
  attribute :body, Object, lazy: true, default: :default_body
@@ -9,6 +7,14 @@ module PaxfulClient
9
7
 
10
8
  private
11
9
 
10
+ def default_success
11
+ unless parsed_body['data'].present?
12
+ self.error_message = 'GetBalanceResponse: data not present'
13
+ return false
14
+ end
15
+ raw_response.success?
16
+ end
17
+
12
18
  def default_wallet
13
19
  args = parsed_body["data"].each_with_object({}) do |(attr, val), hash|
14
20
  hash[attr.underscore] = val
@@ -1,3 +1,3 @@
1
1
  module PaxfulClient
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paxful_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Chavez
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-16 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_client_base
@@ -150,7 +150,7 @@ metadata:
150
150
  homepage_uri: https://github.com/MarkFChavez/paxful_client-ruby
151
151
  source_code_uri: https://github.com/MarkFChavez/paxful_client-ruby
152
152
  changelog_uri: https://github.com/MarkFChavez/paxful_client-ruby
153
- post_install_message:
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubygems_version: 3.0.3
169
- signing_key:
169
+ signing_key:
170
170
  specification_version: 4
171
171
  summary: API wrapper for Paxful
172
172
  test_files: []