Skip to content

Version 4.0.0

Compare
Choose a tag to compare
@jdennes jdennes released this 19 Feb 11:24
· 98 commits to master since this release
  • Removed CreateSend::CreateSend#apikey to promote using OAuth rather than basic auth with an API key.
  • Started using the https://api.createsend.com/api/v3.1/ API endpoint.
  • Added support for new segments structure.
    • Create and Update calls now require the new rule_groups structure, instead of a rules structure.

      CreateSend::Segment.create(auth, list_id, title, rule_groups)
      CreateSend::Segment.update(title, rule_groups)

      So for example, when you previously would have created an argument like so:

      rules = [ { :Subject => "EmailAddress", :Clauses => [ "CONTAINS example.com" ] } ]

      You would now do this:

      rule_groups = [ { :Rules => [ { :RuleType => "EmailAddress", :Clause => "CONTAINS example.com" } ] } ]
    • The Add Rule call is now Add Rule Group, taking a collection of rules in a single rule_group argument instead of separate subject & clauses arguments.

      CreateSend::Segment.add_rule_group(rule_group)

      So for example, when you previously would have added a rule like so:

      @segment.add_rule "EmailAddress", [ "CONTAINS example.com" ]

      You would now do this:

      @segment.add_rule_group [ { :RuleType => "EmailAddress", :Clause => "CONTAINS @hello.com" } ]