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,124 +1,122 @@
1
1
  module StoryVersions
2
- # === Get story versions.
3
- # Get a collection of story versions.
4
- #
5
- # ==== Parameters
6
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
7
- # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
8
- #
9
- # ==== First Example
10
- # @data = @mints_user.get_story_versions
11
- #
12
- # ==== Second Example
13
- # options = {
14
- # "fields": "id, title"
15
- # }
16
- # @data = @mints_user.get_story_versions(options)
17
- #
18
- # ==== Third Example
19
- # options = {
20
- # "fields": "id, title"
21
- # }
22
- # @data = @mints_user.get_story_versions(options, true)
23
- def get_story_versions(options = nil, use_post = true)
24
- return get_query_results("/content/story-versions", options, use_post)
25
- end
2
+ # === Get story versions.
3
+ # Get a collection of story versions.
4
+ #
5
+ # ==== Parameters
6
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
7
+ # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
8
+ #
9
+ # ==== First Example
10
+ # @data = @mints_user.get_story_versions
11
+ #
12
+ # ==== Second Example
13
+ # options = {
14
+ # fields: 'id, title'
15
+ # }
16
+ # @data = @mints_user.get_story_versions(options)
17
+ #
18
+ # ==== Third Example
19
+ # options = {
20
+ # fields: 'id, title'
21
+ # }
22
+ # @data = @mints_user.get_story_versions(options, true)
23
+ def get_story_versions(options = nil, use_post = true)
24
+ get_query_results('/content/story-versions', options, use_post)
25
+ end
26
26
 
27
- # === Get story version.
28
- # Get a story version info.
29
- #
30
- # ==== Parameters
31
- # id:: (Integer) -- Story version id.
32
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
33
- #
34
- # ==== First Example
35
- # @data = @mints_user.get_story_version(1)
36
- #
37
- # ==== Second Example
38
- # options = {
39
- # "fields": "id, title"
40
- # }
41
- # @data = @mints_user.get_story_version(1, options)
42
- def get_story_version(id, options = nil)
43
- @client.raw("get", "/content/story-versions/#{id}", options)
44
- end
27
+ # === Get story version.
28
+ # Get a story version info.
29
+ #
30
+ # ==== Parameters
31
+ # id:: (Integer) -- Story version id.
32
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
33
+ #
34
+ # ==== First Example
35
+ # @data = @mints_user.get_story_version(1)
36
+ #
37
+ # ==== Second Example
38
+ # options = {
39
+ # fields: 'id, title'
40
+ # }
41
+ # @data = @mints_user.get_story_version(1, options)
42
+ def get_story_version(id, options = nil)
43
+ @client.raw('get', "/content/story-versions/#{id}", options)
44
+ end
45
45
 
46
- # === Create story version.
47
- # Create a story version with data.
48
- #
49
- # ==== Parameters
50
- # data:: (Hash) -- Data to be submitted.
51
- #
52
- # ==== Example
53
- # data = {
54
- # "title": "New Story",
55
- # "slug": "new-story",
56
- # "social_metadata": "social metadata"
57
- # }
58
- # @data = @mints_user.create_story_version(data)
59
- def create_story_version(data, options = nil)
60
- @client.raw("post", "/content/story-versions", options, data_transform(data))
61
- end
46
+ # === Create story version.
47
+ # Create a story version with data.
48
+ #
49
+ # ==== Parameters
50
+ # data:: (Hash) -- Data to be submitted.
51
+ #
52
+ # ==== Example
53
+ # data = {
54
+ # title: 'New Story',
55
+ # slug: 'new-story',
56
+ # social_metadata: 'social metadata'
57
+ # }
58
+ # @data = @mints_user.create_story_version(data)
59
+ def create_story_version(data, options = nil)
60
+ @client.raw('post', '/content/story-versions', options, data_transform(data))
61
+ end
62
62
 
63
- # === Update story version.
64
- # Update a story version info.
65
- #
66
- # ==== Parameters
67
- # id:: (Integer) -- Story version id.
68
- # data:: (Hash) -- Data to be submitted.
69
- #
70
- # ==== Example
71
- # data = {
72
- # "title": "New Story Modified",
73
- # "slug": "new-story"
74
- # }
75
- # @data = @mints_user.update_story_version(5, data)
76
- def update_story_version(id, data, options = nil)
77
- @client.raw("put", "/content/story-versions/#{id}", options, data_transform(data))
78
- end
63
+ # === Update story version.
64
+ # Update a story version info.
65
+ #
66
+ # ==== Parameters
67
+ # id:: (Integer) -- Story version id.
68
+ # data:: (Hash) -- Data to be submitted.
69
+ #
70
+ # ==== Example
71
+ # data = {
72
+ # title: 'New Story Modified',
73
+ # slug: 'new-story'
74
+ # }
75
+ # @data = @mints_user.update_story_version(5, data)
76
+ def update_story_version(id, data, options = nil)
77
+ @client.raw('put', "/content/story-versions/#{id}", options, data_transform(data))
78
+ end
79
79
 
