Class: Braintree::CustomerRecommendationsPayload
- Inherits:
-
Object
- Object
- Braintree::CustomerRecommendationsPayload
- Includes:
- BaseModule
- Defined in:
- lib/braintree/graphql/types/customer_recommendations_payload.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#is_in_paypal_network ⇒ Object
readonly
Returns the value of attribute is_in_paypal_network.
-
#recommendations ⇒ Object
readonly
Returns the value of attribute recommendations.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ CustomerRecommendationsPayload
constructor
A new instance of CustomerRecommendationsPayload.
- #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) ⇒ CustomerRecommendationsPayload
Returns a new instance of CustomerRecommendationsPayload.
11 12 13 14 15 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 11 def initialize(attributes) @attrs = [:is_in_paypal_network, :recommendations] @is_in_paypal_network = attributes[:isInPayPalNetwork] if attributes[:isInPayPalNetwork] @recommendations = CustomerRecommendations._new(attributes[:recommendations]) if attributes[:recommendations] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
7 8 9 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 7 def attrs @attrs end |
#is_in_paypal_network ⇒ Object (readonly)
Returns the value of attribute is_in_paypal_network.
8 9 10 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 8 def is_in_paypal_network @is_in_paypal_network end |
#recommendations ⇒ Object (readonly)
Returns the value of attribute recommendations.
9 10 11 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 9 def recommendations @recommendations end |
Class Method Details
._new(*args) ⇒ Object
26 27 28 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 26 def self._new(*args) self.new(*args) end |
Instance Method Details
#inspect ⇒ Object
17 18 19 20 |
# File 'lib/braintree/graphql/types/customer_recommendations_payload.rb', line 17 def inspect inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" } "#<#{self.class} #{inspected_attributes.join(" ")}>" end |