afterpay-sdk 2.0.2 → 2.0.3

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: c6831c0910cf7e1491aa24bd217c75cb8904b2056b34a766f6abe75d98acfd85
4
- data.tar.gz: e2e7aa85a503e530dcc4a94ba0f6d1d1d9fb6f911cfc32ba70ea84320ed72233
3
+ metadata.gz: 325c2a76eecf818abf7f69996a923c45e91825611dafca101f45e89d6e5924a5
4
+ data.tar.gz: 1ca4a22d685e325ebb9387eb2b8a41a1997e35a8f08bdd28353bd01b1798f61c
5
5
  SHA512:
6
- metadata.gz: 3ea5e18a6c1d4458ea4a2c253aa2429ae8b4f0203b5a8bc58ec27a352b46526ff482dab492a6cbff99d21a0d8ec24a40899336c233f38534a4c2247f3fcfd3ac
7
- data.tar.gz: eafc25080fcd1fb6f33a62e394c895dcc9c80537a8135fddb6d25533c10bb5f4819ff6e80325e34016f47846f43db5a41128183c46ec7862941a3169958dba3c
6
+ metadata.gz: 146bf039bce2ea50954094f994cd52a43c48fc725c222a5dfb8621fc203bd736c226f9e8ef6ece669f026426f9e45a2925486982eaa11bda604dfd979222a190
7
+ data.tar.gz: de35ebc3d3dd62ef795d6ab0008ae89b89d7967cb2047579215859670c18b4792c4bf36398dc8f940eaed1877849f4da4454cb4f7f51cd425ed08eaedeee35d2
data/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ### 2.0.1 - 2021-07-05
8
8
 
9
- * bug fixes
9
+ * bug-fixes
10
10
  * Correct the from_response method by not directly calling new with response but formatting the amount and then calling new with the attributes. The afterpay-sdk gem follows the Data Models attibutes data types as in v2 doc. As per the doc amount attibute of Refund or PaymentEvent object is a Money object so when the developer calls new he need to supply the money object however we use from_response method where we convert amount in response to money object using utils. (by @sachinsaxena1996)
11
11
  * Fix refund objects attributes. add sucess? to refund model. Fix id be string in PaymentEvent. (by @sachinsaxena1996)
12
12
  * Do not directly call new with response.body use from_response instead. Change done as attribute were blank in Refund.execute. (by @sachinsaxena1996)
@@ -15,3 +15,12 @@
15
15
  * respond with objects array in payment response objects for events and refunds attributes. (by @sachinsaxena1996)
16
16
  * Added rspec for data models (by @sachinsaxena1996)
17
17
 
18
+ ### 2.0.2 - 2021-08-17
19
+
20
+ * enhancement
21
+ * Allow user agent to be configurable (by @siddyg)
22
+
23
+ ### 2.0.3 - 2021-08-20
24
+
25
+ * enhancement
26
+ * Expose declined? method in payment object, this is primarily applicable only for authorization (by @siddyg)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- afterpay-sdk (2.0.2)
4
+ afterpay-sdk (2.0.3)
5
5
  faraday (>= 0.8, < 1.0)
6
6
  faraday_middleware (~> 0.13.1)
7
7
  money (>= 6.7.1, < 7.0.0)
@@ -34,6 +34,10 @@ module Afterpay
34
34
  @status == "APPROVED"
35
35
  end
36
36
 
37
+ def declined?
38
+ @status == "DECLINED"
39
+ end
40
+
37
41
  # Executes the Payment
38
42
  #
39
43
  # @param token [String] the Order token
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Afterpay
4
- VERSION = "2.0.2"
4
+ VERSION = "2.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: afterpay-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sachin Saxena
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler