booker_api 0.0.20 → 0.0.22
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.
- checksums.yaml +4 -4
- data/lib/booker/business_rest.rb +15 -2
- data/lib/booker/customer_rest.rb +6 -4
- data/lib/booker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 007e7379e9c2117443ab5a14d733284717413ded
|
4
|
+
data.tar.gz: d12911009c0607d781dcae0fb22078045cd794ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b8aaf2b9b79df5b9c550d7dc11f38dc780404f84c526f8c2591c21f6734100b5360526523e6f11236e6eeb8f2b656f9d1167ef9ebaf432740d951331deafa7e
|
7
|
+
data.tar.gz: c6d718a994318b0bf29dbb6c67b388d5f33135665d8211d83185fe8acd56608f51450ea018b57a6edc53253fe07514fb2861270e0eb7f4b3d203267e017de690
|
data/lib/booker/business_rest.rb
CHANGED
@@ -108,6 +108,10 @@ module Booker
|
|
108
108
|
response = get "/location/#{booker_location_id}/feature_settings", build_params
|
109
109
|
Booker::Models::FeatureSettings.from_hash response['FeatureSettings']
|
110
110
|
end
|
111
|
+
|
112
|
+
def get_location_payment_settings(booker_location_id:)
|
113
|
+
get "/location/#{booker_location_id}/payment_settings", build_params
|
114
|
+
end
|
111
115
|
|
112
116
|
def get_appointment(appointment_id)
|
113
117
|
get "/appointment/#{appointment_id}", build_params
|
@@ -133,14 +137,23 @@ module Booker
|
|
133
137
|
}, params)
|
134
138
|
end
|
135
139
|
|
136
|
-
def add_cash_payment(order_id, params: {})
|
140
|
+
def add_cash_payment(order_id, amount, params: {})
|
137
141
|
post "/order/#{order_id}/add_payment", build_params({
|
138
142
|
"PaymentItem" => {
|
143
|
+
"Cash" => {},
|
139
144
|
"Method" => {
|
140
145
|
"ID" => 4
|
141
|
-
}
|
146
|
+
},
|
147
|
+
"Amount" => amount
|
142
148
|
}
|
143
149
|
}, params)
|
144
150
|
end
|
151
|
+
|
152
|
+
def remove_payment(order_id, payment_id, params: {})
|
153
|
+
post "/order/#{order_id}/remove_payment", build_params({
|
154
|
+
"PaymentItemIDs" => [payment_id],
|
155
|
+
"ID" => 4
|
156
|
+
}, params)
|
157
|
+
end
|
145
158
|
end
|
146
159
|
end
|
data/lib/booker/customer_rest.rb
CHANGED
@@ -24,10 +24,12 @@ module Booker
|
|
24
24
|
],
|
25
25
|
"AppointmentPayment" => {
|
26
26
|
"PaymentItem" => {
|
27
|
-
"CreditCard" => credit_card,
|
28
|
-
"Method" => {
|
29
|
-
|
30
|
-
}
|
27
|
+
# "CreditCard" => credit_card,
|
28
|
+
# "Method" => {
|
29
|
+
# "ID" => 1
|
30
|
+
# },
|
31
|
+
"CustomPaymentMethodID" => 1,
|
32
|
+
"CustomPaymentMethodIDSpecified" => true
|
31
33
|
},
|
32
34
|
"CouponCode" => coupon_code
|
33
35
|
},
|
data/lib/booker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: booker_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AbeCole
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|