Class: Braintree::Modification

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/modification.rb

Direct Known Subclasses

AddOn, Discount

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) ⇒ Modification

Returns a new instance of Modification.



25
26
27
28
# File 'lib/braintree/modification.rb', line 25

def initialize(attributes)
  set_instance_variables_from_hash(attributes)
  @amount = Util.to_big_decimal(amount)
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



5
6
7
# File 'lib/braintree/modification.rb', line 5

def amount
  @amount
end

#created_atObject (readonly)

Returns the value of attribute created_at.



6
7
8
# File 'lib/braintree/modification.rb', line 6

def created_at
  @created_at
end

#current_billing_cycleObject (readonly)

Returns the value of attribute current_billing_cycle.



7
8
9
# File 'lib/braintree/modification.rb', line 7

def current_billing_cycle
  @current_billing_cycle
end

#descriptionObject (readonly)

Returns the value of attribute description.



8
9
10
# File 'lib/braintree/modification.rb', line 8

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/braintree/modification.rb', line 9

def id
  @id
end

#kindObject (readonly)

Returns the value of attribute kind.



10
11
12
# File 'lib/braintree/modification.rb', line 10

def kind
  @kind
end

#merchant_idObject (readonly)

Returns the value of attribute merchant_id.



11
12
13
# File 'lib/braintree/modification.rb', line 11

def merchant_id
  @merchant_id
end

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/braintree/modification.rb', line 12

def name
  @name
end

#never_expiresObject (readonly)

Returns the value of attribute never_expires.



13
14
15
# File 'lib/braintree/modification.rb', line 13

def never_expires
  @never_expires
end

#number_of_billing_cyclesObject (readonly)

Returns the value of attribute number_of_billing_cycles.



14
15
16
# File 'lib/braintree/modification.rb', line 14

def number_of_billing_cycles
  @number_of_billing_cycles
end

#quantityObject (readonly)

Returns the value of attribute quantity.



15
16
17
# File 'lib/braintree/modification.rb', line 15

def quantity
  @quantity
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



16
17
18
# File 'lib/braintree/modification.rb', line 16

def updated_at
  @updated_at
end

Class Method Details

._new(*args) ⇒ Object



20
21
22
# File 'lib/braintree/modification.rb', line 20

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

Instance Method Details

#never_expires?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/braintree/modification.rb', line 30

def never_expires?
  @never_expires
end