Class: Braintree::CustomerRecommendations
- Inherits:
-
Object
- Object
- Braintree::CustomerRecommendations
- Includes:
- BaseModule
- Defined in:
- lib/braintree/graphql/unions/customer_recommendations.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#payment_options ⇒ Object
readonly
Returns the value of attribute payment_options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CustomerRecommendations
constructor
A new instance of CustomerRecommendations.
- #inspect ⇒ Object
Methods included from BaseModule
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.
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 { || PaymentOptions._new() } end end |
Instance Attribute Details
#attrs ⇒ Object (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_options ⇒ Object (readonly)
Returns the value of attribute payment_options.
8 9 10 |
# File 'lib/braintree/graphql/unions/customer_recommendations.rb', line 8 def @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
#inspect ⇒ Object
[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 |