Class: VisaAcceptanceMergedSpec::AuthorizationOptions5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::AuthorizationOptions5
- Defined in:
- lib/visa_acceptance_merged_spec/models/authorization_options5.rb
Overview
AuthorizationOptions5 Model.
Instance Attribute Summary collapse
-
#auth_type ⇒ String
Authorization type.
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(auth_type: SKIP, additional_properties: nil) ⇒ AuthorizationOptions5
constructor
A new instance of AuthorizationOptions5.
-
#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(auth_type: SKIP, additional_properties: nil) ⇒ AuthorizationOptions5
Returns a new instance of AuthorizationOptions5.
56 57 58 59 60 61 62 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 56 def initialize(auth_type: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @auth_type = auth_type unless auth_type == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#auth_type ⇒ String
Authorization type. Possible values:
AUTOCAPTURE: automatic capture.STANDARDCAPTURE: standard capture.VERBAL: forced capture. Include it in the payment request for a forced capture. Include it in the capture request for a verbal payment.
Asia, Middle East, and Africa Gateway; Cielo; Comercio Latino; and
Visa Acceptance Latin American Processing
Set this field to AUTOCAPTURE and include it in a bundled request to
indicate that you are requesting an automatic capture. If your account is
configured to enable automatic captures, set this field to
STANDARDCAPTURE and include it in a standard authorization or bundled
request to indicate that you are overriding an automatic capture.
Forced Capture
Set this field to VERBAL and include it in the authorization request to
indicate that you are performing a forced capture; therefore, you receive
the authorization code outside the Visa Acceptance system.
Verbal Authorization
Set this field to VERBAL and include it in the capture request to
indicate that the request is for a verbal authorization.
for PayPal ptsV2CreateOrderPost400Response
Set this field to 'AUTHORIZE' or 'CAPTURE' depending on whether you want to invoke delayed capture or sale respectively.
35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 35 def auth_type @auth_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth_type = hash.key?('authType') ? hash['authType'] : 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. AuthorizationOptions5.new(auth_type: auth_type, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['auth_type'] = 'authType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 45 def self.optionals %w[ auth_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth_type: #{@auth_type.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/visa_acceptance_merged_spec/models/authorization_options5.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth_type: #{@auth_type}, additional_properties:"\ " #{@additional_properties}>" end |