mints 0.0.27 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/lib/client.rb +4 -4
  4. data/lib/contact.rb +60 -61
  5. data/lib/errors.rb +1 -1
  6. data/lib/generators/mints_config.yml.erb +0 -2
  7. data/lib/generators/mints_link.rb +3 -3
  8. data/lib/mints/helpers/mints_helper.rb +2 -2
  9. data/lib/pub.rb +55 -55
  10. data/lib/user/config/api_keys.rb +7 -7
  11. data/lib/user/config/appointments.rb +16 -16
  12. data/lib/user/config/attribute_groups.rb +10 -10
  13. data/lib/user/config/attributes.rb +10 -10
  14. data/lib/user/config/calendars.rb +9 -9
  15. data/lib/user/config/config.rb +7 -7
  16. data/lib/user/config/importers.rb +15 -15
  17. data/lib/user/config/public_folders.rb +11 -11
  18. data/lib/user/config/relationships.rb +11 -11
  19. data/lib/user/config/roles.rb +9 -9
  20. data/lib/user/config/seeds.rb +5 -5
  21. data/lib/user/config/system_settings.rb +5 -5
  22. data/lib/user/config/tags.rb +5 -5
  23. data/lib/user/config/taxonomies.rb +15 -15
  24. data/lib/user/config/teams.rb +67 -68
  25. data/lib/user/config/users.rb +70 -71
  26. data/lib/user/contacts/contacts.rb +19 -20
  27. data/lib/user/content/assets.rb +273 -278
  28. data/lib/user/content/content.rb +48 -48
  29. data/lib/user/content/content_instances.rb +136 -138
  30. data/lib/user/content/content_templates.rb +103 -103
  31. data/lib/user/content/conversations.rb +193 -193
  32. data/lib/user/content/dam.rb +83 -80
  33. data/lib/user/content/forms.rb +229 -233
  34. data/lib/user/content/message_templates.rb +152 -151
  35. data/lib/user/content/messages.rb +87 -87
  36. data/lib/user/content/pages.rb +82 -82
  37. data/lib/user/content/stories.rb +101 -101
  38. data/lib/user/content/story_templates.rb +88 -88
  39. data/lib/user/content/story_versions.rb +115 -117
  40. data/lib/user/crm/companies.rb +103 -105
  41. data/lib/user/crm/contacts.rb +285 -292
  42. data/lib/user/crm/crm.rb +19 -19
  43. data/lib/user/crm/deals.rb +103 -103
  44. data/lib/user/crm/favorites.rb +14 -13
  45. data/lib/user/crm/segments.rb +121 -123
  46. data/lib/user/crm/users.rb +20 -20
  47. data/lib/user/crm/workflow_step_objects.rb +84 -84
  48. data/lib/user/crm/workflow_steps.rb +45 -45
  49. data/lib/user/crm/workflows.rb +65 -65
  50. data/lib/user/ecommerce/ecommerce.rb +27 -27
  51. data/lib/user/ecommerce/item_prices.rb +82 -81
  52. data/lib/user/ecommerce/locations.rb +160 -160
  53. data/lib/user/ecommerce/order_items_groups.rb +107 -106
  54. data/lib/user/ecommerce/order_statuses.rb +24 -24
  55. data/lib/user/ecommerce/orders.rb +250 -246
  56. data/lib/user/ecommerce/price_lists.rb +68 -68
  57. data/lib/user/ecommerce/product_templates.rb +99 -99
  58. data/lib/user/ecommerce/product_variations.rb +122 -120
  59. data/lib/user/ecommerce/products.rb +160 -159
  60. data/lib/user/ecommerce/skus.rb +85 -85
  61. data/lib/user/ecommerce/taxes.rb +79 -79
  62. data/lib/user/ecommerce/variant_options.rb +66 -66
  63. data/lib/user/ecommerce/variant_values.rb +69 -69
  64. data/lib/user/helpers/helpers.rb +102 -101
  65. data/lib/user/helpers/object_activities.rb +78 -78
  66. data/lib/user/helpers/object_folders.rb +76 -76
  67. data/lib/user/helpers/user_folders.rb +77 -77
  68. data/lib/user/marketing/marketing.rb +114 -113
  69. data/lib/user/profile/profile.rb +94 -103
  70. data/lib/user.rb +3 -3
  71. metadata +33 -33
