Class: Braintree::CustomerRecommendations

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/graphql/unions/customer_recommendations.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(attributes) ⇒ CustomerRecommendations

Returns a new instance of CustomerRecommendations.

[View source]

10
11
12
13
14
15
16
17
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 10

def initialize(attributes)
    @attrs = [:payment_options]
    if attributes.nil?
        @payment_options = []
    else
        @payment_options = (attributes[:paymentOptions] || []).map { |payment_options_hash| PaymentOptions._new(payment_options_hash) }
    end
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.


7
8
9
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 7

def attrs
  @attrs
end

#payment_optionsObject (readonly)

Returns the value of attribute payment_options.


8
9
10
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 8

def payment_options
  @payment_options
end

Class Method Details

._new(*args) ⇒ Object

[View source]

28
29
30
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 28

def self._new(*args)
    self.new(*args)
end

Instance Method Details

#inspectObject

[View source]

19
20
21
22
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 19

def inspect
    inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" }
    "#<#{self.class} #{inspected_attributes.join(" ")}>"
end