Class: Braintree::PaymentOptions

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/graphql/types/payment_options.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) ⇒ 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

#attrsObject (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_optionObject (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

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

#inspectObject



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