@@ -1,69 +1,69 @@
1
1
  module VariantOptions
2
- ##
3
- # == Variant Options
4
- #
2
+ ##
3
+ # == Variant Options
4
+ #
5
5
 
6
- # === Get variant options.
7
- # Get a collection of variant options.
8
- #
9
- # ==== Parameters
10
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
- #
12
- # ==== First Example
13
- # @data = @mints_user.get_variant_options
14
- #
15
- # ==== Second Example
16
- # options = { "fields": "id, title" }
17
- # @data = @mints_user.get_variant_options(options)
18
- def get_variant_options(options = nil)
19
- @client.raw("get", "/ecommerce/variant-options", options)
20
- end
6
+ # === Get variant options.
7
+ # Get a collection of variant options.
8
+ #
9
+ # ==== Parameters
10
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
+ #
12
+ # ==== First Example
13
+ # @data = @mints_user.get_variant_options
14
+ #
15
+ # ==== Second Example
16
+ # options = { fields: 'id, title' }
17
+ # @data = @mints_user.get_variant_options(options)
18
+ def get_variant_options(options = nil)
19
+ @client.raw('get', '/ecommerce/variant-options', options)
20
+ end
21
21
 
22
- # === Get variant option.
23
- # Get a variant options info.
24
- #
25
- # ==== Parameters
26
- # id:: (Integer) -- Variant option id.
27
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
- #
29
- # ==== First Example
30
- # @data = @mints_user.get_variant_option(1)
31
- #
32
- # ==== Second Example
33
- # options = { "fields": "id, title" }
34
- # @data = @mints_user.get_variant_option(1, options)
35
- def get_variant_option(id, options = nil)
36
- @client.raw("get", "/ecommerce/variant-options/#{id}", options)
37
- end
38
-
39
- # === Create variant option.
40
- # Create a variant option with data.
41
- #
42
- # ==== Parameters
43
- # data:: (Hash) -- Data to be submitted.
44
- #
45
- # ==== Example
46
- # data = {
47
- # "title": "New Variant Option"
48
- # }
49
- # @data = @mints_user.create_variant_option(data)
50
- def create_variant_option(data)
51
- @client.raw("post", "/ecommerce/variant-options", nil, data_transform(data))
52
- end
53
-
54
- # === Update variant option.
55
- # Update a variant option info.
56
- #
57
- # ==== Parameters
58
- # id:: (Integer) -- Variant option id.
59
- # data:: (Hash) -- Data to be submitted.
60
- #
61
- # ==== Example
62
- # data = {
63
- # "title": "New Variant Option Modified"
64
- # }
65
- # @data = @mints_user.update_variant_option(6, data)
66
- def update_variant_option(id, data)
67
- @client.raw("put", "/ecommerce/variant-options/#{id}", nil, data_transform(data))
68
- end
69
- end
22
+ # === Get variant option.
23
+ # Get a variant options info.
24
+ #
25
+ # ==== Parameters
26
+ # id:: (Integer) -- Variant option id.
27
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
+ #
29
+ # ==== First Example
30
+ # @data = @mints_user.get_variant_option(1)
31
+ #
32
+ # ==== Second Example
33
+ # options = { fields: 'id, title' }
34
+ # @data = @mints_user.get_variant_option(1, options)
35
+ def get_variant_option(id, options = nil)
36
+ @client.raw('get', "/ecommerce/variant-options/#{id}", options)
37
+ end
38
+
39
+ # === Create variant option.
40
+ # Create a variant option with data.
41
+ #
42
+ # ==== Parameters
43
+ # data:: (Hash) -- Data to be submitted.
44
+ #
45
+ # ==== Example
46
+ # data = {
47
+ # title: 'New Variant Option'
48
+ # }
49
+ # @data = @mints_user.create_variant_option(data)
50
+ def create_variant_option(data)
51
+ @client.raw('post', '/ecommerce/variant-options', nil, data_transform(data))
52
+ end
53
+
54
+ # === Update variant option.
55
+ # Update a variant option info.
56
+ #
57
+ # ==== Parameters
58
+ # id:: (Integer) -- Variant option id.
59
+ # data:: (Hash) -- Data to be submitted.
60
+ #
61
+ # ==== Example
62
+ # data = {
63
+ # title: 'New Variant Option Modified'
64
+ # }
65
+ # @data = @mints_user.update_variant_option(6, data)
66
+ def update_variant_option(id, data)
67
+ @client.raw('put', "/ecommerce/variant-options/#{id}", nil, data_transform(data))
68
+ end
69
+ end
@@ -1,72 +1,72 @@
1
1
  module VariantValues
2
- ##
3
- # == Variant Values
4
- #
5
-
6
- # === Get variant values.
7
- # Get a collection of variant values.
8
- #
9
- # ==== Parameters
10
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
- #
12
- # ==== First Example
13
- # @data = @mints_user.get_variant_values
14
- #
15
- # ==== Second Example
16
- # options = { "sort": "-id"}
17
- # @data = @mints_user.get_variant_values(options)
18
- def get_variant_values(options = nil)
19
- @client.raw("get", "/ecommerce/variant-values", options)
20
- end
21
-
22
- # === Get variant value.
23
- # Get a variant value info.
24
- #
25
- # ==== Parameters
26
- # id:: (Integer) -- Variant value id.
27
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
- #
29
- # ==== First Example
30
- # @data = @mints_user.get_variant_value(5)
31
- #
32
- # ==== Second Example
33
- # options = { "fields": "id"}
34
- # @data = @mints_user.get_variant_value(5, options)
35
- def get_variant_value(id, options = nil)
36
- @client.raw("get", "/ecommerce/variant-values/#{id}", options)
37
- end
2
+ ##
3
+ # == Variant Values
4
+ #
38
5
 
39
- # === Create variant value.
40
- # Create a variant value with data.
41
- #
42
- # ==== Parameters
43
- # data:: (Hash) -- Data to be submitted.
44
- #
45
- # ==== Example
46
- # data = {
47
- # "value": "New Variant Value",
48
- # "variant_option_id": 1,
49
- # "display_order": 1,
50
- # "sku_code": "new-variant-value-sku"
51
- # }
52
- # @data = @mints_user.create_variant_value(data)
53
- def create_variant_value(data)
54
- @client.raw("post", "/ecommerce/variant-values", nil, data_transform(data))
55
- end
6
+ # === Get variant values.
7
+ # Get a collection of variant values.
8
+ #
9
+ # ==== Parameters
10
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
+ #
12
+ # ==== First Example
13
+ # @data = @mints_user.get_variant_values
14
+ #
15
+ # ==== Second Example
16
+ # options = { sort: '-id'}
17
+ # @data = @mints_user.get_variant_values(options)
18
+ def get_variant_values(options = nil)
19
+ @client.raw('get', '/ecommerce/variant-values', options)
20
+ end
56
21
 
57
- # === Update variant value.
58
- # Update a variant value info.
59
- #
60
- # ==== Parameters
61
- # id:: (Integer) -- Variant value id.
62
- # data:: (Hash) -- Data to be submitted.
63
- #
64
- # ==== Example
65
- # data = {
66
- # "value": "New Variant Value Modified"
67
- # }
68
- # @data = @mints_user.update_variant_value(22, data)
69
- def update_variant_value(id, data)
70
- @client.raw("put", "/ecommerce/variant-values/#{id}", nil, data_transform(data))
71
- end
72
- end
22
+ # === Get variant value.
23
+ # Get a variant value info.
24
+ #
25
+ # ==== Parameters
26
+ # id:: (Integer) -- Variant value id.
27
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
+ #
29
+ # ==== First Example
30
+ # @data = @mints_user.get_variant_value(5)
31
+ #
32
+ # ==== Second Example
33
+ # options = { fields: 'id'}
34
+ # @data = @mints_user.get_variant_value(5, options)
35
+ def get_variant_value(id, options = nil)
36
+ @client.raw('get', "/ecommerce/variant-values/#{id}", options)
37
+ end
38
+
39
+ # === Create variant value.
40
+ # Create a variant value with data.
41
+ #
42
+ # ==== Parameters
43
+ # data:: (Hash) -- Data to be submitted.
44
+ #
45
+ # ==== Example
46
+ # data = {
47
+ # value: 'New Variant Value',
48
+ # variant_option_id: 1,
49
+ # display_order: 1,
50
+ # sku_code: 'new-variant-value-sku'
51
+ # }
52
+ # @data = @mints_user.create_variant_value(data)
53
+ def create_variant_value(data)
54
+ @client.raw('post', '/ecommerce/variant-values', nil, data_transform(data))
55
+ end
56
+
57
+ # === Update variant value.
58
+ # Update a variant value info.
59
+ #
60
+ # ==== Parameters
61
+ # id:: (Integer) -- Variant value id.
62
+ # data:: (Hash) -- Data to be submitted.
63
+ #
64
+ # ==== Example
65
+ # data = {
66
+ # value: 'New Variant Value Modified'
67
+ # }
68
+ # @data = @mints_user.update_variant_value(22, data)
69
+ def update_variant_value(id, data)
70
+ @client.raw('put', "/ecommerce/variant-values/#{id}", nil, data_transform(data))
71
+ end
72
+ end
@@ -1,113 +1,114 @@
1
- require_relative './object_activities.rb'
2
- require_relative './object_folders.rb'
3
- require_relative './user_folders.rb'
1
+ require_relative './object_activities'
2
+ require_relative './object_folders'
3
+ require_relative './user_folders'
4
4
 
5
5
  module Helpers
6
+ include ObjectActivities
7
+ include ObjectFolders
8
+ include UserFolders
6
9
 
7
- include ObjectActivities
8
- include ObjectFolders
9
- include UserFolders
10
+ ##
11
+ # == Helpers
12
+ #
10
13
 
11
- ##
12
- # == Helpers
13
- #
14
-
15
- # === Slugify.
16
- # Slugify a text using an object type.
17
- #
18
- # ==== Parameters
19
- # data:: (Hash) -- Data to be submitted.
20
- #
21
- # ==== Example
22
- #
23
- def slugify(data) #TODO: Research use of variable polymorphicObjectType
24
- @client.raw("post", "/helpers/slugify", nil, data_transform(data))
25
- end
26
-
27
- # === Get available types from usage.
28
- # Get available types by usage.
29
- #
30
- # ==== Parameters
31
- # usage:: () -- ...
32
- #
33
- def get_available_types_from_usage(usage) #TODO: Research use
34
- @client.raw("get", "/helpers/available-types/#{usage}")
35
- end
14
+ # === Slugify.
15
+ # Slugify a text using an object type.
16
+ #
17
+ # ==== Parameters
18
+ # data:: (Hash) -- Data to be submitted.
19
+ #
20
+ # ==== Example
21
+ #
22
+ def slugify(data)
23
+ # TODO: Research use of variable polymorphicObjectType
24
+ @client.raw('post', '/helpers/slugify', nil, data_transform(data))
25
+ end
36
26
 
37
- # === Get magic link config.
38
- # Get config used in magic links.
39
- #
40
- # ==== Example
41
- # @data = @mints_user.get_magic_link_config
42
- def get_magic_link_config
43
- @client.raw("get", "/helpers/magic-link-config")
44
- end
27
+ # === Get available types from usage.
28
+ # Get available types by usage.
29
+ #
30
+ # ==== Parameters
31
+ # usage:: () -- ...
32
+ #
33
+ def get_available_types_from_usage(usage)
34
+ # TODO: Research use
35
+ @client.raw('get', "/helpers/available-types/#{usage}")
36
+ end
45
37
 
46
- ##
47
- # == Activities
48
- #
38
+ # === Get magic link config.
39
+ # Get config used in magic links.
40
+ #
41
+ # ==== Example
42
+ # @data = @mints_user.get_magic_link_config
43
+ def get_magic_link_config
44
+ @client.raw('get', '/helpers/magic-link-config')
45
+ end
49
46
 
50
- # === Get activities by object type and id.
51
- # Get activities using an object type and object type id.
52
- #
53
- # ==== Parameters
54
- # object_type:: (String) -- Object type.
55
- # id:: (Integer) -- Object type id.
56
- #
57
- # ==== Example
58
- # @data = @mints_user.get_activities_by_object_type_and_id("contacts", 1)
59
- def get_activities_by_object_type_and_id(object_type, id)
60
- @client.raw("get", "/helpers/activities/#{object_type}/#{id}")
61
- end
47
+ ##
48
+ # == Activities
49
+ #
62
50
 
