Class: VisaAcceptanceMergedSpec::ServiceFeeDescriptor
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ServiceFeeDescriptor
- Defined in:
- lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb
Overview
ServiceFeeDescriptor Model.
Instance Attribute Summary collapse
-
#contact ⇒ String
Contact information for the service provider that is collecting the service fee.
-
#name ⇒ String
Name of the service provider that is collecting the service fee.
-
#state ⇒ String
State or territory in which the service provider is located.
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(name: SKIP, contact: SKIP, state: SKIP, additional_properties: nil) ⇒ ServiceFeeDescriptor
constructor
A new instance of ServiceFeeDescriptor.
-
#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(name: SKIP, contact: SKIP, state: SKIP, additional_properties: nil) ⇒ ServiceFeeDescriptor
Returns a new instance of ServiceFeeDescriptor.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 76 def initialize(name: SKIP, contact: SKIP, state: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @contact = contact unless contact == SKIP @state = state unless state == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#contact ⇒ String
Contact information for the service provider that is collecting the service fee. when you include more than one consecutive space, extra spaces are removed. When you do not include this value in your request, Visa Acceptance uses the value that is in your Visa Acceptance account. This value might be displayed on the cardholder’s statement.
44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 44 def contact @contact end |
#name ⇒ String
Name of the service provider that is collecting the service fee. The service provider name must consist of 3, 7, or 12 characters followed by an asterisk (*). This value must also include the words “Service Fee.” When you include more than one consecutive space, extra spaces are removed. Use one of the following formats for this value:
- <3-character name>*Service Fee
- <7-character name>*Service Fee
- <12-character name>*Service Fee When payments are made in installments, this value must also include installment information such as “1 of 5” or “3 of 7.” For installment payments, use one of the following formats for this value:
- <3-character name>Service Fee
of - <7-character name>Service Fee
of - <12-character name>Service Fee
of where is the payment number and is the total number of payments. When you do not include this value in your request, Visa Acceptance uses the value that is in your Visa Acceptance account. This value might be displayed on the cardholder’s statement.
35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 35 def name @name end |
#state ⇒ String
State or territory in which the service provider is located. When you do not include this value in your request, Visa Acceptance uses the value that is in your Visa Acceptance account. This value might be displayed on the cardholder’s statement.
51 52 53 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 51 def state @state end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP contact = hash.key?('contact') ? hash['contact'] : SKIP state = hash.key?('state') ? hash['state'] : 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. ServiceFeeDescriptor.new(name: name, contact: contact, state: state, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['contact'] = 'contact' @_hash['state'] = 'state' @_hash end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 72 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
63 64 65 66 67 68 69 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 63 def self.optionals %w[ name contact state ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
118 119 120 121 122 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 118 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, contact: #{@contact.inspect}, state:"\ " #{@state.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
111 112 113 114 115 |
# File 'lib/visa_acceptance_merged_spec/models/service_fee_descriptor.rb', line 111 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, contact: #{@contact}, state: #{@state},"\ " additional_properties: #{@additional_properties}>" end |