stbaldricks 6.7.0 → 6.8.0.alpha.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
2
  SHA256:
3
- metadata.gz: a9444388a7374d58a458fc309c8e0f9fdc92183dbd026a966a1a32cfaec9ff70
4
- data.tar.gz: 3a56cc6ebdfb44cecef132d26f13384e44f79b9e153b4a5bd4a7a9128be8a2af
3
+ metadata.gz: 587eb5dc1c37d82bfd809f55e24a0ff2df895debffa1fa84bc920dfe9c681845
4
+ data.tar.gz: 10eb1ad1603f14db4d3fd46ed649f9b3f93d0307b2c1bc4040e9d6b815008005
5
5
  SHA512:
6
- metadata.gz: a9cbcd4e8a41064e7f7db285e244892c348376a963db2270095e318cac361931a38b11f97f24f2df08c955ac23c89eafe6998bdc50790c19526089c98cd29083
7
- data.tar.gz: c6f0a9174cab0ef55b4add354bbe9d02bf4bbb7b0f7b9c1992da9799fea6e78f7776a2eac1e2520ce8e3497b6c7ee843d470a86d7c23a5cf2cf3a04f1cd0b506
6
+ metadata.gz: 318634e04116d3418b6aac09673429206cd71c4dca71b3fabcf85c8d4e4d0ce1ed0dc9f3f7746f98128fc3f113d72bf94993f941629e93f039c9dd2d630462bc
7
+ data.tar.gz: 992a15a35434fc0d41f9bf83b490a679f702515e35d4200e6eb2cfad6487ec68f8f167949d90fbc1e065da3490ccb8101f6a58b410e92444d41204bee3fc89c2
@@ -0,0 +1,32 @@
1
+ require 'stbaldricks/endpoints/lib/entity'
2
+
3
+ module SBF
4
+ module Client
5
+ class DeduplicatorMatchEndpoint < SBF::Client::EntityEndpoint
6
+ def checkout(filter = [], order = {}, limit = 20, offset = 0, with = {})
7
+ filter = filter.to_json unless filter.is_a? String
8
+ order = order.to_json unless order.is_a? String
9
+ with = normalize_with(with)
10
+
11
+ response = SBF::Client::Api::Request.get_request(
12
+ "/#{SBF::Client::Api::VERSION}/deduplicator_match/checkout",
13
+ filter: filter, order: order, limit: limit, offset: offset, with: with
14
+ )
15
+ parsed_response_body = JSON.parse(response.body).symbolize!
16
+
17
+ if ok?(response)
18
+ parsed_response_body[:results].map! { |entity_data| target_class.new(entity_data, true) }
19
+ SBF::Client::EntityCollection.new(parsed_response_body[:results], parsed_response_body[:total_count])
20
+ else
21
+ parsed_response_body = JSON.parse(response.body).symbolize!
22
+ error = SBF::Client::ErrorEntity.new(parsed_response_body)
23
+ SBF::Client::Api::Response.new(http_code: response.code, data: parsed_response_body[:data], error: error)
24
+ collection = SBF::Client::EntityCollection.new
25
+ collection.add_errors(error)
26
+ collection.errors_http_code = response.code
27
+ collection
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,37 @@
1
+ require 'stbaldricks/entities/lib/base'
2
+ require 'stbaldricks/entities/lib/top_level'
3
+ require 'stbaldricks/entities/lib/default_cacheable'
4
+ require 'stbaldricks/entities/person'
5
+ require 'stbaldricks/entities/organization'
6
+ require 'stbaldricks/endpoints/deduplicator_match'
7
+
8
+ module SBF
9
+ module Client
10
+ class DeduplicatorMatch < SBF::Client::TopLevelEntity
11
+ actions DEFAULT_CRUD_ACTIONS
12
+ blacklist_action :get
13
+ blacklist_action :find
14
+ blacklist_action :save
15
+ blacklist_action :create
16
+ blacklist_action :delete
17
+ blacklist_action :aggregate
18
+ action :checkout
19
+
20
+ module Status
21
+ READY = 'ready'
22
+ CHECKED_OUT = 'checked_out'
23
+ COMPLETED = 'completed'
24
+ ERROR_OUT_OF_SYNC_ADD = 'error_out_of_sync_add'
25
+ ERROR_OUT_OF_SYNC_UPDATE = 'error_out_of_sync_update'
26
+ end
27
+
28
+ attr_accessor :id
29
+ attr_accessor :checkout_id
30
+ attr_accessor :status_id
31
+ attr_accessor :date_created
32
+ attr_accessor :date_modified
33
+ entity_collection_attr_accessor :persons, 'SBF::Client::FullPerson', nil, true
34
+ entity_collection_attr_accessor :organizations, 'SBF::Client::FullOrganization', nil, true
35
+ end
36
+ end
37
+ end
@@ -14,6 +14,7 @@ module SBF
14
14
  action :find
