mints 0.0.27 → 0.0.28

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 (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,111 +1,102 @@
1
1
  module Profile
2
- ##
3
- # === Me.
4
- # Get contact logged info.
5
- #
6
- # ==== Example
7
- # @data = @mints_user.me
8
- def me(options = nil)
9
- @client.raw("get", "/profile/me", options)
10
- end
2
+ ##
3
+ # === Me.
4
+ # Get contact logged info.
5
+ #
6
+ # ==== Example
7
+ # @data = @mints_user.me
8
+ def me(options = nil)
9
+ @client.raw('get', '/profile/me', options)
10
+ end
11
11
 
12
- ##
13
- # == User Preferences
14
- #
12
+ ##
13
+ # == User Preferences
14
+ #
15
15
 
16
- ##
17
- # === Get preferences.
18
- # Get preferences of current user logged.
19
- #
20
- # ==== Example
21
- # @data = @mints_user.get_preferences
22
- def get_preferences
23
- @client.raw("get", "/profile/preferences")
24
- end
25
-
26
- ##
27
- # === Create preferences.
28
- # Create preferences of current user logged with data.
29
- #
30
- # ==== Parameters
31
- # data:: (Hash) -- Data to be submitted.
32
- #
33
- # ==== Example
34
- # data = {
35
- # "time_zone": "GMT-5"
36
- # }
37
- # @data = @mints_user.create_preferences(data)
38
- def create_preferences(data)
39
- @client.raw("post", "/profile/preferences", nil, data_transform(data))
40
- end
16
+ ##
17
+ # === Get preferences.
18
+ # Get preferences of current user logged.
19
+ #
20
+ # ==== Example
21
+ # @data = @mints_user.get_preferences
22
+ def get_preferences
23
+ @client.raw('get', '/profile/preferences')
24
+ end
41
25
 
42
- ##
43
- # === Get preferences by setting key.
44
- # Get preferences using a setting key.
45
- #
46
- # ==== Parameters
47
- # setting_key:: (String) -- Setting key.
48
- #
49
- # ==== Example
50
- # @data = @mints_user.get_preferences_by_setting_key("time_zone")
51
- def get_preferences_by_setting_key(setting_key)
52
- @client.raw("get", "/profile/preferences/#{setting_key}")
53
- end
26
+ ##
27
+ # === Create preferences.
28
+ # Create preferences of current user logged with data.
29
+ #
30
+ # ==== Parameters
31
+ # data:: (Hash) -- Data to be submitted.
32
+ #
33
+ # ==== Example
34
+ # data = {
35
+ # time_zone: 'GMT-5'
36
+ # }
37
+ # @data = @mints_user.create_preferences(data)
38
+ def create_preferences(data)
39
+ @client.raw('post', '/profile/preferences', nil, data_transform(data))
40
+ end
54
41
 
55
- ##
56
- # == Notifications
57
- #
42
+ ##
43
+ # === Get preferences by setting key.
44
+ # Get preferences using a setting key.
45
+ #
46
+ # ==== Parameters
47
+ # setting_key:: (String) -- Setting key.
48
+ #
49
+ # ==== Example
50
+ # @data = @mints_user.get_preferences_by_setting_key('time_zone')
51
+ def get_preferences_by_setting_key(setting_key)
52
+ @client.raw('get', "/profile/preferences/#{setting_key}")
53
+ end
58
54
 
59
- # === Get notifications.
60
- # Get a collection of notifications.
61
- #
62
- # ==== Example
63
- # @data = @mints_user.get_notifications
64
- def get_notifications
65
- @client.raw("get", "/profile/notifications")
66
- end
55
+ ##
56
+ # == Notifications
57
+ #
67
58
 
68
- # === Get paginated notifications.
69
- # Get a collection of paginated notifications.
70
- #
71
- # ==== Example
72
- # @data = @mints_user.get_paginated_notifications
73
- def get_paginated_notifications
74
- @client.raw("get", "/profile/notificationsp")
75
- end
59
+ # === Get notifications.
60
+ # Get a collection of notifications.
61
+ #
62
+ # ==== Example
63
+ # @data = @mints_user.get_notifications
64
+ def get_notifications(options = nil)
65
+ @client.raw('get', '/profile/notifications', options)
66
+ end
76
67
 
77
- # === Read notifications.
78
- # Read notifications by data.
79
- #
80
- # ==== Parameters
81
- # data:: (Hash) -- Data to be submitted.
82
- #
83
- # ==== Example
84
- # data = {
85
- # "ids": ["406e9b74-4a9d-42f2-afc6-1587bad6147c", "a2d9f582-1bdb-4e55-8af0-cd1962eaa88c"],
86
- # "read": true
87
- # }
88
- # @data = @mints_user.read_notifications(data)
89
- def read_notifications(data)
90
- #TODO: Inform NotificationController.read method has been modified
91
- #TODO: Method in controller didnt return data
92
- @client.raw("post", "/profile/notifications/read", nil, data_transform(data))
93
- end
94
-
95
- # === Delete notifications.
96
- # Delete notifications by data.
97
- #
98
- # ==== Parameters
99
- # data:: (Hash) -- Data to be submitted.
100
- #
101
- # ==== Example
102
- # data = {
103
- # "ids": ["179083e3-3678-4cf6-b75e-5a8b9761245e"]
104
- # }
105
- # @data = @mints_user.delete_notifications(data)
106
- def delete_notifications(data)
107
- #TODO: Inform NotificationController.delete method has been modified
108
- #TODO: Method in controller didnt return data
109
- @client.raw("post", "/profile/notifications/delete", nil, data_transform(data))
110
- end
111
- end
68
+ # === Read notifications.
69
+ # Read notifications by data.
70
+ #
71
+ # ==== Parameters
72
+ # data:: (Hash) -- Data to be submitted.
73
+ #
74
+ # ==== Example
75
+ # data = {
76
+ # ids: %w[406e9b74-4a9d-42f2-afc6-1587bad6147c a2d9f582-1bdb-4e55-8af0-cd1962eaa88c],
77
+ # read: true
78
+ # }
79
+ # @data = @mints_user.read_notifications(data)
80
+ def read_notifications(data)
81
+ # TODO: Inform NotificationController.read method has been modified
82
+ # TODO: Method in controller didnt return data
83
+ @client.raw('post', '/profile/notifications/read', nil, data_transform(data))
84
+ end
85
+
86
+ # === Delete notifications.
87
+ # Delete notifications by data.
88
+ #
89
+ # ==== Parameters
90
+ # data:: (Hash) -- Data to be submitted.
91
+ #
92
+ # ==== Example
93
+ # data = {
94
+ # ids: ['179083e3-3678-4cf6-b75e-5a8b9761245e']
95
+ # }
96
+ # @data = @mints_user.delete_notifications(data)
97
+ def delete_notifications(data)
98
+ # TODO: Inform NotificationController.delete method has been modified
99
+ # TODO: Method in controller didnt return data
100
+ @client.raw('post', '/profile/notifications/delete', nil, data_transform(data))
101
+ end
102
+ end
data/lib/user.rb CHANGED
@@ -56,7 +56,7 @@ module Mints
56
56
  email: email,
57
57
  password: password,
58
58
  }
