Class: Payrex::Entities::Customer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Customer

Returns a new instance of Customer.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/entities/customer.rb', line 15

def initialize(api_resource)
  data = api_resource.data

  @id = data["id"]
  @billing_statement_prefix = data["billing_statement_prefix"]
  @currency = data["currency"]
  @email = data["email"]
  @livemode = data["livemode"]
  @name = data["name"]
   = data["metadata"]
  @next_billing_statement_sequence_number = data["next_billing_statement_sequence_number"]
  @created_at = data["created_at"]
  @updated_at = data["updated_at"]
end

Instance Attribute Details

#billing_statement_prefixObject (readonly)

Returns the value of attribute billing_statement_prefix.



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

def billing_statement_prefix
  @billing_statement_prefix
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



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

def currency
  @currency
end

#emailObject (readonly)

Returns the value of attribute email.



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

def email
  @email
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



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

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#next_billing_statement_sequence_numberObject (readonly)

Returns the value of attribute next_billing_statement_sequence_number.



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

def next_billing_statement_sequence_number
  @next_billing_statement_sequence_number
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end