shelby_arena 0.0.3 → 0.0.5

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
  SHA256:
3
- metadata.gz: f7c3a359d351954ae3f2aa74a9c71b01c7aaf5dcb976463032a76b434d42c6d5
4
- data.tar.gz: 0bc07eccedb05822ee4be620e58b6031f6bd28d895bfad3bf071d8f52485f7fd
3
+ metadata.gz: d353052cdde7ec70891178e0946d22d53a242bbcb7aa98e1de8ca8c649021a90
4
+ data.tar.gz: 1582fbb7f81ec55893cbea0088ec2f4dc810b29034ca89520e0dd3bea7b7febd
5
5
  SHA512:
6
- metadata.gz: 6474347ea7f7abd2b9f13ea7bde94199d28f34d409ea41fb63ebbf42a82979fb115d36daaff909815eb70300f1d25257e78f224891e157136a93f136c2ad40ad
7
- data.tar.gz: a23547ea3746dc0af2c348b4b49e3191f43e9d2eac8aa39c94930e7a79a7c51b1354acf231745058741e370643612b5f1b918e168616c522e6517d47f9bc307b
6
+ metadata.gz: 8d322d5c437617ac466eb74420c6de6634629850d2f447724ce1a9028340d522333b1375ceb848b39f8eadb61a3aa05377a98e3c0284676884c50f3ddde02db8
7
+ data.tar.gz: 84fe372bb93bb5fc830e4d8a1fbbc0e00b4a9616b303428375a1667e4068f6f3f5386b4aaaf0ca5053b43a3b4a5933e58b2a04840ba32a591f1d98e5c4d7c1b8
@@ -1,7 +1,8 @@
1
1
  module ShelbyArena
2
2
  class Client
3
3
  module Fund
4
- def list_funds(options = {})
4
+ def list_funds
5
+ options = {}
5
6
  options[:api_sig] = generate_api_sig(fund_path, options)
6
7
  res = get(fund_path, options.sort)
7
8
  Response::Fund.format(res.dig('FundListResult', 'Funds', 'Fund'))
@@ -25,14 +25,16 @@ module ShelbyArena
25
25
  def create_person(
26
26
  first_name:,
27
27
  last_name:,
28
- email:
28
+ email:,
29
+ record_status_id: 2
29
30
  )
30
31
  path = 'person/add'
31
32
 
32
33
  body = {
33
34
  'FirstName' => first_name,
34
35
  'LastName' => last_name,
35
- 'Emails' => ['Address' => email]
36
+ 'Emails' => ['Address' => email],
37
+ 'RecordStatusID' => record_status_id,
36
38
  }
37
39
 
38
40
  options = {}
@@ -45,7 +47,8 @@ module ShelbyArena
45
47
  id,
46
48
  first_name: nil,
47
49
  last_name: nil,
48
- email: nil
50
+ email: nil,
51
+ record_status_id: nil
49
52
  )
50
53
  path = "#{people_path(id)}/update"
51
54
 
@@ -54,6 +57,7 @@ module ShelbyArena
54
57
  body['FirstName'] = first_name if first_name
55
58
  body['LastName'] = last_name if last_name
56
59
  body['Emails'] = ['Address' => email] if email
60
+ body['RecordStatusID'] = record_status_id if record_status_id
57
61
 
58
62
  options = {}
59
63
  options[:api_sig] = generate_api_sig(path, options)
@@ -43,7 +43,7 @@ module ShelbyArena
43
43
  end
44
44
 
45
45
  def to_boolean(string)
46
- string.downcase == 'true'
46
+ string&.downcase == 'true'
47
47
  end
48
48
 
49
49
  def date_parse(string)
@@ -13,7 +13,12 @@ module ShelbyArena
13
13
  }.freeze
14
14
 
15
15
  def format_single(data)
16
- to_h(MAP, data)
16
+ response = to_h(MAP, data)
17
+ response[:active] = to_boolean(response[:active])
18
+ response[:is_tax_deductible] = to_boolean(response[:is_tax_deductible])
19
+ response[:start_date] = date_parse(response[:start_date])
20
+ response[:end_date] = date_parse(response[:end_date])
21
+ response
17
22
  end
18
23
  end
19
24
  end
@@ -1,3 +1,3 @@
1
1
  module ShelbyArena
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shelby_arena
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-13 00:00:00.000000000 Z
11
+ date: 2024-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday