mints 0.0.28 → 0.0.29

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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client.rb +287 -385
  3. data/lib/contact/config/appointments.rb +201 -0
  4. data/lib/contact/config/config.rb +7 -0
  5. data/lib/contact/content/content.rb +7 -0
  6. data/lib/contact/content/conversations.rb +121 -0
  7. data/lib/contact/ecommerce/ecommerce.rb +12 -0
  8. data/lib/contact/ecommerce/order_items.rb +19 -0
  9. data/lib/contact/ecommerce/order_items_groups.rb +95 -0
  10. data/lib/contact/ecommerce/orders.rb +133 -0
  11. data/lib/contact.rb +54 -603
  12. data/lib/errors.rb +3 -1
  13. data/lib/generators/mints_assets_controller.rb +4 -1
  14. data/lib/generators/mints_contact_controller.rb +4 -1
  15. data/lib/generators/mints_files_generator.rb +16 -13
  16. data/lib/generators/mints_link.rb +7 -4
  17. data/lib/generators/mints_public_controller.rb +4 -1
  18. data/lib/generators/mints_user_controller.rb +3 -0
  19. data/lib/generators/short_link_controller.rb +4 -1
  20. data/lib/mints/controllers/admin_base_controller.rb +5 -3
  21. data/lib/mints/controllers/base_api_controller.rb +6 -4
  22. data/lib/mints/controllers/base_controller.rb +5 -3
  23. data/lib/mints/controllers/concerns/mints_clients.rb +4 -2
  24. data/lib/mints/controllers/concerns/read_config_file.rb +3 -1
  25. data/lib/mints/controllers/contact_api_controller.rb +12 -10
  26. data/lib/mints/controllers/public_api_controller.rb +10 -8
  27. data/lib/mints/controllers/user_api_controller.rb +11 -9
  28. data/lib/mints/helpers/contact_auth_helper.rb +3 -1
  29. data/lib/mints/helpers/mints_helper.rb +39 -38
  30. data/lib/mints/helpers/proxy_controllers_methods.rb +24 -24
  31. data/lib/mints/helpers/user_auth_helper.rb +5 -3
  32. data/lib/mints.rb +12 -10
  33. data/lib/pub.rb +35 -53
  34. data/lib/user/config/api_keys.rb +63 -61
  35. data/lib/user/config/appointments.rb +217 -215
  36. data/lib/user/config/attribute_groups.rb +74 -72
  37. data/lib/user/config/attributes.rb +83 -81
  38. data/lib/user/config/calendars.rb +88 -86
  39. data/lib/user/config/config.rb +31 -63
  40. data/lib/user/config/public_folders.rb +105 -104
  41. data/lib/user/config/relationships.rb +135 -132
  42. data/lib/user/config/roles.rb +76 -79
  43. data/lib/user/config/seeds.rb +52 -51
  44. data/lib/user/config/system_settings.rb +50 -49
  45. data/lib/user/config/tags.rb +57 -59
  46. data/lib/user/config/taxonomies.rb +115 -119
  47. data/lib/user/config/teams.rb +2 -0
  48. data/lib/user/config/users.rb +2 -0
  49. data/lib/user/contacts/contacts.rb +2 -0
  50. data/lib/user/content/assets.rb +3 -3
  51. data/lib/user/content/content.rb +224 -223
  52. data/lib/user/content/content_instances.rb +4 -2
  53. data/lib/user/content/content_templates.rb +2 -0
  54. data/lib/user/content/conversations.rb +2 -0
  55. data/lib/user/content/dam.rb +2 -0
  56. data/lib/user/content/forms.rb +2 -0
  57. data/lib/user/content/message_templates.rb +2 -0
  58. data/lib/user/content/messages.rb +2 -0
  59. data/lib/user/content/pages.rb +4 -2
  60. data/lib/user/content/stories.rb +3 -3
  61. data/lib/user/content/story_templates.rb +5 -3
  62. data/lib/user/content/story_versions.rb +2 -0
  63. data/lib/user/crm/companies.rb +3 -1
  64. data/lib/user/crm/contacts.rb +2 -0
  65. data/lib/user/crm/crm.rb +2 -0
  66. data/lib/user/crm/deals.rb +2 -0
  67. data/lib/user/crm/favorites.rb +2 -0
  68. data/lib/user/crm/segments.rb +2 -0
  69. data/lib/user/crm/users.rb +2 -0
  70. data/lib/user/crm/workflow_step_objects.rb +2 -0
  71. data/lib/user/crm/workflow_steps.rb +2 -0
  72. data/lib/user/crm/workflows.rb +2 -0
  73. data/lib/user/ecommerce/ecommerce.rb +2 -0
  74. data/lib/user/ecommerce/item_prices.rb +2 -0
  75. data/lib/user/ecommerce/locations.rb +2 -0
  76. data/lib/user/ecommerce/order_items_groups.rb +5 -2
  77. data/lib/user/ecommerce/order_statuses.rb +2 -0
  78. data/lib/user/ecommerce/orders.rb +4 -1
  79. data/lib/user/ecommerce/price_lists.rb +2 -0
  80. data/lib/user/ecommerce/product_templates.rb +3 -1
  81. data/lib/user/ecommerce/product_variations.rb +2 -0
  82. data/lib/user/ecommerce/products.rb +3 -1
  83. data/lib/user/ecommerce/skus.rb +2 -0
  84. data/lib/user/ecommerce/taxes.rb +2 -0
  85. data/lib/user/ecommerce/variant_options.rb +2 -0
  86. data/lib/user/ecommerce/variant_values.rb +2 -0
  87. data/lib/user/helpers/helpers.rb +2 -0
  88. data/lib/user/helpers/object_activities.rb +2 -0
  89. data/lib/user/helpers/object_folders.rb +2 -0
  90. data/lib/user/helpers/user_folders.rb +2 -0
  91. data/lib/user/marketing/marketing.rb +2 -0
  92. data/lib/user/profile/profile.rb +2 -0
  93. data/lib/user.rb +32 -41
  94. metadata +23 -16
  95. data/lib/user/config/importers.rb +0 -184
