Class: VisaAcceptanceMergedSpec::SellerProtection3
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::SellerProtection3
- Defined in:
- lib/visa_acceptance_merged_spec/models/seller_protection3.rb
Overview
SellerProtection3 Model.
Instance Attribute Summary collapse
-
#eligibilty ⇒ String
The level of seller protection in force for the transaction.
-
#type ⇒ String
The kind of seller protection in force for the transaction.
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(eligibilty: SKIP, type: SKIP, additional_properties: nil) ⇒ SellerProtection3
constructor
A new instance of SellerProtection3.
-
#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(eligibilty: SKIP, type: SKIP, additional_properties: nil) ⇒ SellerProtection3
Returns a new instance of SellerProtection3.
52 53 54 55 56 57 58 59 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 52 def initialize(eligibilty: SKIP, type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @eligibilty = eligibilty unless eligibilty == SKIP @type = type unless type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#eligibilty ⇒ String
The level of seller protection in force for the transaction. Possible values:
ELIGIBLEPARTIALLY_ELIGIBLEINELIGIBLE
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 18 def eligibilty @eligibilty end |
#type ⇒ String
The kind of seller protection in force for the transaction. This field is returned only when the protection eligibility is set to ELIGIBLE or PARTIALLY_ELIGIBLE. Possible values:
ITEM_NOT_RECEIVED_ELIGIBLE: Sellers are protected against claims for items not received.UNAUTHORIZED_PAYMENT_ELIGIBLE: Sellers are protected against claims for unauthorized payments.One or both values can be returned.
29 30 31 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 29 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. eligibilty = hash.key?('eligibilty') ? hash['eligibilty'] : SKIP type = hash.key?('type') ? hash['type'] : 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. SellerProtection3.new(eligibilty: eligibilty, type: type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['eligibilty'] = 'eligibilty' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 40 def self.optionals %w[ eligibilty type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} eligibilty: #{@eligibilty.inspect}, type: #{@type.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/visa_acceptance_merged_spec/models/seller_protection3.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} eligibilty: #{@eligibilty}, type: #{@type}, additional_properties:"\ " #{@additional_properties}>" end |