Class: VisaAcceptanceMergedSpec::CaptureMandate
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::CaptureMandate
- Defined in:
- lib/visa_acceptance_merged_spec/models/capture_mandate.rb
Overview
CaptureMandate Model.
Instance Attribute Summary collapse
-
#billing_type ⇒ String
Configure Unified Checkout to capture billing address information.
-
#combo_card ⇒ TrueClass | FalseClass
Configure Unified Checkout to display combo card at checkout.
A combo debit/credit card is a single card that functions both as a Debit/Credit card. -
#cpf ⇒ TrueClass | FalseClass
Configure Unified Checkout to display and capture the CPF number (Cadastro de Pessoas Físicas).
-
#request_email ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer email address.
-
#request_phone ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer phone number.
-
#request_save_card ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the "Save card for future use" checkbox.
Configurable check box that will show in a Manual card entry flow to allow a Cardholder to give consent to store their manually entered credential with the Merchant that they are paying.
Applicable when manually entering the details and not enrolling in Click to Pay. -
#request_shipping ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer shipping details.
-
#ship_to_countries ⇒ Array[String]
List of countries available to ship to.
-
#show_accepted_network_icons ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the list of accepted card networks beneath the payment button Possible values: - True - False.
-
#show_confirmation_step ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the final confirmation screen when using Click to Pay.
Where 'BillingType'= NONE and 'requestShipping'= FALSE and the customer is using an existing Click to Pay card as their chosen payment method, a final confirmation screen can be removed allowing the customer to check out as soon as they have selected their payment method from within their Click to Pay card tray.
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(billing_type: SKIP, request_email: SKIP, request_phone: SKIP, request_shipping: SKIP, ship_to_countries: SKIP, show_accepted_network_icons: SKIP, show_confirmation_step: SKIP, request_save_card: SKIP, combo_card: SKIP, cpf: SKIP, additional_properties: nil) ⇒ CaptureMandate
constructor
A new instance of CaptureMandate.
-
#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(billing_type: SKIP, request_email: SKIP, request_phone: SKIP, request_shipping: SKIP, ship_to_countries: SKIP, show_accepted_network_icons: SKIP, show_confirmation_step: SKIP, request_save_card: SKIP, combo_card: SKIP, cpf: SKIP, additional_properties: nil) ⇒ CaptureMandate
Returns a new instance of CaptureMandate.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 177 def initialize(billing_type: SKIP, request_email: SKIP, request_phone: SKIP, request_shipping: SKIP, ship_to_countries: SKIP, show_accepted_network_icons: SKIP, show_confirmation_step: SKIP, request_save_card: SKIP, combo_card: SKIP, cpf: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @billing_type = billing_type unless billing_type == SKIP @request_email = request_email unless request_email == SKIP @request_phone = request_phone unless request_phone == SKIP @request_shipping = request_shipping unless request_shipping == SKIP @ship_to_countries = ship_to_countries unless ship_to_countries == SKIP unless show_accepted_network_icons == SKIP @show_accepted_network_icons = show_accepted_network_icons end @show_confirmation_step = show_confirmation_step unless show_confirmation_step == SKIP @request_save_card = request_save_card unless request_save_card == SKIP @combo_card = combo_card unless combo_card == SKIP @cpf = cpf unless cpf == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#billing_type ⇒ String
Configure Unified Checkout to capture billing address information. Possible values:
- FULL: Capture complete billing address information.
- PARTIAL: Capture first name, last name, country and postal/zip code only.
- NONE: Capture only first name and last name.
19 20 21 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 19 def billing_type @billing_type end |
#combo_card ⇒ TrueClass | FalseClass
Configure Unified Checkout to display combo card at checkout.
A combo debit/credit card is a single card that functions both as a
Debit/Credit card.
Unified Checkout / Click to Pay Drop-in UI allows the Cardholder to choose
whether they would like the transaction to be paid for using either debit
or credit card.
Important: This is applicable to Visa cards only.
Possible values:
- True
- False
Use Cases: Offer Combo Card at Checkout: - Include the captureMandate.comboCard field in the capture context request and set it to true.
- When set to true, Combo Card selection is shown at checkout
Do not offer Combo Card at Checkout: - Include the captureMandate.comboCard field in the capture context request and set it to false OR omit the field from the capture context request.
- The Combo Card selection is not shown at checkout.
117 118 119 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 117 def combo_card @combo_card end |
#cpf ⇒ TrueClass | FalseClass
Configure Unified Checkout to display and capture the CPF number (Cadastro de Pessoas Físicas). The CPF number is a unique 11-digit identifier issued to Brazilian citizens and residents for tax purposes. Possible values:
- True
- False
This field is optional.
If set to true the field is required. If set to false the field is optional. If the field is not included in the capture context then it is not captured.
Important: - If PANENTRY is specified in the allowedPaymentTypes field, the CPF number will be displayed in Unified Checkout regardless of what card number is entered.
- If CLICKTOPAY is specified in the allowedPaymentTypes field, the CPF number will be displayed in Unified Checkout only when a Visa Click To Pay card is entered.
138 139 140 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 138 def cpf @cpf end |
#request_email ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer email address. Possible values:
- True
- False
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 26 def request_email @request_email end |
#request_phone ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer phone number. Possible values:
- True
- False
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 33 def request_phone @request_phone end |
#request_save_card ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the "Save card for future use"
checkbox.
Configurable check box that will show in a Manual card entry flow to allow
a Cardholder to give consent to store their manually entered credential
with the Merchant that they are paying.
Applicable when manually entering the details and not enrolling in Click
to Pay.
Possible values:
- True
- False
Use Cases: Offer consumers option to save their card in Unified Checkout: - Include the captureMandate.requestSaveCard field in the capture context request and set it to true.
- When set to true, this will show a checkbox with the message ‘Save card for future use’ in Unified Checkout.
- When selected this provides a response in both the Transient Token and
Get Credentials API response.
Do not offer consumers the option to save their card in Unified Checkout: - Include the captureMandate.requestSaveCard field in the capture context request and set it to false OR omit the field from the capture context request.
- When set to false, the save card option is not shown to consumers when manually entering card details.
94 95 96 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 94 def request_save_card @request_save_card end |
#request_shipping ⇒ TrueClass | FalseClass
Configure Unified Checkout to capture customer shipping details. Possible values:
- True
- False
40 41 42 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 40 def request_shipping @request_shipping end |
#ship_to_countries ⇒ Array[String]
List of countries available to ship to.
Use the two-character ISO Standard Country Codes.
45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 45 def ship_to_countries @ship_to_countries end |
#show_accepted_network_icons ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the list of accepted card networks beneath the payment button Possible values:
- True
- False
53 54 55 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 53 def show_accepted_network_icons @show_accepted_network_icons end |
#show_confirmation_step ⇒ TrueClass | FalseClass
Configure Unified Checkout to display the final confirmation screen when
using Click to Pay.
Where 'BillingType'= NONE and 'requestShipping'= FALSE and the customer is
using an existing Click to Pay card as their chosen payment method, a
final confirmation screen can be removed allowing the customer to check
out as soon as they have selected their payment method from within their
Click to Pay card tray.
Possible values:
- True
- False
66 67 68 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 66 def show_confirmation_step @show_confirmation_step end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 202 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. billing_type = hash.key?('billingType') ? hash['billingType'] : SKIP request_email = hash.key?('requestEmail') ? hash['requestEmail'] : SKIP request_phone = hash.key?('requestPhone') ? hash['requestPhone'] : SKIP request_shipping = hash.key?('requestShipping') ? hash['requestShipping'] : SKIP ship_to_countries = hash.key?('shipToCountries') ? hash['shipToCountries'] : SKIP show_accepted_network_icons = hash.key?('showAcceptedNetworkIcons') ? hash['showAcceptedNetworkIcons'] : SKIP show_confirmation_step = hash.key?('showConfirmationStep') ? hash['showConfirmationStep'] : SKIP request_save_card = hash.key?('requestSaveCard') ? hash['requestSaveCard'] : SKIP combo_card = hash.key?('comboCard') ? hash['comboCard'] : SKIP cpf = hash.key?('CPF') ? hash['CPF'] : 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. CaptureMandate.new(billing_type: billing_type, request_email: request_email, request_phone: request_phone, request_shipping: request_shipping, ship_to_countries: ship_to_countries, show_accepted_network_icons: show_accepted_network_icons, show_confirmation_step: show_confirmation_step, request_save_card: request_save_card, combo_card: combo_card, cpf: cpf, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 141 def self.names @_hash = {} if @_hash.nil? @_hash['billing_type'] = 'billingType' @_hash['request_email'] = 'requestEmail' @_hash['request_phone'] = 'requestPhone' @_hash['request_shipping'] = 'requestShipping' @_hash['ship_to_countries'] = 'shipToCountries' @_hash['show_accepted_network_icons'] = 'showAcceptedNetworkIcons' @_hash['show_confirmation_step'] = 'showConfirmationStep' @_hash['request_save_card'] = 'requestSaveCard' @_hash['combo_card'] = 'comboCard' @_hash['cpf'] = 'CPF' @_hash end |
.nullables ⇒ Object
An array for nullable fields
173 174 175 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 173 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 157 def self.optionals %w[ billing_type request_email request_phone request_shipping ship_to_countries show_accepted_network_icons show_confirmation_step request_save_card combo_card cpf ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
255 256 257 258 259 260 261 262 263 264 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 255 def inspect class_name = self.class.name.split('::').last "<#{class_name} billing_type: #{@billing_type.inspect}, request_email:"\ " #{@request_email.inspect}, request_phone: #{@request_phone.inspect}, request_shipping:"\ " #{@request_shipping.inspect}, ship_to_countries: #{@ship_to_countries.inspect},"\ " show_accepted_network_icons: #{@show_accepted_network_icons.inspect},"\ " show_confirmation_step: #{@show_confirmation_step.inspect}, request_save_card:"\ " #{@request_save_card.inspect}, combo_card: #{@combo_card.inspect}, cpf: #{@cpf.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
244 245 246 247 248 249 250 251 252 |
# File 'lib/visa_acceptance_merged_spec/models/capture_mandate.rb', line 244 def to_s class_name = self.class.name.split('::').last "<#{class_name} billing_type: #{@billing_type}, request_email: #{@request_email},"\ " request_phone: #{@request_phone}, request_shipping: #{@request_shipping},"\ " ship_to_countries: #{@ship_to_countries}, show_accepted_network_icons:"\ " #{@show_accepted_network_icons}, show_confirmation_step: #{@show_confirmation_step},"\ " request_save_card: #{@request_save_card}, combo_card: #{@combo_card}, cpf: #{@cpf},"\ " additional_properties: #{@additional_properties}>" end |