Class: WebPay::CustomerResponse
- Inherits:
-
Entity
- Object
- Entity
- WebPay::CustomerResponse
show all
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#normalize_hash, #to_h, #to_s
Constructor Details
Returns a new instance of CustomerResponse.
903
904
905
906
907
908
909
|
# File 'lib/webpay/data_types.rb', line 903
def initialize(hash = {})
hash = normalize_hash(hash)
hash['active_card'] = WebPay::CardResponse.new(hash['active_card']) if hash['active_card'].is_a?(Hash)
hash['recursions'] = hash['recursions'].is_a?(Array) ? hash['recursions'].map { |x| WebPay::RecursionResponse.new(x) if x.is_a?(Hash) } : hash['recursions']
hash['deleted'] ||= false
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
896
897
898
|
# File 'lib/webpay/data_types.rb', line 896
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
898
899
900
|
# File 'lib/webpay/data_types.rb', line 898
def self.fields
['id', 'object', 'livemode', 'created', 'active_card', 'description', 'email', 'recursions', 'deleted']
end
|
Instance Method Details
#active_card ⇒ Object
930
931
932
|
# File 'lib/webpay/data_types.rb', line 930
def active_card
attributes['active_card']
end
|
#created ⇒ Object
926
927
928
|
# File 'lib/webpay/data_types.rb', line 926
def created
attributes['created']
end
|
#deleted ⇒ Object
946
947
948
|
# File 'lib/webpay/data_types.rb', line 946
def deleted
attributes['deleted']
end
|
#description ⇒ Object
934
935
936
|
# File 'lib/webpay/data_types.rb', line 934
def description
attributes['description']
end
|
#email ⇒ Object
938
939
940
|
# File 'lib/webpay/data_types.rb', line 938
def email
attributes['email']
end
|
#id ⇒ Object
914
915
916
|
# File 'lib/webpay/data_types.rb', line 914
def id
attributes['id']
end
|
#livemode ⇒ Object
922
923
924
|
# File 'lib/webpay/data_types.rb', line 922
def livemode
attributes['livemode']
end
|
#object ⇒ Object
918
919
920
|
# File 'lib/webpay/data_types.rb', line 918
def object
attributes['object']
end
|
#recursions ⇒ Object
942
943
944
|
# File 'lib/webpay/data_types.rb', line 942
def recursions
attributes['recursions']
end
|