booker_ruby 3.3.0 → 3.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: baa1179ff8f6f934316e1849d5ec77cbe91c0ef354bdf9fd09462b3bc56a3ac0
4
- data.tar.gz: d13597a26e4ad8326deb2f232ee25e41d64f70cadfe04da21c26d7f0788c71d7
2
+ SHA1:
3
+ metadata.gz: 86ea689c2f4f3db659384cd9c329821689369b8c
4
+ data.tar.gz: 66ecdf8afcc4d54d3f41b37d29743852aa0741b6
5
5
  SHA512:
6
- metadata.gz: 607ec644480ca71e6410be7a753905b8a143422f70387ffe9875266008d1a2370615de8d66091acf9c287526d35b4006fbe39a180a9fcc61f3743169ab874ca7
7
- data.tar.gz: f13133e4057d454af4785e65fc1c2c0f62c9ba51d80f8026d362ae74016a0df2c9e7744cea72cbb9e4b4da5c4a451e299ec1f5fb4626e50a993690ef6285ad19
6
+ metadata.gz: fb28f44db00af0aff0563a3f33143718ee9d19f59d2d0ab974b69014009a3ce3afa45c92e2772ce56b9b829977b10672ddb6c2d6993b47334311c5fd090bacb9
7
+ data.tar.gz: 79d3f281881f7d2deca16a655493cf0cb12c0279d96fa0bae0f02e91b558b51bb56663291ef8cb6638ee90a0d56753b5b3e92555fac2f304e4a2b0a63bb0851d
@@ -132,6 +132,8 @@ module Booker
132
132
  customer_response = customer(id: id, model: nil)
133
133
 
134
134
  if customer_response.present? && customer = customer_response["Customer"]
135
+ # extract the minimum required fields to send back
136
+ customer["Customer"] = extract_default_customer_fields(customer["Customer"])
135
137
  customer["Customer"].merge!(update_params)
136
138
  customer["LocationID"] = self.location_id
137
139
  put("#{V41_PREFIX}/customer/#{id}", build_params(customer))
@@ -139,6 +141,10 @@ module Booker
139
141
 
140
142
  end
141
143
 
144
+ def extract_default_customer_fields(customer_attributes)
145
+ customer_attributes.slice("Email", "FirstName", "LastName", "HomePhone", "WorkPhone", "CellPhone")
146
+ end
147
+
142
148
  def create_special(location_id:, start_date:, end_date:, coupon_code:, name:, params: {})
143
149
  post(API_METHODS[:create_special], build_params({
144
150
  LocationID: location_id,
@@ -1,3 +1,3 @@
1
1
  module Booker
2
- VERSION = '3.3.0'
2
+ VERSION = '3.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  requirements: []
236
236
  rubyforge_project:
237
- rubygems_version: 2.7.6
237
+ rubygems_version: 2.6.14
238
238
  signing_key:
239
239
  specification_version: 4
240
240
  summary: Ruby client for the Booker API - https://developers.booker.com