Class: Paymongo::Entities::Link

Inherits:
BaseEntity show all
Defined in:
lib/paymongo/entities/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Link

Returns a new instance of Link.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/paymongo/entities/link.rb', line 21

def initialize(api_resource)
  @id = api_resource.id
  @amount = api_resource.attributes['amount']
  @archived = api_resource.attributes['archived']
  @checkout_url = api_resource.attributes['checkout_url']
  @currency = api_resource.attributes['currency']
  @description = api_resource.attributes['description']
  @fee = api_resource.attributes['fee']
  @livemode = api_resource.attributes['livemode']
  @payments = api_resource.attributes['payments']
  @reference_number = api_resource.attributes['reference_number']
  @remarks = api_resource.attributes['remarks']
  @status = api_resource.attributes['status']
  @tax_amount = api_resource.attributes['tax_amount']
  @taxes = api_resource.attributes['taxes']
  @created_at = api_resource.attributes['created_at']
  @updated_at = api_resource.attributes['updated_at']
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def amount
  @amount
end

#archivedObject (readonly)

Returns the value of attribute archived.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def archived
  @archived
end

#checkout_urlObject (readonly)

Returns the value of attribute checkout_url.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def checkout_url
  @checkout_url
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def currency
  @currency
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def description
  @description
end

#feeObject (readonly)

Returns the value of attribute fee.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def fee
  @fee
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def livemode
  @livemode
end

#paymentsObject (readonly)

Returns the value of attribute payments.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def payments
  @payments
end

#reference_numberObject (readonly)

Returns the value of attribute reference_number.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def reference_number
  @reference_number
end

#remarksObject (readonly)

Returns the value of attribute remarks.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def remarks
  @remarks
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def status
  @status
end

#tax_amountObject (readonly)

Returns the value of attribute tax_amount.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def tax_amount
  @tax_amount
end

#taxesObject (readonly)

Returns the value of attribute taxes.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def taxes
  @taxes
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/paymongo/entities/link.rb', line 4

def updated_at
  @updated_at
end