Class: Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResponse
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResponse
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb
Instance Attribute Summary collapse
-
#brand ⇒ String
The current value of brand.
-
#ecommerce_data ⇒ Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForResponse
The current value of ecommerce_data.
-
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse
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.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb', line 16 def brand @brand end |
#ecommerce_data ⇒ Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForResponse
Returns the current value of ecommerce_data.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb', line 16 def ecommerce_data @ecommerce_data end |
#point_of_sale_data ⇒ Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse
Returns the current value of point_of_sale_data.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb', line 16 def point_of_sale_data @point_of_sale_data end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb', line 33 def from_hash(hash) super if hash.has_key? 'brand' @brand = hash['brand'] end if hash.has_key? 'ecommerceData' raise TypeError, "value '%s' is not a Hash" % [hash['ecommerceData']] unless hash['ecommerceData'].is_a? Hash @ecommerce_data = Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForResponse.new_from_hash(hash['ecommerceData']) 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::PointOfSaleDataForResponse.new_from_hash(hash['pointOfSaleData']) end end |
#to_h ⇒ Hash
25 26 27 28 29 30 31 |
# File 'lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb', line 25 def to_h hash = super hash['brand'] = @brand unless @brand.nil? hash['ecommerceData'] = @ecommerce_data.to_h unless @ecommerce_data.nil? hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil? hash end |