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.
-
#authorization_message_reference ⇒ String?
The current value of authorization_message_reference.
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.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 14 def acceptance_system_application_id @acceptance_system_application_id end |
#authorization_date ⇒ DateTime?
Returns the current value of authorization_date.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 14 def @authorization_date end |
#authorization_message_reference ⇒ String?
Returns the current value of authorization_message_reference.
14 15 16 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 14 def @authorization_message_reference end |
Instance Method Details
#from_hash(hash) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 31 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 if hash.has_key? 'authorizationMessageReference' @authorization_message_reference = hash['authorizationMessageReference'] end end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 |
# File 'lib/onlinepayments/sdk/domain/acceptance.rb', line 23 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['authorizationMessageReference'] = @authorization_message_reference unless @authorization_message_reference.nil? hash end |