Class: PaypalServerSdk::PaymentMethodPreference
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::PaymentMethodPreference
- Defined in:
- lib/paypal_server_sdk/models/payment_method_preference.rb
Overview
The customer and merchant payment preferences.
Instance Attribute Summary collapse
-
#payee_preferred ⇒ PayeePaymentMethodPreference
The merchant-preferred payment methods.
-
#standard_entry_class_code ⇒ StandardEntryClassCode
NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a 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(payee_preferred: PayeePaymentMethodPreference::UNRESTRICTED, standard_entry_class_code: StandardEntryClassCode::WEB) ⇒ PaymentMethodPreference
constructor
A new instance of PaymentMethodPreference.
Methods inherited from BaseModel
Constructor Details
#initialize(payee_preferred: PayeePaymentMethodPreference::UNRESTRICTED, standard_entry_class_code: StandardEntryClassCode::WEB) ⇒ PaymentMethodPreference
Returns a new instance of PaymentMethodPreference.
48 49 50 51 52 53 54 55 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 48 def initialize(payee_preferred: PayeePaymentMethodPreference::UNRESTRICTED, standard_entry_class_code: StandardEntryClassCode::WEB) @payee_preferred = payee_preferred unless payee_preferred == SKIP unless standard_entry_class_code == SKIP @standard_entry_class_code = standard_entry_class_code end end |
Instance Attribute Details
#payee_preferred ⇒ PayeePaymentMethodPreference
The merchant-preferred payment methods.
14 15 16 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 14 def payee_preferred @payee_preferred end |
#standard_entry_class_code ⇒ StandardEntryClassCode
NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes.
25 26 27 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 25 def standard_entry_class_code @standard_entry_class_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. payee_preferred = hash['payee_preferred'] ||= PayeePaymentMethodPreference::UNRESTRICTED standard_entry_class_code = hash['standard_entry_class_code'] ||= StandardEntryClassCode::WEB # Create object from extracted values. PaymentMethodPreference.new(payee_preferred: payee_preferred, standard_entry_class_code: standard_entry_class_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['payee_preferred'] = 'payee_preferred' @_hash['standard_entry_class_code'] = 'standard_entry_class_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 |
# File 'lib/paypal_server_sdk/models/payment_method_preference.rb', line 36 def self.optionals %w[ payee_preferred standard_entry_class_code ] end |