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.
Methods inherited from BaseModel
Constructor Details
#initialize(create_time: SKIP, update_time: SKIP) ⇒ ActivityTimestamps
Returns a new instance of ActivityTimestamps.
50 51 52 53 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 50 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.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>
19 20 21 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 19 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.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>
27 28 29 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 27 def update_time @update_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 56 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.
30 31 32 33 34 35 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 30 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
46 47 48 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 |
# File 'lib/paypal_server_sdk/models/activity_timestamps.rb', line 38 def self.optionals %w[ create_time update_time ] end |