paysafe 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/paysafe/card.rb +19 -0
- data/lib/paysafe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1371212d079af59b921be49fad80577c32e64e1b
|
4
|
+
data.tar.gz: 7333f94629ab3e9e6f014c6648d9c8bff1d0de3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e823f1ad04a9856ca4d239e759c0ab387d45fe10a5fb573e1f776df52973cec1d1ec1f30e783f8ada52c62989c2ab429d5232087df1672f31312f77448b16ad
|
7
|
+
data.tar.gz: 76a5f749b30e0b796bc986e078ab23a8484c17fa672b6b90fce70551e4b3b676848abae5aa9bd365c97401c583f53af9393b16c2c2c52dddfb13f571aea29a26
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## 0.9.1 (2017-04-24)
|
5
|
+
|
6
|
+
* Added `card.brand` method that converts `card_type` value (VI) to brand name (visa).
|
7
|
+
|
4
8
|
## 0.9.0 (2017-04-19)
|
5
9
|
|
6
10
|
This is a major update with breaking changes so moving the version up quite a bit since I'd also like to move to a 1.0 release soon after.
|
data/lib/paysafe/card.rb
CHANGED
@@ -2,6 +2,21 @@ require 'paysafe/result'
|
|
2
2
|
|
3
3
|
module Paysafe
|
4
4
|
class Card < Result
|
5
|
+
|
6
|
+
BRANDS = {
|
7
|
+
'AM' => 'american_express',
|
8
|
+
'DC' => 'diners_club',
|
9
|
+
'DI' => 'discover',
|
10
|
+
'JC' => 'jcb',
|
11
|
+
'MC' => 'master',
|
12
|
+
'MD' => 'maestro',
|
13
|
+
'SF' => 'swiff',
|
14
|
+
'SO' => 'solo',
|
15
|
+
'VI' => 'visa',
|
16
|
+
'VD' => 'visa_debit',
|
17
|
+
'VE' => 'visa_electron',
|
18
|
+
}
|
19
|
+
|
5
20
|
attributes :id, :nick_name, :merchant_ref_num, :holder_name,
|
6
21
|
:card_num, :card_bin, :last_digits, :card_type, :billing_address_id,
|
7
22
|
:default_card_indicator, :payment_token, :single_use_token, :status,
|
@@ -9,5 +24,9 @@ module Paysafe
|
|
9
24
|
|
10
25
|
object_attribute :CardExpiry, :card_expiry
|
11
26
|
object_attribute :Address, :billing_address
|
27
|
+
|
28
|
+
def brand
|
29
|
+
@brand ||= BRANDS[card_type] || BRANDS[type]
|
30
|
+
end
|
12
31
|
end
|
13
32
|
end
|
data/lib/paysafe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paysafe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Julio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|