Class: Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResource
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResource
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb
Instance Attribute Summary collapse
-
#brand ⇒ String
The current value of brand.
-
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
The current value of point_of_sale_data.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#brand ⇒ String
Returns the current value of brand.
14 15 16 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 14 def brand @brand end |
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData
Returns the current value of point_of_sale_data.
14 15 16 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 14 def point_of_sale_data @point_of_sale_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 28 def from_hash(hash) super if hash.has_key? 'brand' @brand = hash['brand'] end if hash.has_key? 'pointOfSaleData' raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData']) end end |
#to_h ⇒ Hash
21 22 23 24 25 26 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb', line 21 def to_h hash = super hash['brand'] = @brand unless @brand.nil? hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil? hash end |