apruve 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/LICENSE.txt +17 -18
- data/lib/apruve/resources/line_item.rb +1 -1
- data/lib/apruve/resources/payment_request.rb +11 -12
- data/lib/apruve/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) 2014, Apruve
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Apruve
|
2
2
|
class LineItem < Apruve::ApruveObject
|
3
|
-
attr_accessor :id, :title, :amount_cents, :price_ea_cents, :quantity, :description,
|
3
|
+
attr_accessor :id, :title, :amount_cents, :price_ea_cents, :quantity, :description, :merchant_notes,
|
4
4
|
:variant_info, :sku, :vendor, :view_product_url, :plan_code, :line_item_api_url,
|
5
5
|
:subscription_url
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Apruve
|
2
2
|
class PaymentRequest < Apruve::ApruveObject
|
3
|
-
attr_accessor :id, :merchant_id, :merchant_order_id, :status, :amount_cents, :tax_cents,
|
3
|
+
attr_accessor :id, :merchant_id, :merchant_order_id, :status, :amount_cents, :currency, :tax_cents,
|
4
4
|
:shipping_cents, :line_items, :api_url, :view_url, :created_at, :updated_at
|
5
5
|
|
6
6
|
def self.find(id)
|
@@ -36,18 +36,17 @@ module Apruve
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def value_string
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
str
|
39
|
+
# add each field in the PR
|
40
|
+
str = "#{self.merchant_id}#{self.merchant_order_id}#{self.amount_cents}#{self.currency}#{self.tax_cents}#{self.shipping_cents}"
|
41
|
+
|
42
|
+
# add the line items
|
43
|
+
self.line_items.each do |item|
|
44
|
+
str += "#{item.title}#{item.plan_code}#{item.amount_cents}#{item.price_ea_cents}"\
|
45
|
+
"#{item.quantity}#{item.merchant_notes}#{item.description}#{item.variant_info}#{item.sku}"\
|
46
|
+
"#{item.vendor}#{item.view_product_url}"
|
49
47
|
end
|
50
|
-
|
48
|
+
|
49
|
+
str
|
51
50
|
end
|
52
51
|
|
53
52
|
def secure_hash
|
data/lib/apruve/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apruve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-05-
|
13
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|