Class: PaypalServerSdk::ActivityTimestamps
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::ActivityTimestamps
- Defined in:
- lib/paypal_server_sdk/models/activity_timestamps.rb
Overview
The date and time stamps that are common to authorized payment, captured payment, and refund transactions.
Instance Attribute Summary collapse
-
#create_time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6).
-
#update_time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6).
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(create_time: SKIP, update_time: SKIP) ⇒ ActivityTimestamps
constructor
A new instance of ActivityTimestamps.
-
#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(create_time: SKIP, update_time: SKIP) ⇒ ActivityTimestamps
Returns a new instance of ActivityTimestamps.
48 49 50 51 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 48 def initialize(create_time: SKIP, update_time: SKIP) @create_time = create_time unless create_time == SKIP @update_time = update_time unless update_time == SKIP end |
Instance Attribute Details
#create_time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
18 19 20 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 18 def create_time @create_time end |
#update_time ⇒ String
The date and time, in [Internet date and time format](tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates.
25 26 27 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 25 def update_time @update_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. create_time = hash.key?('create_time') ? hash['create_time'] : SKIP update_time = hash.key?('update_time') ? hash['update_time'] : SKIP # Create object from extracted values. ActivityTimestamps.new(create_time: create_time, update_time: update_time) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['create_time'] = 'create_time' @_hash['update_time'] = 'update_time' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 36 def self.optionals %w[ create_time update_time ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
73 74 75 76 77 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 73 def inspect class_name = self.class.name.split('::').last "<#{class_name} create_time: #{@create_time.inspect}, update_time:"\ " #{@update_time.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
67 68 69 70 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 67 def to_s class_name = self.class.name.split('::').last "<#{class_name} create_time: #{@create_time}, update_time: #{@update_time}>" end |