mpower 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -51,10 +51,10 @@ When a returnURL is not set, MPower will redirect the customer to the receipt pa
51
51
 
52
52
  co = MPower::Checkout::Invoice.new
53
53
 
54
- Params for addItem function `add_item(name_of_item,quantity,unit_price,total_price)`
54
+ Params for addItem function `add_item(name_of_item,quantity,unit_price,total_price,optional_description)`
55
55
 
56
56
  co.add_item("13' Apple Retina 500 HDD",1,999.99,999.99)
57
- co.add_item("Case Logic laptop Bag",2,100.50,201)
57
+ co.add_item("Case Logic laptop Bag",2,100.50,201,"My optional item description")
58
58
  co.add_item("Mordecai's Bag",2,100.50,400)
59
59
 
60
60
  ## Set the total amount to be charged ! Important
@@ -68,9 +68,9 @@ Params for addItem function `add_item(name_of_item,quantity,unit_price,total_pri
68
68
 
69
69
  ## You can add custom data to your invoice which can be called back later
70
70
 
71
- co.custom_data["Firstname"] = "Alfred"
72
- co.custom_data["Lastname"] = "Rowe"
73
- co.custom_data["CartId"] = 929292872
71
+ co.add_custom_data("Firstname","Alfred")
72
+ co.add_custom_data("Lastname","Rowe")
73
+ co.add_custom_data("CartId",929292872)
74
74
 
75
75
  ## Redirecting to your checkout invoice page
76
76
 
@@ -18,13 +18,14 @@ module MPower
18
18
  end
19
19
 
20
20
  # Adds invoice items to the @items hash, the idea is to allow this function to be used in a loop
21
- def add_item(name,quantity,unit_price,total_price)
21
+ def add_item(name,quantity,unit_price,total_price,description="")
22
22
  @items.merge!({
23
23
  :"item_#{@items.size}" => {
24
24
  :name => name,
25
25
  :quantity => quantity,
26
26
  :unit_price => unit_price,
27
- :total_price => total_price
27
+ :total_price => total_price,
28
+ :description => description
28
29
  }
29
30
  })
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module MPower
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mpower
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-02 00:00:00.000000000 Z
12
+ date: 2012-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client