braze_ruby 0.6.0 → 0.7.0
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 +4 -4
 - data/README.md +11 -1
 - data/lib/braze_ruby/endpoints/campaigns.rb +4 -0
 - data/lib/braze_ruby/rest/trigger_campaign_schedule.rb +18 -0
 - data/lib/braze_ruby/rest.rb +1 -0
 - data/lib/braze_ruby/version.rb +1 -1
 - metadata +3 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 39bc36a3cad69bd3b9bd36df61c45e8052c594ea7533ea7c888cb6978f739adf
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4f01c13fa4bc9cb0ca255d370096bd90b9bf811cee980e60dc62186731b86d5d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c89ff06b6416a93a68a02c360d50cecde4b9132df53e692f7ffd26b259f8d783b3d83d3d78325c5d6b898ae292e3688aa43c83f83ecd2a93d611b4d83424d710
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 51b93002f6521205daf03e196a32f70971b2ad89f8b160c38cbd179e4d813296335979e707e28b0d45242fff54474a961f02f30795ab399baa06eaa0a5eaa13e
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -112,12 +112,22 @@ api.send_messages(messages: messages, segment_id: '<segment-id>') 
     | 
|
| 
       112 
112 
     | 
    
         
             
            api.schedule_messages(send_at: 1.hour.since, messages: messages, external_user_ids: [123, 456])
         
     | 
| 
       113 
113 
     | 
    
         
             
            ```
         
     | 
| 
       114 
114 
     | 
    
         | 
| 
      
 115 
     | 
    
         
            +
            ### Schedule Campaigns
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 118 
     | 
    
         
            +
            api.trigger_campaign_schedule(
         
     | 
| 
      
 119 
     | 
    
         
            +
              campaign_id: 'campaign-id',
         
     | 
| 
      
 120 
     | 
    
         
            +
              recipients: [{ external_user_id: 123 }]
         
     | 
| 
      
 121 
     | 
    
         
            +
              schedule: { time: Time.now.iso8601 }
         
     | 
| 
      
 122 
     | 
    
         
            +
            )
         
     | 
| 
      
 123 
     | 
    
         
            +
            ```
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
       115 
125 
     | 
    
         
             
            ### Send Campaigns
         
     | 
| 
       116 
126 
     | 
    
         | 
| 
       117 
127 
     | 
    
         
             
            ```ruby
         
     | 
| 
       118 
128 
     | 
    
         
             
            api.trigger_campaign_send(
         
     | 
| 
       119 
129 
     | 
    
         
             
              campaign_id: 'campaign-id',
         
     | 
| 
       120 
     | 
    
         
            -
              recipients: [external_user_id: 123, trigger_properties: {first_name: 'John'}]
         
     | 
| 
      
 130 
     | 
    
         
            +
              recipients: [{external_user_id: 123, trigger_properties: { first_name: 'John' }}]
         
     | 
| 
       121 
131 
     | 
    
         
             
            )
         
     | 
| 
       122 
132 
     | 
    
         
             
            ```
         
     | 
| 
       123 
133 
     | 
    
         | 
| 
         @@ -6,6 +6,10 @@ module BrazeRuby 
     | 
|
| 
       6 
6 
     | 
    
         
             
                  def trigger_campaign_send(**payload)
         
     | 
| 
       7 
7 
     | 
    
         
             
                    BrazeRuby::REST::TriggerCampaignSend.new(api_key, braze_url, options, **payload).perform
         
     | 
| 
       8 
8 
     | 
    
         
             
                  end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  def trigger_campaign_schedule(**payload)
         
     | 
| 
      
 11 
     | 
    
         
            +
                    BrazeRuby::REST::TriggerCampaignSchedule.new(api_key, braze_url, options, **payload).perform
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
       9 
13 
     | 
    
         
             
                end
         
     | 
| 
       10 
14 
     | 
    
         
             
              end
         
     | 
| 
       11 
15 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module BrazeRuby
         
     | 
| 
      
 4 
     | 
    
         
            +
              module REST
         
     | 
| 
      
 5 
     | 
    
         
            +
                class TriggerCampaignSchedule < Base
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attr_reader :params
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
                  def initialize(api_key, braze_url, options, **params)
         
     | 
| 
      
 9 
     | 
    
         
            +
                    @params = params
         
     | 
| 
      
 10 
     | 
    
         
            +
                    super api_key, braze_url, options
         
     | 
| 
      
 11 
     | 
    
         
            +
                  end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  def perform
         
     | 
| 
      
 14 
     | 
    
         
            +
                    http.post("/campaigns/trigger/schedule/create", @params)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  end
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/braze_ruby/rest.rb
    CHANGED
    
    | 
         @@ -10,6 +10,7 @@ require "braze_ruby/rest/email_unsubscribes" 
     | 
|
| 
       10 
10 
     | 
    
         
             
            require "braze_ruby/rest/export_users"
         
     | 
| 
       11 
11 
     | 
    
         
             
            require "braze_ruby/rest/list_segments"
         
     | 
| 
       12 
12 
     | 
    
         
             
            require "braze_ruby/rest/delete_users"
         
     | 
| 
      
 13 
     | 
    
         
            +
            require "braze_ruby/rest/trigger_campaign_schedule"
         
     | 
| 
       13 
14 
     | 
    
         
             
            require "braze_ruby/rest/trigger_campaign_send"
         
     | 
| 
       14 
15 
     | 
    
         
             
            require "braze_ruby/rest/trigger_canvas_send"
         
     | 
| 
       15 
16 
     | 
    
         
             
            require "braze_ruby/rest/canvas_details"
         
     | 
    
        data/lib/braze_ruby/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: braze_ruby
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.7.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Josh Nussbaum
         
     | 
| 
         @@ -11,7 +11,7 @@ authors: 
     | 
|
| 
       11 
11 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       13 
13 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       14 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2021-09-29 00:00:00.000000000 Z
         
     | 
| 
       15 
15 
     | 
    
         
             
            dependencies:
         
     | 
| 
       16 
16 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       17 
17 
     | 
    
         
             
              name: faraday
         
     | 
| 
         @@ -200,6 +200,7 @@ files: 
     | 
|
| 
       200 
200 
     | 
    
         
             
            - lib/braze_ruby/rest/subscription_status_set.rb
         
     | 
| 
       201 
201 
     | 
    
         
             
            - lib/braze_ruby/rest/subscription_user_status.rb
         
     | 
| 
       202 
202 
     | 
    
         
             
            - lib/braze_ruby/rest/track_users.rb
         
     | 
| 
      
 203 
     | 
    
         
            +
            - lib/braze_ruby/rest/trigger_campaign_schedule.rb
         
     | 
| 
       203 
204 
     | 
    
         
             
            - lib/braze_ruby/rest/trigger_campaign_send.rb
         
     | 
| 
       204 
205 
     | 
    
         
             
            - lib/braze_ruby/rest/trigger_canvas_send.rb
         
     | 
| 
       205 
206 
     | 
    
         
             
            - lib/braze_ruby/version.rb
         
     |