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