fishbowl 1.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fishbowl/requests/make_payment.rb +32 -0
- data/lib/fishbowl/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d19ab01cc4985f080ac26eda680a01a02c15b278172ffc4f18d2b6c6090c3de
|
4
|
+
data.tar.gz: a24fcb59434941c7af2a4747b91eb09d0e4e7293cd11a50d8885080dc62e94af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd3cc10062e90203f9a688548b344221684e84f02fe90561435913d825b0fe27fdd8026935636b7b424693783ee3accda60fef44a61e8cdedf2125ad18cada71
|
7
|
+
data.tar.gz: 29e6eaa2e0be585ce71138b2e62748721a58bc43f2e8fc267c5d750559ce376d3ba538479d1a3be757c07b66528460139be249c9a4d6217f03ef3567de33653b
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fishbowl::Requests
|
2
|
+
def self.make_payment(options)
|
3
|
+
# options = options.symbolize_keys
|
4
|
+
#
|
5
|
+
%w{amount so_number payment_method}.each do |required_field|
|
6
|
+
raise ArgumentError if options[required_field.to_sym].nil?
|
7
|
+
end
|
8
|
+
|
9
|
+
request = format_payment(options)
|
10
|
+
Fishbowl::Objects::BaseObject.new.send_request(request, 'MakePaymentRs')
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def self.format_payment(payment)
|
16
|
+
Nokogiri::XML::Builder.new do |xml|
|
17
|
+
xml.request {
|
18
|
+
xml.MakePaymentRq {
|
19
|
+
xml.Payment {
|
20
|
+
xml.Amount payment[:amount] unless payment[:amount].nil?
|
21
|
+
xml.SalesOrderNumber payment[:so_number] unless payment[:so_number].nil?
|
22
|
+
xml.PaymentDate payment[:payment_date] unless payment[:payment_date].nil?
|
23
|
+
xml.PaymentMethod payment[:payment_method] unless payment[:payment_method].nil?
|
24
|
+
xml.TransactionID payment[:transaction_id] unless payment[:transaction_id].nil?
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
data/lib/fishbowl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fishbowl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Thompson, Simeon Berns
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- lib/fishbowl/requests/get_work_order_list.rb
|
76
76
|
- lib/fishbowl/requests/inventory_quantity.rb
|
77
77
|
- lib/fishbowl/requests/load_sales_order.rb
|
78
|
+
- lib/fishbowl/requests/make_payment.rb
|
78
79
|
- lib/fishbowl/requests/save_sales_order.rb
|
79
80
|
- lib/fishbowl/requests/total_inventory.rb
|
80
81
|
- lib/fishbowl/requests/void_sales_order.rb
|
@@ -212,7 +213,7 @@ files:
|
|
212
213
|
homepage: https://github.com/zion/fishbowl
|
213
214
|
licenses: []
|
214
215
|
metadata: {}
|
215
|
-
post_install_message:
|
216
|
+
post_install_message:
|
216
217
|
rdoc_options: []
|
217
218
|
require_paths:
|
218
219
|
- lib
|
@@ -227,9 +228,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
228
|
- !ruby/object:Gem::Version
|
228
229
|
version: '0'
|
229
230
|
requirements: []
|
230
|
-
rubyforge_project:
|
231
|
-
rubygems_version: 2.7.
|
232
|
-
signing_key:
|
231
|
+
rubyforge_project:
|
232
|
+
rubygems_version: 2.7.10
|
233
|
+
signing_key:
|
233
234
|
specification_version: 4
|
234
235
|
summary: Fishbowl Inventory API
|
235
236
|
test_files:
|