Class: Payrex::Entities::PaymentMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/payment_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ PaymentMethod

Returns a new instance of PaymentMethod.



13
14
15
16
17
18
19
20
21
22
# File 'lib/entities/payment_method.rb', line 13

def initialize(api_resource)
  @id = api_resource.data["id"]
  @resource = api_resource.data["resource"]
  @type = api_resource.data["type"]
  @billing_details = api_resource.data["billing_details"]
  @livemode = api_resource.data["livemode"]
   = api_resource.data["metadata"]
  @created_at = api_resource.data["created_at"]
  @updated_at = api_resource.data["updated_at"]
end

Instance Attribute Details

#billing_detailsObject (readonly)

Returns the value of attribute billing_details.



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

def billing_details
  @billing_details
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



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

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  
end

#resourceObject (readonly)

Returns the value of attribute resource.



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

def resource
  @resource
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end