80
- # === Delete story version.
81
- # Delete a story version.
82
- #
83
- # ==== Parameters
84
- # id:: (Integer) -- Story version id.
85
- #
86
- # ==== Example
87
- # @data = @mints_user.delete_story_version(6)
88
- def delete_story_version(id)
89
- @client.raw("delete", "/content/story-versions/#{id}")
90
- end
80
+ # === Delete story version.
81
+ # Delete a story version.
82
+ #
83
+ # ==== Parameters
84
+ # id:: (Integer) -- Story version id.
85
+ #
86
+ # ==== Example
87
+ # @data = @mints_user.delete_story_version(6)
88
+ def delete_story_version(id)
89
+ @client.raw('delete', "/content/story-versions/#{id}")
90
+ end
91
91
 
92
- # === Duplicate story version.
93
- # Duplicate a story version.
94
- #
95
- # ==== Parameters
96
- # id:: (Integer) -- Story version id.
97
- # data:: (Hash) -- Data to be submitted.
98
- #
99
- # ==== Example
100
- # data = {
101
- # "options": []
102
- # }
103
- # @data = @mints_user.duplicate_story_version(1, data.to_json)
104
- def duplicate_story_version(id, data)
105
- @client.raw("post", "/content/story-versions/#{id}/duplicate", nil, data)
106
- end
92
+ # === Duplicate story version.
93
+ # Duplicate a story version.
94
+ #
95
+ # ==== Parameters
96
+ # id:: (Integer) -- Story version id.
97
+ # data:: (Hash) -- Data to be submitted.
98
+ #
99
+ # ==== Example
100
+ # data = { options: [] }
101
+ # @data = @mints_user.duplicate_story_version(1, data.to_json)
102
+ def duplicate_story_version(id, data)
103
+ @client.raw('post', "/content/story-versions/#{id}/duplicate", nil, data)
104
+ end
107
105
 
108
- # === Publish story version.
109
- # Publish a story version.
110
- #
111
- # ==== Parameters
112
- # id:: (Integer) -- Story version id.
113
- # data:: (Hash) -- Data to be submitted.
114
- #
115
- # ==== Example
116
- # data = {
117
- # "title": "New Story Modified",
118
- # "slug": "new-story"
119
- # }
120
- # @data = @mints_user.publish_story_version(1, data.to_json)
121
- def publish_story_version(id, data)
122
- @client.raw("put", "/content/story-versions/#{id}/publish", nil, data)
123
- end
124
- end
106
+ # === Publish story version.
107
+ # Publish a story version.
108
+ #
109
+ # ==== Parameters
110
+ # id:: (Integer) -- Story version id.
111
+ # data:: (Hash) -- Data to be submitted.
112
+ #
113
+ # ==== Example
114
+ # data = {
115
+ # title: 'New Story Modified',
116
+ # slug: 'new-story'
117
+ # }
118
+ # @data = @mints_user.publish_story_version(1, data.to_json)
119
+ def publish_story_version(id, data)
120
+ @client.raw('put', "/content/story-versions/#{id}/publish", nil, data)
121
+ end
122
+ end
@@ -1,111 +1,109 @@
1
1
  module Companies
2
- ##
3
- # == Companies
4
- #
2
+ ##
3
+ # == Companies
4
+ #
5
5
 
6
- ##
7
- # === Get companies support data.
8
- # Get support data of companies.
9
- #
10
- # ==== Example
11
- # @data = @mints_user.get_companies_support_data
12
- def get_companies_support_data
13
- @client.raw("get", "/crm/companies/support-data")
14
- end
15
-
16
- # === Get companies.
17
- # Get a collection of companies.
18
- #
19
- # ==== Parameters
20
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
21
- # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
22
- #
23
- # ==== First Example
24
- # @data = @mints_user.get_companies
25
- #
26
- # ==== Second Example
27
- # options = { "fields": "id, title", "sort": "-id" }
28
- # @data = @mints_user.get_companies(options)
29
- #
30
- # ==== Third Example
31
- # options = { "fields": "id, title", "sort": "-id" }
32
- # @data = @mints_user.get_companies(options, false)
33
- def get_companies(options = nil, use_post = true)
34
- return get_query_results("/crm/companies", options, use_post)
35
- end
36
-
37
- # === Get company.
38
- # Get a company info.
39
- #
40
- # ==== Parameters
41
- # id:: (Integer) -- Company 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_company(21)
46
- #
47
- # ==== Second Example
48
- # options = { "fields": "id, title" }
49
- # @data = @mints_user.get_company(21, options)
50
- def get_company(id, options = nil)
51
- @client.raw("get", "/crm/companies/#{id}", options)
52
- end
53
-
54
- # === Create company.
55
- # Create a company with data.
56
- #
57
- # ==== Parameters
58
- # data:: (Hash) -- Data to be submitted.
59
- #
60
- # ==== Example
61
- # data = {
62
- # "title": "Company Title",
63
- # "alias": "Alias",
64
- # "website": "www.company.example.com",
65
- # "street1": "Company St",
66
- # "city": "Company City",
67
- # "region": "Company Region",
68
- # "postal_code": "12345",
69
- # "country_id": 144,
70
- # "tax_identifier": nil
71
- # }
72
- # @data = @mints_user.create_company(data)
73
- def create_company(data, options = nil)
74
- @client.raw("post", "/crm/companies/", options, data_transform(data))
75
- end
6
+ ##
7
+ # === Get companies support data.
8
+ # Get support data of companies.
9
+ #
10
+ # ==== Example
11
+ # @data = @mints_user.get_companies_support_data
12
+ def get_companies_support_data
13
+ @client.raw('get', '/crm/companies/support-data')
14
+ end
76
15
 
77
- # === Update company.
78
- # Update a company info.
79
- #
80
- # ==== Parameters
81
- # id:: (Integer) -- Company id.
82
- # data:: (Hash) -- Data to be submitted.
83
- #
84
- # ==== Example
85
- # data = {
86
- # "title": "Company Title Modified"
87
- # }
88
- # @data = @mints_user.update_company(23, data)
89
- def update_company(id, data, options = nil)
90
- @client.raw("put", "/crm/companies/#{id}", options, data_transform(data))
91
- end
16
+ # === Get companies.
17
+ # Get a collection of companies.
18
+ #
19
+ # ==== Parameters
20
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
21
+ # use_post:: (Boolean) -- Variable to determine if the request is by 'post' or 'get' functions.
22
+ #
23
+ # ==== First Example
24
+ # @data = @mints_user.get_companies
25
+ #
26
+ # ==== Second Example
27
+ # options = { fields: 'id, title', sort: '-id' }
28
+ # @data = @mints_user.get_companies(options)
29
+ #
30
+ # ==== Third Example
31
+ # options = { fields: 'id, title', sort: '-id' }
32
+ # @data = @mints_user.get_companies(options, false)
33
+ def get_companies(options = nil, use_post = true)
34
+ get_query_results('/crm/companies', options, use_post)
35
+ end
92
36
 
93
- ##
94
- # == Companies Bulk Actions
95
- #
37
+ # === Get company.
38
+ # Get a company info.
39
+ #
40
+ # ==== Parameters
41
+ # id:: (Integer) -- Company 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_company(21)
46
+ #
47
+ # ==== Second Example
48
+ # options = { fields: 'id, title' }
49
+ # @data = @mints_user.get_company(21, options)
50
+ def get_company(id, options = nil)
51
+ @client.raw('get', "/crm/companies/#{id}", options)
52
+ end
96
53
 
97
- # === Delete Companies.
98
- # Delete a group of companies.
99
- #
100
- # ==== Parameters
101
- # data:: (Hash) -- Data to be submitted.
102
- #
103
- # ==== Example
104
- # data = {
105
- # "ids": [ 21, 22 ]
106
- # }
107
- # @data = @mints_user.delete_companies(data)
108
- def delete_companies(data)
109
- @client.raw("delete", "/crm/companies/delete", nil, data_transform(data))
110
- end
54
+ # === Create company.
55
+ # Create a company with data.
56
+ #
57
+ # ==== Parameters
58
+ # data:: (Hash) -- Data to be submitted.
59
+ #
60
+ # ==== Example
61
+ # data = {
62
+ # title: 'Company Title',
63
+ # alias: 'Alias',
64
+ # website: 'www.company.example.com',
65
+ # street1: 'Company St',
66
+ # city: 'Company City',
67
+ # region: 'Company Region',
68
+ # postal_code: '12345',
69
+ # country_id: 144,
70
+ # tax_identifier: nil
71
+ # }
72
+ # @data = @mints_user.create_company(data)
73
+ def create_company(data, options = nil)
74
+ @client.raw('post', '/crm/companies/', options, data_transform(data))
75
+ end
76
+
77
+ # === Update company.
78
+ # Update a company info.
79
+ #
80
+ # ==== Parameters
81
+ # id:: (Integer) -- Company id.
82
+ # data:: (Hash) -- Data to be submitted.
83
+ #
84
+ # ==== Example
85
+ # data = {
86
+ # title: 'Company Title Modified'
87
+ # }
88
+ # @data = @mints_user.update_company(23, data)
89
+ def update_company(id, data, options = nil)
90
+ @client.raw('put', "/crm/companies/#{id}", options, data_transform(data))
91
+ end
92
+
93
+ ##
94
+ # == Companies Bulk Actions
95
+ #
96
+
97
+ # === Delete Companies.
98
+ # Delete a group of companies.
99
+ #
100
+ # ==== Parameters
101
+ # data:: (Hash) -- Data to be submitted.
102
+ #
103
+ # ==== Example
104
+ # data = { ids: %w[21 22] }
105
+ # @data = @mints_user.delete_companies(data)
106
+ def delete_companies(data)
107
+ @client.raw('delete', '/crm/companies/delete', nil, data_transform(data))
108
+ end
111
109
  end