@@ -1,138 +1,141 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Relationships
2
- ##
3
- # == Relationships
4
- #
5
-
6
- # === Get relationships available for.
7
- # Get relationships available.
8
- #
9
- # ==== Parameters
10
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
- #
12
- # ==== Example
13
- # options = {
14
- # "objectType": "contacts"
15
- # }
16
- # @data = @mints_user.get_relationships_available_for(options)
17
- def get_relationships_available_for(options)
18
- @client.raw('get', "/config/relationships/available-for", options)
19
- end
20
-
21
- # === Attach relationship.
22
- # Attach a relationship.
23
- #
24
- # ==== Parameters
25
- # data:: (Hash) -- Data to be submitted.
26
- #
27
- # ==== Example
28
- #
29
- def attach_relationship(data) #FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
30
- @client.raw('post', "/config/relationships/attach", nil, data_transform(data))
31
- end
4
+ ##
5
+ # == Relationships
6
+ #
7
+ # === Get relationships available for.
8
+ # Get relationships available.
9
+ #
10
+ # ==== Parameters
11
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
12
+ #
13
+ # ==== Example
14
+ # options = {
15
+ # objectType: 'contacts'
16
+ # }
17
+ # @data = @mints_user.get_relationships_available_for(options)
18
+ def get_relationships_available_for(options)
19
+ @client.raw('get', '/config/relationships/available-for', options)
20
+ end
21
+
22
+ # === Attach relationship.
23
+ # Attach a relationship.
24
+ #
25
+ # ==== Parameters
26
+ # data:: (Hash) -- Data to be submitted.
27
+ #
28
+ # ==== Example
29
+ #
30
+ def attach_relationship(data)
31
+ # FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
32
+ @client.raw('post', '/config/relationships/attach', nil, data_transform(data))
33
+ end
34
+
35
+ # === Detach relationship.
36
+ # Detach a relationship.
37
+ #
38
+ # ==== Parameters
39
+ # data:: (Hash) -- Data to be submitted.
40
+ #
41
+ # ==== Example
42
+ #
43
+ def detach_relationship(data)
44
+ # FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
45
+ @client.raw('post', '/config/relationships/detach', nil, data_transform(data))
46
+ end
47
+
48
+ # === Relationship has objects.
49
+ # Get relationships that has objects.
50
+ #
51
+ # ==== Parameters
52
+ # id:: (Integer) -- Relationship id.
53
+ #
54
+ # ==== Example
55
+ # @data = @mints_user.relationship_has_objects(1)
56
+ def relationship_has_objects(id)
57
+ @client.raw('get', "/config/relationships/#{id}/hasObjects")
58
+ end
32
59
 