63
- ##
64
- # == Dice Coefficient
65
- #
66
-
67
- # === Get dice coefficient.
68
- # Get dice coefficient.
69
- #
70
- # ==== Parameters
71
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
72
- #
73
- # ==== Example
74
- # options = {
75
- # "table": "contacts",
76
- # "field": "id",
77
- # "word": "1"
78
- # }
79
- # @data = @mints_user.get_dice_coefficient(options)
80
- def get_dice_coefficient(options)
81
- @client.raw("get", "/helpers/dice-coefficient", options)
82
- end
51
+ # === Get activities by object type and id.
52
+ # Get activities using an object type and object type id.
53
+ #
54
+ # ==== Parameters
55
+ # object_type:: (String) -- Object type.
56
+ # id:: (Integer) -- Object type id.
57
+ #
58
+ # ==== Example
59
+ # @data = @mints_user.get_activities_by_object_type_and_id('contacts', 1)
60
+ def get_activities_by_object_type_and_id(object_type, id)
61
+ @client.raw('get', "/helpers/activities/#{object_type}/#{id}")
62
+ end
83
63
 
84
- ##
85
- # == Permission
86
- #
64
+ ##
65
+ # == Dice Coefficient
66
+ #
87
67
 
88
- # === Get permission menu.
89
- # Get permission menu.
90
- #
91
- # ==== Example
92
- # @data = @mints_user.get_permission_menu
93
- def get_permission_menu
94
- @client.raw("get", "/helpers/menu")
95
- end
68
+ # === Get dice coefficient.
69
+ # Get dice coefficient.
70
+ #
71
+ # ==== Parameters
72
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
73
+ #
74
+ # ==== Example
75
+ # options = {
76
+ # table: 'contacts',
77
+ # field: 'id',
78
+ # word: '1'
79
+ # }
80
+ # @data = @mints_user.get_dice_coefficient(options)
81
+ def get_dice_coefficient(options)
82
+ @client.raw('get', '/helpers/dice-coefficient', options)
83
+ end
96
84
 
97
- ##
98
- # == Seed
99
- #
85
+ ##
86
+ # == Permission
87
+ #
100
88
 
101
- # === Generate seed.
102
- # Generate seed using object type and object type id.
103
- #
104
- # ==== Parameters
105
- # objectType:: (String) -- Object type.
106
- # id:: (Integer) -- Object type id.
107
- #
108
- # ==== Example
109
- # @data = @mints_user.generate_seed("contacts", 1)
110
- def generate_seed(object_type, id)
111
- @client.raw("get", "/helpers/seeds/#{object_type}/#{id}")
112
- end
113
- end
89
+ # === Get permission menu.
90
+ # Get permission menu.
91
+ #
92
+ # ==== Example
93
+ # @data = @mints_user.get_permission_menu
94
+ def get_permission_menu
95
+ @client.raw('get', '/helpers/menu')
96
+ end
97
+
98
+ ##
99
+ # == Seed
100
+ #
101
+
102
+ # === Generate seed.
103
+ # Generate seed using object type and object type id.
104
+ #
105
+ # ==== Parameters
106
+ # objectType:: (String) -- Object type.
107
+ # id:: (Integer) -- Object type id.
108
+ #
109
+ # ==== Example
110
+ # @data = @mints_user.generate_seed('contacts', 1)
111
+ def generate_seed(object_type, id)
112
+ @client.raw('get', "/helpers/seeds/#{object_type}/#{id}")
113
+ end
114
+ end
@@ -1,83 +1,83 @@
1
1
  module ObjectActivities
2
- ##
3
- # == Object Activities
4
- #
2
+ ##
3
+ # == Object Activities
4
+ #
5
5
 
6
- # === Get object activities.
7
- # Get a collection of object activities.
8
- #
9
- # ==== Parameters
10
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
- #
12
- # ==== First Example
13
- # @data = @mints_user.get_object_activities
14
- #
15
- # ==== Second Example
16
- # options = { "fields": "object_type" }
17
- # @data = @mints_user.get_object_activities(options)
18
- def get_object_activities(options = nil)
19
- @client.raw("get", "/helpers/object-activities", options)
20
- end
6
+ # === Get object activities.
7
+ # Get a collection of object activities.
8
+ #
9
+ # ==== Parameters
10
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
11
+ #
12
+ # ==== First Example
13
+ # @data = @mints_user.get_object_activities
14
+ #
15
+ # ==== Second Example
16
+ # options = { fields: 'object_type' }
17
+ # @data = @mints_user.get_object_activities(options)
18
+ def get_object_activities(options = nil)
19
+ @client.raw('get', '/helpers/object-activities', options)
20
+ end
21
21
 
