Class: PaypalServerSdk::ReauthorizeRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::ReauthorizeRequest
- Defined in:
- lib/paypal_server_sdk/models/reauthorize_request.rb
Overview
Reauthorizes an authorized PayPal account payment, by ID. To ensure that
funds are still available, reauthorize a payment after its initial three-day
honor period expires. You can reauthorize a payment only once from days four
to 29. If 30 days have transpired since the date of the original
authorization, you must create an authorized payment instead of
reauthorizing the original authorized payment. A reauthorized payment itself
has a new honor period of three days. You can reauthorize an authorized
payment once. The allowed amount depends on context and geography, for
example in US it is up to 115% of the original authorized amount, not to
exceed an increase of $75 USD. Supports only the amount request parameter.
Instance Attribute Summary collapse
-
#amount ⇒ Money
The currency and amount for a financial transaction, such as a balance or payment due.
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(amount: SKIP) ⇒ ReauthorizeRequest
constructor
A new instance of ReauthorizeRequest.
-
#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(amount: SKIP) ⇒ ReauthorizeRequest
Returns a new instance of ReauthorizeRequest.
45 46 47 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 45 def initialize(amount: SKIP) @amount = amount unless amount == SKIP end |
Instance Attribute Details
#amount ⇒ Money
The currency and amount for a financial transaction, such as a balance or payment due.
24 25 26 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 24 def amount @amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount = Money.from_hash(hash['amount']) if hash['amount'] # Create object from extracted values. ReauthorizeRequest.new(amount: amount) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['amount'] = 'amount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
41 42 43 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 41 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 34 def self.optionals %w[ amount ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
67 68 69 70 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 67 def inspect class_name = self.class.name.split('::').last "<#{class_name} amount: #{@amount.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
61 62 63 64 |
# File 'lib/paypal_server_sdk/models/reauthorize_request.rb', line 61 def to_s class_name = self.class.name.split('::').last "<#{class_name} amount: #{@amount}>" end |