59
- response = @client.raw("post", "/users/login", nil, data.to_json, '/api/v1', {'no_content_type': true})
59
+ response = @client.raw('post', "/users/login", nil, data.to_json, '/api/v1', {'no_content_type': true})
60
60
  if response.key? "api_token"
61
61
  @client.session_token = response["api_token"]
62
62
  end
@@ -64,7 +64,7 @@ module Mints
64
64
  end
65
65
 
66
66
  def magic_link_login(token)
67
- response = @client.raw("get", "/users/magic-link-login/#{token}", nil, nil, '/api/v1')
67
+ response = @client.raw('get', "/users/magic-link-login/#{token}", nil, nil, '/api/v1')
68
68
  return response
69
69
  end
70
70
 
@@ -76,7 +76,7 @@ module Mints
76
76
  redirectUrl: redirectUrl,
77
77
  lifeTime: lifeTime
78
78
  }
79
- response = @client.raw("post", "/users/magic-link", nil, { data: data }, '/api/v1')
79
+ response = @client.raw('post', "/users/magic-link", nil, { data: data }, '/api/v1')
80
80
  return response
81
81
  end
82
82
 
metadata CHANGED
@@ -1,109 +1,109 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruben Gomez Garcia, Omar Mora, Luis Payan, Oscar Castillo, Fabian Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-17 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json
14
+ name: addressable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.7.0
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 1.8.3
22
+ version: 2.7.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 2.7.0
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
- version: 1.8.3
32
+ version: 2.7.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: httparty
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.18.0
34
37
  - - ">="
35
38
  - !ruby/object:Gem::Version
36
- version: 0.18.0
39
+ version: '0.18'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.22'
37
43
  type: :runtime
38
44
  prerelease: false
39
45
  version_requirements: !ruby/object:Gem::Requirement
40
46
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: 0.18.0
44
47
  - - ">="
45
48
  - !ruby/object:Gem::Version
46
- version: 0.18.0
49
+ version: '0.18'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.22'
47
53
  - !ruby/object:Gem::Dependency
48
- name: redis
54
+ name: json
49
55
  requirement: !ruby/object:Gem::Requirement
50
56
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: 4.2.2
54
57
  - - ">="
55
58
  - !ruby/object:Gem::Version
56
- version: 4.2.2
59
+ version: 1.8.3
57
60
  type: :runtime
58
61
  prerelease: false
59
62
  version_requirements: !ruby/object:Gem::Requirement
60
63
  requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: 4.2.2
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 4.2.2
66
+ version: 1.8.3
67
67
  - !ruby/object:Gem::Dependency
68
- name: addressable
68
+ name: rails-reverse-proxy
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: 2.7.0
73
+ version: 0.9.1
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 2.7.0
76
+ version: 0.9.1
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 2.7.0
83
+ version: 0.9.1
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: 2.7.0
86
+ version: 0.9.1
87
87
  - !ruby/object:Gem::Dependency
88
- name: rails-reverse-proxy
88
+ name: redis
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: 0.9.1
93
+ version: 4.2.2
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.1
96
+ version: 4.2.2
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.9.1
103
+ version: 4.2.2
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
- version: 0.9.1
106
+ version: 4.2.2
107
107
  description:
108
108
  email:
109
109
  executables: []
@@ -210,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
210
  requirements:
211
211
  - - ">="
212
212
  - !ruby/object:Gem::Version
213
- version: '0'
213
+ version: 2.6.0
214
214
  required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  requirements:
216
216
  - - ">="