Class: WebPay::Mock::FakeEntity::Card
- Inherits:
-
Base
- Object
- Base
- WebPay::Mock::FakeEntity::Card
show all
- Defined in:
- lib/webpay/mock/fake_entity/card.rb
Instance Attribute Summary
Attributes inherited from Base
#builder
Instance Method Summary
collapse
Methods inherited from Base
#build, #initialize, #override, #set_params
#card_from, #charge_from, #customer_from, #fake_account, #fake_card, #fake_event, #fake_fingerprint, #fake_list, #recursion_from, #token_from
Methods included from Util
#stringify_keys
Instance Method Details
#basic_attributes ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/webpay/mock/fake_entity/card.rb', line 7
def basic_attributes
{ exp_year: 2014,
exp_month: 11,
fingerprint: fake_fingerprint,
name: "KEI KUBO",
country: "JP",
type: "Visa",
cvc_check: "pass",
last4: "4242" }
end
|
#conversion(key, value) ⇒ Object
22
23
24
25
26
27
|
# File 'lib/webpay/mock/fake_entity/card.rb', line 22
def conversion(key, value)
case key
when 'number'
{ last4: value[-4..-1] }
end
end
|
#copy_attributes ⇒ Object
18
19
20
|
# File 'lib/webpay/mock/fake_entity/card.rb', line 18
def copy_attributes
[:exp_month, :exp_year, :name]
end
|
#object_name ⇒ Object
3
4
5
|
# File 'lib/webpay/mock/fake_entity/card.rb', line 3
def object_name
'card'
end
|