33
- # === Detach relationship.
34
- # Detach a relationship.
35
- #
36
- # ==== Parameters
37
- # data:: (Hash) -- Data to be submitted.
38
- #
39
- # ==== Example
40
- #
41
- def detach_relationship(data) #FIXME: Method doesn't work, RelationshipManager cannot access to id attribute.
42
- @client.raw('post', "/config/relationships/detach", nil, data_transform(data))
43
- end
44
-
45
- # === Relationship has objects.
46
- # Get relationships that has objects.
47
- #
48
- # ==== Parameters
49
- # id:: (Integer) -- Relationship id.
50
- #
51
- # ==== Example
52
- # @data = @mints_user.relationship_has_objects(1)
53
- def relationship_has_objects(id)
54
- @client.raw('get', "/config/relationships/#{id}/hasObjects")
55
- end
56
-
57
- # === Get relationships.
58
- # Get a collection of relationships.
59
- #
60
- # ==== Parameters
61
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
62
- #
63
- # ==== First Example
64
- # @data = @mints_user.get_relationships
65
- #
66
- # ==== Second Example
67
- # options = { fields: "id" }
68
- # @data = @mints_user.get_relationships(options)
69
- def get_relationships(options = nil)
70
- @client.raw('get', "/config/relationships", options)
71
- end
60
+ # === Get relationships.
61
+ # Get a collection of relationships.
62
+ #
63
+ # ==== Parameters
64
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
65
+ #
66
+ # ==== First Example
67
+ # @data = @mints_user.get_relationships
68
+ #
69
+ # ==== Second Example
70
+ # options = { fields: 'id' }
71
+ # @data = @mints_user.get_relationships(options)
72
+ def get_relationships(options = nil)
73
+ @client.raw('get', '/config/relationships', options)
74
+ end
72
75
 
73
- # === Get relationship.
74
- # Get a relationship info.
75
- #
76
- # ==== Parameters
77
- # id:: (Integer) -- Relationship id.
78
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
79
- #
80
- # ==== First Example
81
- # @data = @mints_user.get_relationship(1)
82
- #
83
- # ==== Second Example
84
- # options = { fields: "id" }
85
- # @data = @mints_user.get_relationship(1, options)
86
- def get_relationship(id, options = nil)
87
- @client.raw('get', "/config/relationships/#{id}", options)
88
- end
76
+ # === Get relationship.
77
+ # Get a relationship info.
78
+ #
79
+ # ==== Parameters
80
+ # id:: (Integer) -- Relationship id.
81
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
82
+ #
83
+ # ==== First Example
84
+ # @data = @mints_user.get_relationship(1)
85
+ #
86
+ # ==== Second Example
87
+ # options = { fields: 'id' }
88
+ # @data = @mints_user.get_relationship(1, options)
89
+ def get_relationship(id, options = nil)
90
+ @client.raw('get', "/config/relationships/#{id}", options)
91
+ end
89
92
 
90
- # === Create relationship.
91
- # Create a relationship with data.
92
- #
93
- # ==== Parameters
94
- # data:: (Hash) -- Data to be submitted.
95
- #
96
- # ==== Example
97
- # data = {
98
- # "alias_1": "eventsCopy",
99
- # "alias_2": "ticketsCopy",
100
- # "object_model_1": "Story",
101
- # "object_model_2": "Product"
102
- # }
103
- # @data = @mints_user.create_relationship(data)
104
- def create_relationship(data)
105
- @client.raw('post', "/config/relationships", nil, data_transform(data))
106
- end
93
+ # === Create relationship.
94
+ # Create a relationship with data.
95
+ #
96
+ # ==== Parameters
97
+ # data:: (Hash) -- Data to be submitted.
98
+ #
99
+ # ==== Example
100
+ # data = {
101
+ # alias_1: 'eventsCopy',
102
+ # alias_2: 'ticketsCopy',
103
+ # object_model_1: 'Story',
104
+ # object_model_2: 'Product'
105
+ # }
106
+ # @data = @mints_user.create_relationship(data)
107
+ def create_relationship(data)
108
+ @client.raw('post', '/config/relationships', nil, data_transform(data))
109
+ end
107
110
 
