mailchimp_api 1.0.0.pre.6 → 1.0.0.pre.7

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: 4f39ab5b1f0b8340f76f84d126e3c2cdcbb4bb037ef29fe0875eb6621b8b5056
4
- data.tar.gz: 1d4e70caa229e9a7bf0993455dd231fed9c50b8b815a4357fab41f56c51cd60c
3
+ metadata.gz: fea228ec4a58be19a447166064e3e33dd0a7b8ffb9c94acbfd287dc4003a87cc
4
+ data.tar.gz: 191338f5c88aa58ccc9dd63cbea8441fc7443d251617e534c4e2e56e10c16033
5
5
  SHA512:
6
- metadata.gz: 608774ea171df026573f5897e393fb303df219e9309ab9fc12dafe79df0003254eb00841e4a3fabf2b62bddbec683cd8eaa37e98a6ad9ded062427631668a6f3
7
- data.tar.gz: 65f89da40b9bfdb7ec23d181d5a7480fb95065f7a4c97e833c8af4f564ac16dc25fb2b9254c1c2457a2b302ff235757731d5f1abdcba2b69a6274a7041d327fb
6
+ metadata.gz: 8f74c01ffdd941263f349d2981917a6674027b881548e476ac7a5195e496691042d4ecfa4eda618ea67f7d0c9f03f9cf99e1d8cd8507f251933498e5acbe1941
7
+ data.tar.gz: 66ef7623bc4a8ce9aaf3206f8d269822cf1df8a40607e642d78755b6ad0cfc976ad69c2ca9f27687a435a04a48ea7eac107c7ba3d76531fc3e4cfe13c34bc533
data/CHANGELOG.md CHANGED
@@ -10,5 +10,6 @@
10
10
  - Support of '/lists/<id>/members'
11
11
  - Support of '/lists/<id>/members/<id>/notes'
12
12
  - Support of '/lists/<id>/segments'
13
- - `.count` support
14
13
  - Support of '/lists/<id>/merge-fields'
14
+ - Support of '/lists/<id>/signup-forms'
15
+ - `.count` support
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MailchimpAPI::CollectionParsers
4
+ class SignupForm < Base
5
+ end
6
+ end
@@ -9,5 +9,6 @@ module MailchimpAPI
9
9
  has_many :interest_categories, class_name: 'MailchimpAPI::InterestCategory'
10
10
  has_many :members, class_name: 'MailchimpAPI::Member'
11
11
  has_many :merge_fields, class_name: 'MailchimpAPI::MergeField'
12
+ has_many :signup_forms, class_name: 'MailchimpAPI::SignupForm'
12
13
  end
13
14
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MailchimpAPI
4
+ class SignupForm < Base
5
+ extend MailchimpAPI::Support::Countable
6
+
7
+ include MailchimpAPI::Support::PostUpdate
8
+
9
+ self.collection_parser = CollectionParsers::SignupForm
10
+
11
+ self.prefix = '/3.0/lists/:list_id/'
12
+ self.element_name = 'signup-form'
13
+ self.collection_name = 'signup-forms'
14
+ end
15
+ end
@@ -4,7 +4,7 @@ module MailchimpAPI::Support
4
4
  module PatchUpdate
5
5
  protected
6
6
 
7
- # Overridden - use patch instead of put for an update.
7
+ # Overridden - use PATCH instead of PUT for an update.
8
8
  def update
9
9
  run_callbacks :update do
10
10
  connection.patch(element_path(prefix_options), encode, self.class.headers).tap do |response|
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MailchimpAPI::Support
4
+ module PostUpdate
5
+ protected
6
+
7
+ # Overridden - use POST instead of PUT for an update.
8
+ def update
9
+ run_callbacks :update do
10
+ connection.post(element_path(prefix_options), encode, self.class.headers).tap do |response|
11
+ load_attributes_from_response(response)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MailchimpAPI
4
- VERSION = '1.0.0.pre.6'
4
+ VERSION = '1.0.0.pre.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailchimp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.6
4
+ version: 1.0.0.pre.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - rewind.io
@@ -186,6 +186,7 @@ files:
186
186
  - lib/mailchimp_api/collection_parsers/merge_field.rb
187
187
  - lib/mailchimp_api/collection_parsers/note.rb
188
188
  - lib/mailchimp_api/collection_parsers/segment.rb
189
+ - lib/mailchimp_api/collection_parsers/signup_form.rb
189
190
  - lib/mailchimp_api/configuration.rb
190
191
  - lib/mailchimp_api/connection.rb
191
192
  - lib/mailchimp_api/detailed_log_subscriber.rb
@@ -202,8 +203,10 @@ files:
202
203
  - lib/mailchimp_api/resources/merge_field.rb
203
204
  - lib/mailchimp_api/resources/note.rb
204
205
  - lib/mailchimp_api/resources/segment.rb
206
+ - lib/mailchimp_api/resources/signup_form.rb
205
207
  - lib/mailchimp_api/resources/support/countable.rb
206
208
  - lib/mailchimp_api/resources/support/patch_update.rb
209
+ - lib/mailchimp_api/resources/support/post_update.rb
207
210
  - lib/mailchimp_api/session.rb
208
211
  - lib/mailchimp_api/version.rb
209
212
  homepage: https://github.com/rewindio/mailchimp_api.git