Class: Webirr::Bill

Inherits:
Object
  • Object
show all
Defined in:
lib/webirr/bill.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def amount
  @amount
end

#bill_referenceObject

Returns the value of attribute bill_reference.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def bill_reference
  @bill_reference
end

#customer_codeObject

Returns the value of attribute customer_code.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def customer_code
  @customer_code
end

#customer_nameObject

Returns the value of attribute customer_name.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def customer_name
  @customer_name
end

#customer_phoneObject

Returns the value of attribute customer_phone.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def customer_phone
  @customer_phone
end

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def description
  @description
end

#extrasObject

Returns the value of attribute extras.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def extras
  @extras
end

#merchant_idObject

Returns the value of attribute merchant_id.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def merchant_id
  @merchant_id
end

#timeObject

Returns the value of attribute time.



7
8
9
# File 'lib/webirr/bill.rb', line 7

def time
  @time
end

Instance Method Details

#as_json(_options = {}) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/webirr/bill.rb', line 17

def as_json(_options = {})
  {
    customerCode: @customer_code,
    customerName: @customer_name,
    customerPhone: @customer_phone,
    amount: @amount,
    description: @description,
    billReference: @bill_reference,
    merchantID: @merchant_id,
    time: @time,
    extras: @extras
  }
end

#to_json(*options) ⇒ Object



31
32
33
# File 'lib/webirr/bill.rb', line 31

def to_json(*options)
  as_json(*options).to_json(*options)
end