15
15
  action :find_first
16
16
  action :update
17
+ action :save
17
18
 
18
19
  disallow_instantiation
19
20
 
@@ -65,6 +65,11 @@ module SBF
65
65
  entity_attr_accessor :primary, 'SBF::Client::ProfileEmailAddress'
66
66
  entity_attr_accessor :secondary, 'SBF::Client::ProfileEmailAddress'
67
67
  end
68
+
69
+ class Totals < SBF::Client::BaseEntity
70
+ attr_reader :amount_raised
71
+ attr_reader :donations
72
+ end
68
73
  end
69
74
 
70
75
  class PartialOrganization < SBF::Client::Organization
@@ -95,6 +100,7 @@ module SBF
95
100
  attr_reader :created_at, :modified_at
96
101
  attr_accessor :modified_by
97
102
  attr_accessor :how_created
103
+ entity_attr_reader :totals, 'SBF::Client::Organization::Totals', nil, true
98
104
 
99
105
  def active?
100
106
  status == SBF::Client::Organization::Status::ACTIVE
@@ -355,6 +355,11 @@ module SBF
355
355
  end
356
356
  end
357
357
 
358
+ class Totals < SBF::Client::BaseEntity
359
+ attr_reader :amount_raised
360
+ attr_reader :donations
361
+ end
362
+
358
363
  def league_status_title
359
364
  case league_status
360
365
  when SBF::Client::LeagueStatus::SQUIRE
@@ -401,6 +406,7 @@ module SBF
401
406
  attr_reader :created_at, :modified_at
402
407
  attr_accessor :modified_by
403
408
  attr_accessor :how_created
409
+ entity_attr_reader :totals, 'SBF::Client::Person::Totals', nil, true
404
410
 
405
411
  def active?
406
412
  status == SBF::Client::Person::Status::ACTIVE
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '6.7.0'
3
+ VERSION = '6.8.0.alpha.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stbaldricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.7.0
4
+ version: 6.8.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-02 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -89,6 +89,7 @@ files:
89
89
  - lib/stbaldricks/endpoints/communicate.rb
90
90
  - lib/stbaldricks/endpoints/config.rb
91
91
  - lib/stbaldricks/endpoints/contact.rb
92
+ - lib/stbaldricks/endpoints/deduplicator_match.rb
92
93
  - lib/stbaldricks/endpoints/event.rb
93
94
  - lib/stbaldricks/endpoints/facebook/user.rb
94
95
  - lib/stbaldricks/endpoints/fund.rb
@@ -122,6 +123,7 @@ files:
122
123
  - lib/stbaldricks/entities/contact.rb
123
124
  - lib/stbaldricks/entities/contact_group.rb
124
125
  - lib/stbaldricks/entities/deduplicator_history.rb
126
+ - lib/stbaldricks/entities/deduplicator_match.rb
125
127
  - lib/stbaldricks/entities/disease.rb
126
128
  - lib/stbaldricks/entities/document_library.rb
127
129
  - lib/stbaldricks/entities/document_library_category.rb
@@ -234,12 +236,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
236
  version: '0'
235
237
  required_rubygems_version: !ruby/object:Gem::Requirement
236
238
  requirements:
237
- - - ">="
239
+ - - ">"
238
240
  - !ruby/object:Gem::Version
239
- version: '0'
241
+ version: 1.3.1
240
242
  requirements: []
241
243
  rubyforge_project:
242
- rubygems_version: 2.7.7
244
+ rubygems_version: 2.7.8
243
245
  signing_key:
244
246
  specification_version: 4
245
247
  summary: St. Baldrick's Foundation Ruby Client Library