108
- # === Update relationship.
109
- # Update a relationship info.
110
- #
111
- # ==== Parameters
112
- # id:: (Integer) -- Relationship id.
113
- # data:: (Hash) -- Data to be submitted.
114
- #
115
- # ==== Example
116
- # data = {
117
- # "alias_1": "eventsCopyModified",
118
- # "alias_2": "ticketsCopyModified",
119
- # "object_model_1": "Story",
120
- # "object_model_2": "Product"
121
- # }
122
- # @data = @mints_user.update_relationship(5, data)
123
- def update_relationship(id, data)
124
- @client.raw('put', "/config/relationships/#{id}", nil, data_transform(data))
125
- end
111
+ # === Update relationship.
112
+ # Update a relationship info.
113
+ #
114
+ # ==== Parameters
115
+ # id:: (Integer) -- Relationship id.
116
+ # data:: (Hash) -- Data to be submitted.
117
+ #
118
+ # ==== Example
119
+ # data = {
120
+ # alias_1: 'eventsCopyModified',
121
+ # alias_2: 'ticketsCopyModified',
122
+ # object_model_1: 'Story',
123
+ # object_model_2: 'Product'
124
+ # }
125
+ # @data = @mints_user.update_relationship(5, data)
126
+ def update_relationship(id, data)
127
+ @client.raw('put', "/config/relationships/#{id}", nil, data_transform(data))
128
+ end
126
129
 
127
- # === Delete relationship.
128
- # Delete a relationship.
129
- #
130
- # ==== Parameters
131
- # id:: (Integer) -- Relationship id.
132
- #
133
- # ==== Example
134
- # @data = @mints_user.delete_relationship(5)
135
- def delete_relationship(id)
136
- @client.raw('delete', "/config/relationships/#{id}")
137
- end
138
- end
130
+ # === Delete relationship.
131
+ # Delete a relationship.
132
+ #
133
+ # ==== Parameters
134
+ # id:: (Integer) -- Relationship id.
135
+ #
136
+ # ==== Example
137
+ # @data = @mints_user.delete_relationship(5)
138
+ def delete_relationship(id)
139
+ @client.raw('delete', "/config/relationships/#{id}")
140
+ end
141
+ end
@@ -1,84 +1,81 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Roles
2
- ##
3
- # == Roles
4
- #
4
+ ##
5
+ # == Roles
6
+ #
7
+
8
+ # === Duplicate role.
9
+ # Duplicate a role.
10
+ #
11
+ # ==== Parameters
12
+ # id:: (Integer) -- Role id.
13
+ # data:: (Hash) -- Data to be submitted.
14
+ #
15
+ # ==== Example
16
+ # data = { options: { name: 'Duplicated role' } }
17
+ # @data = @mints_user.duplicate_role(1, data.to_json)
18
+ def duplicate_role(id, data)
19
+ @client.raw('post', "/config/roles/#{id}/duplicate", nil, data)
20
+ end
5
21
 
6
- #def get_roles_permissions #FIXME: RoleController doesnt have getPermissions method
7
- # @client.raw('get', "/config/roles/get-permissions")
8
- #end
22
+ # === Get roles.
23
+ # Get a collection of roles.
24
+ #
25
+ # ==== Example
26
+ # @data = @mints_user.get_roles
27
+ def get_roles
28
+ @client.raw('get', '/config/roles')
29
+ end
9
30
 
10
- # === Duplicate role.
11
- # Duplicate a role.
12
- #
13
- # ==== Parameters
14
- # id:: (Integer) -- Role id.
15
- # data:: (Hash) -- Data to be submitted.
16
- #
17
- # ==== Example
18
- # data = {
19
- # options: []
20
- # }
21
- # @data = @mints_user.duplicate_role(1, data.to_json)
22
- def duplicate_role(id, data)
23
- @client.raw('post', "/config/roles/#{id}/duplicate", nil, data)
24
- end
25
-
26
- # === Get roles.
27
- # Get a collection of roles.
28
- #
29
- # ==== Example
30
- # @data = @mints_user.get_roles
31
- def get_roles
32
- @client.raw('get', "/config/roles")
33
- end
31
+ # === Get role.
32
+ # Get a role info.
33
+ #
34
+ # ==== Parameters
35
+ # id:: (Integer) -- Role id.
36
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
37
+ #
38
+ # ==== Example
39
+ # @data = @mints_user.get_role(1)
40
+ def get_role(id)
41
+ @client.raw('get', "/config/roles/#{id}")
42
+ end
34
43
 
35
- # === Get role.
36
- # Get a role info.
37
- #
38
- # ==== Parameters
39
- # id:: (Integer) -- Role id.
40
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
41
- #
42
- # ==== Example
43
- # @data = @mints_user.get_role(1)
44
- def get_role(id)
45
- @client.raw('get', "/config/roles/#{id}")
46
- end
44
+ # === Create role.
45
+ # Create a role with data.
46
+ #
47
+ # ==== Parameters
48
+ # data:: (Hash) -- Data to be submitted.
49
+ #
50
+ # ==== Example
51
+ # data = {
52
+ # name: 'new-role',
53
+ # display_name: 'New Role',
54
+ # description: 'Role description'
55
+ # }
56
+ # @data = @mints_user.create_role(data)
57
+ def create_role(data)
58
+ @client.raw('post', '/config/roles', nil, data_transform(data))
59
+ end
47
60
 
48
- # === Create role.
49
- # Create a role with data.
50
- #
51
- # ==== Parameters
52
- # data:: (Hash) -- Data to be submitted.
53
- #
54
- # ==== Example
55
- # data = {
56
- # "name": "new-role",
57
- # "display_name": "New Role",
58
- # description: "Role description"
59
- # }
60
- # @data = @mints_user.create_role(data)
61
- def create_role(data)
62
- @client.raw('post', "/config/roles", nil, data_transform(data))
63
- end
64
-
65
- # === Update role.
66
- # Update a role info.
67
- #
68
- # ==== Parameters
69
- # id:: (Integer) -- Role id.
70
- # data:: (Hash) -- Data to be submitted.
71
- #
72
- # ==== Example
73
- # data = {
74
- # "name": "new-role",
75
- # "display_name": "New Role Display Name Modified",
76
- # description: "Role description",
77
- # "permissions": 1
78
- # }
79
- # @data = @mints_user.update_role(8, data)
80
- def update_role(id, data) #FIXME: This action is unauthorized
81
- #TODO: Research permissions variable type. This would be the error's solution.
82
- @client.raw('put', "/config/roles/#{id}", nil, data_transform(data))
83
- end
84
- end
61
+ # === Update role.
62
+ # Update a role info.
63
+ #
64
+ # ==== Parameters
65
+ # id:: (Integer) -- Role id.
66
+ # data:: (Hash) -- Data to be submitted.
67
+ #
68
+ # ==== Example
69
+ # data = {
70
+ # name: 'new-role',
71
+ # display_name: 'New Role Display Name Modified',
72
+ # description: 'Role description',
73
+ # permissions: 1
74
+ # }
75
+ # @data = @mints_user.update_role(8, data)
76
+ def update_role(id, data)
77
+ # FIXME: This action is unauthorized
78
+ # TODO: Research permissions variable type. This would be the error's solution.
79
+ @client.raw('put', "/config/roles/#{id}", nil, data_transform(data))
80
+ end
81
+ end
@@ -1,54 +1,55 @@
1
- module Seeds
2
- ##
3
- # == Seeds
4
- #
1
+ # frozen_string_literal: true
5
2
 
6
- # === Apply seeds.
7
- # Apply seeds.
8
- #
9
- # ==== Example
10
- #
11
- def apply_seeds(data, async = false)
12
- url = "/config/seeds"
13
- url = "#{url}?async" if async
14
- @client.raw('post', url, nil, data)
15
- end
3
+ module Seeds
4
+ ##
5
+ # == Seeds
6
+ #
7
+ # === Apply seeds.
8
+ # Apply seeds.
9
+ #
10
+ # ==== Example
11
+ #
12
+ def apply_seeds(data, async: false)
13
+ url = '/config/seeds'
14
+ url = "#{url}?async" if async
15
+ @client.raw('post', url, nil, data)
16
+ end
16
17
 
17
- # === Get seed processes.
18
- # Get a collection of seed processes.
19
- #
20
- # ==== Parameters
21
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
22
- # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
23
- #
24
- # ==== First Example
25
- # @data = @mints_user.get_seed_processes
26
- #
27
- # ==== Second Example
28
- # options = {
29
- # fields: "id"
30
- # }
31
- # @data = @mints_user.get_seed_processes(options)
32
- def get_seed_processes(options = nil)
33
- @client.raw('post', "/config/seed-processes", options)
34
- end
18
+ # === Get seed processes.
19
+ # Get a collection of seed processes.
20
+ #
21
+ # ==== Parameters
22
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
23
+ # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
24
+ #
25
+ # ==== First Example
26
+ # @data = @mints_user.get_seed_processes
27
+ #
28
+ # ==== Second Example
29
+ # options = {
30
+ # fields: 'id'
31
+ # }
32
+ # @data = @mints_user.get_seed_processes(options)
33
+ def get_seed_processes(options = nil)
34
+ @client.raw('post', '/config/seed-processes', options)
35
+ end
35
36
 
36
- # === Get seed process.
37
- # Get a seed process info.
38
- #
39
- # ==== Parameters
40
- # id:: (Integer) -- Story version id.
41
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
42
- #
43
- # ==== First Example
44
- # @data = @mints_user.get_story_version(1)
45
- #
46
- # ==== Second Example
47
- # options = {
48
- # fields: 'id, title'
49
- # }
50
- # @data = @mints_user.get_seed_process(1, options)
51
- def get_seed_process(id, options = nil)
52
- @client.raw('get', "/config/seed-processes/#{id}", options)
53
- end
54
- end
37
+ # === Get seed process.
38
+ # Get a seed process info.
39
+ #
40
+ # ==== Parameters
41
+ # id:: (Integer) -- Seed process id.
42
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
43
+ #
44
+ # ==== First Example
45
+ # @data = @mints_user.get_seed_process(1)
46
+ #
47
+ # ==== Second Example
48
+ # options = {
49
+ # fields: 'id, title'
50
+ # }
51
+ # @data = @mints_user.get_seed_process(1, options)
52
+ def get_seed_process(id, options = nil)
53
+ @client.raw('get', "/config/seed-processes/#{id}", options)
54
+ end
55
+ end
@@ -1,53 +1,54 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SystemSettings
2
- ##
3
- # == System Settings
4
- #
4
+ ##
5
+ # == System Settings
6
+ #
7
+ # === Get settings by keys.
8
+ # Get a collection of settings using keys.
9
+ #
10
+ # ==== Example
11
+ # options = {
12
+ # setting_keys: 'email_transport_provider,email_template_provider,email_template_default_from_address'
13
+ # }
14
+ # @data = @mints_user.get_settings_by_keys(options)
15
+ def get_settings_by_keys(options)
16
+ @client.raw('get', '/config/settings/by-keys', options)
17
+ end
5
18
 
6
- # === Get settings by keys.
7
- # Get a collection of settings using keys.
8
- #
9
- # ==== Example
10
- # options = {
11
- # "setting_keys": "email_transport_provider,email_template_provider,email_template_default_from_address"
12
- # }
13
- # @data = @mints_user.get_settings_by_keys(options)
14
- def get_settings_by_keys(options)
15
- @client.raw('get', "/config/settings/by-keys", options)
16
- end
17
-
18
- # === Get settings.
19
- # Get a collection of settings.
20
- #
21
- # ==== Example
22
- # @data = @mints_user.get_settings
23
- def get_settings
24
- @client.raw('get', "/config/settings")
25
- end
19
+ # === Get settings.
20
+ # Get a collection of settings.
21
+ #
22
+ # ==== Example
23
+ # @data = @mints_user.get_settings
24
+ def get_settings
25
+ @client.raw('get', '/config/settings')
26
+ end
26
27
 
27
- # === Create setting.
28
- # Create a setting title with data.
29
- #
30
- # ==== Parameters
31
- # data:: (Hash) -- Data to be submitted.
32
- #
33
- # ==== Example
34
- # data = {
35
- # title: "new_settings"
36
- # }
37
- # @data = @mints_user.create_setting(data)
38
- def create_setting(data)
39
- @client.raw('post', "/config/settings", nil, data_transform(data))
40
- end
28
+ # === Create setting.
29
+ # Create a setting title with data.
30
+ #
31
+ # ==== Parameters
32
+ # data:: (Hash) -- Data to be submitted.
33
+ #
34
+ # ==== Example
35
+ # data = {
36
+ # title: 'new_settings'
37
+ # }
38
+ # @data = @mints_user.create_setting(data)
39
+ def create_setting(data)
40
+ @client.raw('post', '/config/settings', nil, data_transform(data))
41
+ end
41
42
 
42
- # === Clear tag.
43
- # Clar a tag info.
44
- #
45
- # ==== Parameters
46
- # tag:: (Integer) -- Tag id.
47
- #
48
- # ==== Example
49
- # @data = @mints_user.clear_tag(1)
50
- def clear_tag(tag)
51
- @client.raw('get', "/config/settings/tags/#{tag}/clear")
52
- end
53
- end
43
+ # === Clear tag.
44
+ # Clear a tag info.
45
+ #
46
+ # ==== Parameters
47
+ # tag:: (Integer) -- Tag id.
48
+ #
49
+ # ==== Example
50
+ # @data = @mints_user.clear_tag(1)
51
+ def clear_tag(tag)
52
+ @client.raw('get', "/config/settings/tags/#{tag}/clear")
53
+ end
54
+ end