booker_api 0.0.20 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6a552f1cfffff2a179c6160f6c909cc22006d74
4
- data.tar.gz: 20f018dcff6515edd3236a656d34107d667c9356
3
+ metadata.gz: 007e7379e9c2117443ab5a14d733284717413ded
4
+ data.tar.gz: d12911009c0607d781dcae0fb22078045cd794ef
5
5
  SHA512:
6
- metadata.gz: 5ed6b31815bc040c89941538e52946bc78605c1970970b81a81a0fbdea844cdbe59d4949a0b6c893db47c2bcd5262c3556ecd362602017168e963bfce9f1da8f
7
- data.tar.gz: cb156b2213ed15c31825572eed434b3b480f936e87669cb8c1425c31c280fa0d9f434688e2170798a563e4692a1ac9efae51e766dc93b642e43eb30de00cb1c5
6
+ metadata.gz: 1b8aaf2b9b79df5b9c550d7dc11f38dc780404f84c526f8c2591c21f6734100b5360526523e6f11236e6eeb8f2b656f9d1167ef9ebaf432740d951331deafa7e
7
+ data.tar.gz: c6d718a994318b0bf29dbb6c67b388d5f33135665d8211d83185fe8acd56608f51450ea018b57a6edc53253fe07514fb2861270e0eb7f4b3d203267e017de690
@@ -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
@@ -24,10 +24,12 @@ module Booker
24
24
  ],
25
25
  "AppointmentPayment" => {
26
26
  "PaymentItem" => {
27
- "CreditCard" => credit_card,
28
- "Method" => {
29
- "ID" => 1
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
  },
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '0.0.20'
2
+ VERSION = '0.0.22'
3
3
  end
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.20
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: 2016-12-13 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty