Class: FdxV660Api::PaymentNetworkLifecycleEventEntity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- FdxV660Api::PaymentNetworkLifecycleEventEntity
- Defined in:
- lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb
Overview
Details of a lifecycle change on a payment network pair of bankId and
account identifier identified by the paymentNetworkId on a single
account and payment network type
Instance Attribute Summary collapse
-
#initiator ⇒ PartyType4
The party initiating the revocation or status change.
-
#other_reason ⇒ String
Additional information or description of an
OTHERreason. -
#payment_network_type ⇒ PaymentNetworkType2
The payment network type for this event on this
paymentNetworkId. -
#reason ⇒ UpdateReason2
The reason for the revocation or status change, one of
BUSINESS_RULE,SECURITY_EVENT,USER_ACTIONorOTHER. -
#status ⇒ EventStatus2
The status after the event or change requested, one of
ACTIVE,SUSPENDED,EXPIREDorREVOKED, depending on entity type. -
#updated_time ⇒ DateTime
When the lifecycle event occurred.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(status: SKIP, reason: SKIP, other_reason: SKIP, initiator: SKIP, updated_time: SKIP, payment_network_type: SKIP, additional_properties: nil) ⇒ PaymentNetworkLifecycleEventEntity
constructor
A new instance of PaymentNetworkLifecycleEventEntity.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_updated_time ⇒ Object
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(status: SKIP, reason: SKIP, other_reason: SKIP, initiator: SKIP, updated_time: SKIP, payment_network_type: SKIP, additional_properties: nil) ⇒ PaymentNetworkLifecycleEventEntity
Returns a new instance of PaymentNetworkLifecycleEventEntity.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 70 def initialize(status: SKIP, reason: SKIP, other_reason: SKIP, initiator: SKIP, updated_time: SKIP, payment_network_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status unless status == SKIP @reason = reason unless reason == SKIP @other_reason = other_reason unless other_reason == SKIP @initiator = initiator unless initiator == SKIP @updated_time = updated_time unless updated_time == SKIP @payment_network_type = payment_network_type unless payment_network_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#initiator ⇒ PartyType4
The party initiating the revocation or status change
31 32 33 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 31 def initiator @initiator end |
#other_reason ⇒ String
Additional information or description of an OTHER reason
27 28 29 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 27 def other_reason @other_reason end |
#payment_network_type ⇒ PaymentNetworkType2
The payment network type for this event on this paymentNetworkId
39 40 41 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 39 def payment_network_type @payment_network_type end |
#reason ⇒ UpdateReason2
The reason for the revocation or status change, one of BUSINESS_RULE,
SECURITY_EVENT, USER_ACTION or OTHER
23 24 25 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 23 def reason @reason end |
#status ⇒ EventStatus2
The status after the event or change requested, one of ACTIVE,
SUSPENDED, EXPIRED or REVOKED, depending on entity type
18 19 20 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 18 def status @status end |
#updated_time ⇒ DateTime
When the lifecycle event occurred
35 36 37 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 35 def updated_time @updated_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP other_reason = hash.key?('otherReason') ? hash['otherReason'] : SKIP initiator = hash.key?('initiator') ? hash['initiator'] : SKIP updated_time = if hash.key?('updatedTime') (DateTimeHelper.from_rfc3339(hash['updatedTime']) if hash['updatedTime']) else SKIP end payment_network_type = hash.key?('paymentNetworkType') ? hash['paymentNetworkType'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. PaymentNetworkLifecycleEventEntity.new(status: status, reason: reason, other_reason: other_reason, initiator: initiator, updated_time: updated_time, payment_network_type: payment_network_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['reason'] = 'reason' @_hash['other_reason'] = 'otherReason' @_hash['initiator'] = 'initiator' @_hash['updated_time'] = 'updatedTime' @_hash['payment_network_type'] = 'paymentNetworkType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 54 def self.optionals %w[ status reason other_reason initiator updated_time payment_network_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
132 133 134 135 136 137 138 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 132 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, reason: #{@reason.inspect}, other_reason:"\ " #{@other_reason.inspect}, initiator: #{@initiator.inspect}, updated_time:"\ " #{@updated_time.inspect}, payment_network_type: #{@payment_network_type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_custom_updated_time ⇒ Object
119 120 121 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 119 def to_custom_updated_time DateTimeHelper.to_rfc3339(updated_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
124 125 126 127 128 129 |
# File 'lib/fdx_v660_api/models/payment_network_lifecycle_event_entity.rb', line 124 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, reason: #{@reason}, other_reason: #{@other_reason},"\ " initiator: #{@initiator}, updated_time: #{@updated_time}, payment_network_type:"\ " #{@payment_network_type}, additional_properties: #{@additional_properties}>" end |