Class: PaypalServerSdk::RelatedIdentifiers
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::RelatedIdentifiers
- Defined in:
- lib/paypal_server_sdk/models/related_identifiers.rb
Overview
Identifiers related to a specific resource.
Instance Attribute Summary collapse
-
#authorization_id ⇒ String
Authorization ID related to the resource.
-
#capture_id ⇒ String
Capture ID related to the resource.
-
#order_id ⇒ String
Order ID related to the resource.
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(order_id: SKIP, authorization_id: SKIP, capture_id: SKIP) ⇒ RelatedIdentifiers
constructor
A new instance of RelatedIdentifiers.
Methods inherited from BaseModel
Constructor Details
#initialize(order_id: SKIP, authorization_id: SKIP, capture_id: SKIP) ⇒ RelatedIdentifiers
Returns a new instance of RelatedIdentifiers.
47 48 49 50 51 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 47 def initialize(order_id: SKIP, authorization_id: SKIP, capture_id: SKIP) @order_id = order_id unless order_id == SKIP @authorization_id = unless == SKIP @capture_id = capture_id unless capture_id == SKIP end |
Instance Attribute Details
#authorization_id ⇒ String
Authorization ID related to the resource.
18 19 20 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 18 def @authorization_id end |
#capture_id ⇒ String
Capture ID related to the resource.
22 23 24 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 22 def capture_id @capture_id end |
#order_id ⇒ String
Order ID related to the resource.
14 15 16 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 14 def order_id @order_id 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 65 66 67 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 54 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. order_id = hash.key?('order_id') ? hash['order_id'] : SKIP = hash.key?('authorization_id') ? hash['authorization_id'] : SKIP capture_id = hash.key?('capture_id') ? hash['capture_id'] : SKIP # Create object from extracted values. RelatedIdentifiers.new(order_id: order_id, authorization_id: , capture_id: capture_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['order_id'] = 'order_id' @_hash['authorization_id'] = 'authorization_id' @_hash['capture_id'] = 'capture_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/paypal_server_sdk/models/related_identifiers.rb', line 34 def self.optionals %w[ order_id authorization_id capture_id ] end |