Class: VisaAcceptanceMergedSpec::ApCapture
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ApCapture
- Defined in:
- lib/visa_acceptance_merged_spec/models/ap_capture.rb
Overview
ApCapture Model.
Instance Attribute Summary collapse
-
#reason ⇒ String
The reason why the captured payment status is PENDING or DENIED.
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(reason: SKIP, additional_properties: nil) ⇒ ApCapture
constructor
A new instance of ApCapture.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#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(reason: SKIP, additional_properties: nil) ⇒ ApCapture
Returns a new instance of ApCapture.
70 71 72 73 74 75 76 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 70 def initialize(reason: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @reason = reason unless reason == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#reason ⇒ String
The reason why the captured payment status is PENDING or DENIED.
BUYER_COMPLAINT The payer initiated a dispute for this captured payment
with processor.
CHARGEBACK The captured funds were reversed in response to the payer
disputing this captured payment with the issuer of the financial
instrument used to pay for this captured payment.
ECHECK The payer paid by an eCheck that has not yet cleared.
INTERNATIONAL_WITHDRAWAL Visit your online account. In your Account
Overview, accept and deny this payment.
OTHER No additional specific reason can be provided. For more information
about this captured payment, visit your account online or contact
processor.
PENDING_REVIEW The captured payment is pending manual review.
RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION The payee has not yet set up
appropriate receiving preferences for their account. For more information
about how to accept or deny this payment, visit your account online. This
reason is typically offered in scenarios such as when the currency of the
captured payment is different from the primary holding currency of the
payee.
REFUNDED The captured funds were refunded.
TRANSACTION_APPROVED_AWAITING_FUNDING The payer must send the funds for
this captured payment. This code generally appears for manual EFTs.
UNILATERAL The payee does not have a processor account.
VERIFICATION_REQUIRED The payee's processor account is not verified.
String with values,
BUYER_COMPLAINT
CHARGEBACK
ECHECK
INTERNATIONAL_WITHDRAWAL
OTHER
PENDING_REVIEW
RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION
REFUNDED
TRANSACTION_APPROVED_AWAITING_FUNDING
UNILATERAL
VERIFICATION_REQUIRED
49 50 51 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 49 def reason @reason end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. reason = hash.key?('reason') ? hash['reason'] : 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. ApCapture.new(reason: reason, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
52 53 54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 52 def self.names @_hash = {} if @_hash.nil? @_hash['reason'] = 'reason' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 59 def self.optionals %w[ reason ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} reason: #{@reason.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
98 99 100 101 |
# File 'lib/visa_acceptance_merged_spec/models/ap_capture.rb', line 98 def to_s class_name = self.class.name.split('::').last "<#{class_name} reason: #{@reason}, additional_properties: #{@additional_properties}>" end |