Class: OnlinePayments::SDK::Domain::Acceptance
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::Acceptance
- Defined in:
- lib/onlinepayments/sdk/domain/acceptance.rb
Instance Attribute Summary collapse
-
#acceptance_system_application_id ⇒ String
The current value of acceptance_system_application_id.
-
#authorization_date ⇒ DateTime
The current value of authorization_date.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#acceptance_system_application_id ⇒ String
Returns the current value of acceptance_system_application_id.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 13 def acceptance_system_application_id @acceptance_system_application_id end |
#authorization_date ⇒ DateTime
Returns the current value of authorization_date.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 13 def @authorization_date end |
Instance Method Details
#from_hash(hash) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 27 def from_hash(hash) super if hash.has_key? 'acceptanceSystemApplicationId' @acceptance_system_application_id = hash['acceptanceSystemApplicationId'] end if hash.has_key? 'authorizationDate' @authorization_date = DateTime.parse(hash['authorizationDate']) end end |
#to_h ⇒ Hash
20 21 22 23 24 25 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 20 def to_h hash = super hash['acceptanceSystemApplicationId'] = @acceptance_system_application_id unless @acceptance_system_application_id.nil? hash['authorizationDate'] = @authorization_date.iso8601(3) unless @authorization_date.nil? hash end |