mlins-google-checkout 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/google-checkout/command.rb +25 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
@@ -152,6 +152,31 @@ module GoogleCheckout
|
|
152
152
|
|
153
153
|
end
|
154
154
|
|
155
|
+
##
|
156
|
+
# Tells Google to refund the order.
|
157
|
+
|
158
|
+
class RefundOrder < OrderCommand
|
159
|
+
|
160
|
+
attr_accessor :reason, :comment
|
161
|
+
|
162
|
+
def to_xml
|
163
|
+
raise "Refund amount must be greater than 0!" unless @amount.to_f > 0.0
|
164
|
+
|
165
|
+
xml = Builder::XmlMarkup.new
|
166
|
+
xml.instruct!
|
167
|
+
@xml = xml.tag!('refund-order', {
|
168
|
+
:xmlns => "http://checkout.google.com/schema/2",
|
169
|
+
"google-order-number" => @google_order_number
|
170
|
+
}) do
|
171
|
+
xml.tag!("amount", @amount, {:currency => @currency})
|
172
|
+
xml.tag!("reason", @reason)
|
173
|
+
xml.tag!("comment", @comment)
|
174
|
+
end
|
175
|
+
@xml
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|
179
|
+
|
155
180
|
##
|
156
181
|
# Send a message to the buyer associated with an order.
|
157
182
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mlins-google-checkout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Elmore
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-01-
|
14
|
+
date: 2009-01-20 00:00:00 -08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|