PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.5.4
JetFormBuilder — Dynamic Blocks Form Builder v3.5.4
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / modules / actions-v2 / get-response / api / create-contact-action.php
jetformbuilder / modules / actions-v2 / get-response / api Last commit date
action-factory.php 1 year ago base-api-action.php 1 year ago create-contact-action.php 1 year ago get-custom-fields-action.php 1 year ago get-lists-action.php 1 year ago
create-contact-action.php
112 lines
1 <?php
2
3 namespace JFB_Modules\Actions_V2\Get_Response\Api;
4
5 class Create_Contact_Action extends Base_Api_Action {
6
7 protected $method = 'POST';
8
9 private $list_id = '';
10 private $email = '';
11 private $name = '';
12 private $day_of_cycle = '';
13 private $custom_fields = array();
14
15 public function action_endpoint() {
16 return 'contacts';
17 }
18
19 public function action_body() {
20 return array(
21 'campaign' => array(
22 'campaignId' => $this->get_list_id(),
23 ),
24 'email' => $this->get_email(),
25 'name' => $this->get_name(),
26 'customFieldValues' => $this->get_custom_fields(),
27 'dayOfCycle' => (int) $this->get_day_of_cycle(),
28 );
29 }
30
31
32
33 public function add_custom_field( string $name, $value ) {
34 $this->custom_fields[] = array(
35 'customFieldId' => $name,
36 'value' => array( $value ),
37 );
38 }
39
40 /**
41 * @param string $list_id
42 */
43 public function set_list_id( string $list_id ) {
44 $this->list_id = $list_id;
45 }
46
47 /**
48 * @return string
49 */
50 public function get_list_id(): string {
51 return $this->list_id;
52 }
53
54 /**
55 * @param array $custom_fields
56 */
57 public function set_custom_fields( array $custom_fields ) {
58 $this->custom_fields = $custom_fields;
59 }
60
61 /**
62 * @return array
63 */
64 public function get_custom_fields(): array {
65 return $this->custom_fields;
66 }
67
68 /**
69 * @return string
70 */
71 public function get_email(): string {
72 return $this->email;
73 }
74
75 /**
76 * @param string $email
77 */
78 public function set_email( string $email ) {
79 $this->email = $email;
80 }
81
82 /**
83 * @return string
84 */
85 public function get_name(): string {
86 return $this->name;
87 }
88
89 /**
90 * @param string $name
91 */
92 public function set_name( string $name ) {
93 $this->name = $name;
94 }
95
96 /**
97 * @param string $day_of_cycle
98 */
99 public function set_day_of_cycle( string $day_of_cycle ) {
100 $this->day_of_cycle = $day_of_cycle;
101 }
102
103 /**
104 * @return string
105 */
106 public function get_day_of_cycle(): string {
107 return $this->day_of_cycle;
108 }
109
110
111 }
112