Class: Worldline::Connect::SDK::V1::Domain::PaymentProductGroup
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::V1::Domain::PaymentProductGroup
- Defined in:
- lib/worldline/connect/sdk/v1/domain/payment_product_group.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#accounts_on_file ⇒ Array<Worldline::Connect::SDK::V1::Domain::AccountOnFile>
The current value of accounts_on_file.
-
#allows_click_to_pay ⇒ true/false
The current value of allows_click_to_pay.
-
#allows_installments ⇒ true/false
The current value of allows_installments.
-
#click_to_pay_configuration ⇒ Worldline::Connect::SDK::V1::Domain::ClickToPayConfiguration
The current value of click_to_pay_configuration.
-
#device_fingerprint_enabled ⇒ true/false
The current value of device_fingerprint_enabled.
-
#display_hints ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductDisplayHints
The current value of display_hints.
-
#fields ⇒ Array<Worldline::Connect::SDK::V1::Domain::PaymentProductField>
The current value of fields.
-
#id ⇒ String
The current value of id.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#accounts_on_file ⇒ Array<Worldline::Connect::SDK::V1::Domain::AccountOnFile>
Returns the current value of accounts_on_file.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def accounts_on_file @accounts_on_file end |
#allows_click_to_pay ⇒ true/false
Returns the current value of allows_click_to_pay.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def allows_click_to_pay @allows_click_to_pay end |
#allows_installments ⇒ true/false
Returns the current value of allows_installments.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def allows_installments @allows_installments end |
#click_to_pay_configuration ⇒ Worldline::Connect::SDK::V1::Domain::ClickToPayConfiguration
Returns the current value of click_to_pay_configuration.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def click_to_pay_configuration @click_to_pay_configuration end |
#device_fingerprint_enabled ⇒ true/false
Returns the current value of device_fingerprint_enabled.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def device_fingerprint_enabled @device_fingerprint_enabled end |
#display_hints ⇒ Worldline::Connect::SDK::V1::Domain::PaymentProductDisplayHints
Returns the current value of display_hints.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def display_hints @display_hints end |
#fields ⇒ Array<Worldline::Connect::SDK::V1::Domain::PaymentProductField>
Returns the current value of fields.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def fields @fields end |
#id ⇒ String
Returns the current value of id.
24 25 26 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 24 def id @id end |
Instance Method Details
#from_hash(hash) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 56 def from_hash(hash) super if hash.has_key? 'accountsOnFile' raise TypeError, "value '%s' is not an Array" % [hash['accountsOnFile']] unless hash['accountsOnFile'].is_a? Array @accounts_on_file = [] hash['accountsOnFile'].each do |e| @accounts_on_file << Worldline::Connect::SDK::V1::Domain::AccountOnFile.new_from_hash(e) end end if hash.has_key? 'allowsClickToPay' @allows_click_to_pay = hash['allowsClickToPay'] end if hash.has_key? 'allowsInstallments' @allows_installments = hash['allowsInstallments'] end if hash.has_key? 'clickToPayConfiguration' raise TypeError, "value '%s' is not a Hash" % [hash['clickToPayConfiguration']] unless hash['clickToPayConfiguration'].is_a? Hash @click_to_pay_configuration = Worldline::Connect::SDK::V1::Domain::ClickToPayConfiguration.new_from_hash(hash['clickToPayConfiguration']) end if hash.has_key? 'deviceFingerprintEnabled' @device_fingerprint_enabled = hash['deviceFingerprintEnabled'] end if hash.has_key? 'displayHints' raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash @display_hints = Worldline::Connect::SDK::V1::Domain::PaymentProductDisplayHints.new_from_hash(hash['displayHints']) end if hash.has_key? 'fields' raise TypeError, "value '%s' is not an Array" % [hash['fields']] unless hash['fields'].is_a? Array @fields = [] hash['fields'].each do |e| @fields << Worldline::Connect::SDK::V1::Domain::PaymentProductField.new_from_hash(e) end end if hash.has_key? 'id' @id = hash['id'] end end |
#to_h ⇒ Hash
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/worldline/connect/sdk/v1/domain/payment_product_group.rb', line 43 def to_h hash = super hash['accountsOnFile'] = @accounts_on_file.collect{|val| val.to_h} unless @accounts_on_file.nil? hash['allowsClickToPay'] = @allows_click_to_pay unless @allows_click_to_pay.nil? hash['allowsInstallments'] = @allows_installments unless @allows_installments.nil? hash['clickToPayConfiguration'] = @click_to_pay_configuration.to_h unless @click_to_pay_configuration.nil? hash['deviceFingerprintEnabled'] = @device_fingerprint_enabled unless @device_fingerprint_enabled.nil? hash['displayHints'] = @display_hints.to_h unless @display_hints.nil? hash['fields'] = @fields.collect{|val| val.to_h} unless @fields.nil? hash['id'] = @id unless @id.nil? hash end |