Class: AdyenApIs::UpdateSplitConfigurationRuleRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/adyen_ap_is/models/update_split_configuration_rule_request.rb

Overview

UpdateSplitConfigurationRuleRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(currency:, funding_source:, payment_method:, shopper_interaction:) ⇒ UpdateSplitConfigurationRuleRequest

Returns a new instance of UpdateSplitConfigurationRuleRequest.



71
72
73
74
75
76
77
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 71

def initialize(currency:, funding_source:, payment_method:,
               shopper_interaction:)
  @currency = currency
  @funding_source = funding_source
  @payment_method = payment_method
  @shopper_interaction = shopper_interaction
end

Instance Attribute Details

#currencyString

The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](en.wikipedia.org/wiki/ISO_4217).

Returns:

  • (String)


16
17
18
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 16

def currency
  @currency
end

#funding_sourceString

The funding source of the payment method. Possible values:

  • credit

  • debit

  • prepaid

  • deferred_debit

  • charged

  • ANY

Returns:

  • (String)


27
28
29
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 27

def funding_source
  @funding_source
end

#payment_methodString

The payment method condition that defines whether the split logic applies. Possible values:

  • [Payment method

variant](docs.adyen.com/development-resources/paymentmethodvariant ): Apply the split logic for a specific payment method.

  • ANY: Apply the split logic for all available payment methods.

Returns:

  • (String)


36
37
38
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 36

def payment_method
  @payment_method
end

#shopper_interactionString

The sales channel condition that defines whether the split logic applies. Possible values:

  • Ecommerce: Online transactions where the cardholder is present.

  • ContAuth: Card on file and/or subscription transactions, where the

cardholder is known to the merchant (returning customer).

  • Moto: Mail-order and telephone-order transactions where the customer

is in contact with the merchant via email or telephone.

  • POS: Point-of-sale transactions where the customer is physically

present to make a payment using a secure payment terminal.

  • ANY: All sales channels.

Returns:

  • (String)


49
50
51
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 49

def shopper_interaction
  @shopper_interaction
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 80

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  currency = hash.key?('currency') ? hash['currency'] : nil
  funding_source = hash.key?('fundingSource') ? hash['fundingSource'] : nil
  payment_method = hash.key?('paymentMethod') ? hash['paymentMethod'] : nil
  shopper_interaction =
    hash.key?('shopperInteraction') ? hash['shopperInteraction'] : nil

  # Create object from extracted values.
  UpdateSplitConfigurationRuleRequest.new(currency: currency,
                                          funding_source: funding_source,
                                          payment_method: payment_method,
                                          shopper_interaction: shopper_interaction)
end

.namesObject

A mapping from model property names to API property names.



52
53
54
55
56
57
58
59
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 52

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['currency'] = 'currency'
  @_hash['funding_source'] = 'fundingSource'
  @_hash['payment_method'] = 'paymentMethod'
  @_hash['shopper_interaction'] = 'shopperInteraction'
  @_hash
end

.nullablesObject

An array for nullable fields



67
68
69
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 67

def self.nullables
  []
end

.optionalsObject

An array for optional fields



62
63
64
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 62

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



105
106
107
108
109
110
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 105

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} currency: #{@currency.inspect}, funding_source: #{@funding_source.inspect},"\
  " payment_method: #{@payment_method.inspect}, shopper_interaction:"\
  " #{@shopper_interaction.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



98
99
100
101
102
# File 'lib/adyen_ap_is/models/update_split_configuration_rule_request.rb', line 98

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} currency: #{@currency}, funding_source: #{@funding_source}, payment_method:"\
  " #{@payment_method}, shopper_interaction: #{@shopper_interaction}>"
end