22
- # === Get object activity.
23
- # Get an object activity.
24
- #
25
- # ==== Parameters
26
- # id:: (Integer) -- Object activity id.
27
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
- #
29
- # ==== First Example
30
- # @data = @mints_user.get_object_activity(1)
31
- #
32
- # ==== Second Example
33
- # options = { "fields": "activity_type" }
34
- # @data = @mints_user.get_object_activity(1, options)
35
- def get_object_activity(id, options = nil)
36
- @client.raw("get", "/helpers/object-activities/#{id}", options)
37
- end
22
+ # === Get object activity.
23
+ # Get an object activity.
24
+ #
25
+ # ==== Parameters
26
+ # id:: (Integer) -- Object activity id.
27
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
28
+ #
29
+ # ==== First Example
30
+ # @data = @mints_user.get_object_activity(1)
31
+ #
32
+ # ==== Second Example
33
+ # options = { fields: 'activity_type' }
34
+ # @data = @mints_user.get_object_activity(1, options)
35
+ def get_object_activity(id, options = nil)
36
+ @client.raw('get', "/helpers/object-activities/#{id}", options)
37
+ end
38
38
 
39
- # === Create object activity.
40
- # Create an object activity with data.
41
- #
42
- # ==== Parameters
43
- # data:: (Hash) -- Data to be submitted.
44
- #
45
- # ==== Example
46
- # data = {
47
- # "activity_type": "note",
48
- # "object_type": "contacts",
49
- # "object_id": 1
50
- # }
51
- # @data = @mints_user.create_object_activity(data)
52
- def create_object_activity(data)
53
- @client.raw("post", "/helpers/object-activities", nil, data_transform(data))
54
- end
55
-
56
- # === Update object activity.
57
- # Update an object activity info.
58
- #
59
- # ==== Parameters
60
- # id:: (Integer) -- Object activity id.
61
- # data:: (Hash) -- Data to be submitted.
62
- #
63
- # ==== Example
64
- # data = {
65
- # "activity_type": "ticket"
66
- # }
67
- # @data = @mints_user.update_object_activity(573, data)
68
- def update_object_activity(id, data)
69
- @client.raw("put", "/helpers/object-activities/#{id}", nil, data_transform(data))
70
- end
39
+ # === Create object activity.
40
+ # Create an object activity with data.
41
+ #
42
+ # ==== Parameters
43
+ # data:: (Hash) -- Data to be submitted.
44
+ #
45
+ # ==== Example
46
+ # data = {
47
+ # activity_type: 'note',
48
+ # object_type: 'contacts',
49
+ # object_id: 1
50
+ # }
51
+ # @data = @mints_user.create_object_activity(data)
52
+ def create_object_activity(data)
53
+ @client.raw('post', '/helpers/object-activities', nil, data_transform(data))
54
+ end
71
55
 
72
- # === Delete object activity.
73
- # Delete an object activity.
74
- #
75
- # ==== Parameters
76
- # id:: (Integer) -- Object activity id.
77
- #
78
- # ==== Example
79
- # @data = @mints_user.delete_object_activity(573)
80
- def delete_object_activity(id)
81
- @client.raw("delete", "/helpers/object-activities/#{id}")
82
- end
83
- end
56
+ # === Update object activity.
57
+ # Update an object activity info.
58
+ #
59
+ # ==== Parameters
60
+ # id:: (Integer) -- Object activity id.
61
+ # data:: (Hash) -- Data to be submitted.
62
+ #
63
+ # ==== Example
64
+ # data = {
65
+ # activity_type: 'ticket'
66
+ # }
67
+ # @data = @mints_user.update_object_activity(573, data)
68
+ def update_object_activity(id, data)
69
+ @client.raw('put', "/helpers/object-activities/#{id}", nil, data_transform(data))
70
+ end
71
+
72
+ # === Delete object activity.
73
+ # Delete an object activity.
74
+ #
75
+ # ==== Parameters
76
+ # id:: (Integer) -- Object activity id.
77
+ #
78
+ # ==== Example
79
+ # @data = @mints_user.delete_object_activity(573)
80
+ def delete_object_activity(id)
81
+ @client.raw('delete', "/helpers/object-activities/#{id}")
82
+ end
83
+ end