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,104 +1,104 @@
1
1
  module ProductTemplates
2
- ##
3
- # == Product Templates
4
- #
2
+ ##
3
+ # == Product Templates
4
+ #
5
5
 
6
- # === Get product templates support data from product.
7
- # Get product templates support data from a product.
8
- #
9
- # ==== Parameters
10
- # id:: (Integer) -- Product id.
11
- #
12
- # ==== Example
13
- # @data = @mints_user.get_product_templates_support_data_from_product(1)
14
- def get_product_templates_support_data_from_product(id)
15
- @client.raw("get", "/ecommerce/product-templates/support-data/products/#{id}")
16
- end
6
+ # === Get product templates support data from product.
7
+ # Get product templates support data from a product.
8
+ #
9
+ # ==== Parameters
10
+ # id:: (Integer) -- Product id.
11
+ #
12
+ # ==== Example
13
+ # @data = @mints_user.get_product_templates_support_data_from_product(1)
14
+ def get_product_templates_support_data_from_product(id)
15
+ @client.raw('get', "/ecommerce/product-templates/support-data/products/#{id}")
16
+ end
17
17
 
18
- # === Get product templates support data from order items group.
19
- # Get product templates support data from a order items group.
20
- #
21
- # ==== Parameters
22
- # id:: (Integer) -- Order items group id.
23
- #
24
- # ==== Example
25
- # @data = @mints_user.get_product_templates_support_data_from_order_items_group(1)
26
- def get_product_templates_support_data_from_order_items_group(id)
27
- @client.raw("get", "/ecommerce/product-templates/support-data/order-items-groups/#{id}")
28
- end
18
+ # === Get product templates support data from order items group.
19
+ # Get product templates support data from a order items group.
20
+ #
21
+ # ==== Parameters
22
+ # id:: (Integer) -- Order items group id.
23
+ #
24
+ # ==== Example
25
+ # @data = @mints_user.get_product_templates_support_data_from_order_items_group(1)
26
+ def get_product_templates_support_data_from_order_items_group(id)
27
+ @client.raw('get', "/ecommerce/product-templates/support-data/order-items-groups/#{id}")
28
+ end
29
29
 
30
- # === Get product templates support data.
31
- # Get support data used in product templates.
32
- #
33
- # ==== Example
34
- # @data = @mints_user.get_product_templates_support_data
35
- def get_product_templates_support_data
36
- @client.raw("get", "/ecommerce/product-templates/support-data")
37
- end
38
-
39
- # === Get product templates.
40
- # Get a collection of product templates.
41
- #
42
- # ==== Parameters
43
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
44
- #
45
- # ==== First Example
46
- # @data = @mints_user.get_product_templates
47
- #
48
- # ==== Second Example
49
- # options = { "fields": "title" }
50
- # @data = @mints_user.get_product_templates(options)
51
- def get_product_templates(options = nil)
52
- @client.raw("get", "/ecommerce/product-templates", options)
53
- end
30
+ # === Get product templates support data.
31
+ # Get support data used in product templates.
32
+ #
33
+ # ==== Example
34
+ # @data = @mints_user.get_product_templates_support_data
35
+ def get_product_templates_support_data
36
+ @client.raw('get', "/ecommerce/product-templates/support-data")
37
+ end
54
38
 
55
- # === Get product template.
56
- # Get a product template info.
57
- #
58
- # ==== Parameters
59
- # id:: (Integer) -- Product template id.
60
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
61
- #
62
- # ==== First Example
63
- # @data = @mints_user.get_product_template(1)
64
- #
65
- # ==== Second Example
66
- # options = { "fields": "title" }
67
- # @data = @mints_user.get_product_template(1, options)
68
- def get_product_template(id, options = nil)
69
- @client.raw("get", "/ecommerce/product-templates/#{id}", options)
70
- end
71
-
72
- # === Create product template.
73
- # Create a product template with data.
74
- #
75
- # ==== Parameters
76
- # data:: (Hash) -- Data to be submitted.
77
- #
78
- # ==== Example
79
- # data = {
80
- # "title": "New Product Template",
81
- # "slug": "new-product-template"
82
- # }
83
- # @data = @mints_user.create_product_template(data)
84
- def create_product_template(data)
85
- @client.raw("post", "/ecommerce/product-templates/", nil, data_transform(data))
86
- end
87
-
88
- # === Update product template.
89
- # Update a product template info.
90
- #
91
- # ==== Parameters
92
- # id:: (Integer) -- Product template id.
93
- # data:: (Hash) -- Data to be submitted.
94
- #
95
- # ==== Example
96
- # data = {
97
- # "title": "New Product Template Modified",
98
- # "slug": "new-product-template"
99
- # }
100
- # @data = @mints_user.update_product_template(3, data)
101
- def update_product_template(id, data)
102
- @client.raw("put", "/ecommerce/product-templates/#{id}", nil, data_transform(data))
103
- end
104
- end
39
+ # === Get product templates.
40
+ # Get a collection of product templates.
41
+ #
42
+ # ==== Parameters
43
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
44
+ #
45
+ # ==== First Example
46
+ # @data = @mints_user.get_product_templates
47
+ #
48
+ # ==== Second Example
49
+ # options = { fields: 'title' }
50
+ # @data = @mints_user.get_product_templates(options)
51
+ def get_product_templates(options = nil)
52
+ @client.raw('get', '/ecommerce/product-templates', options)
53
+ end
54
+
55
+ # === Get product template.
56
+ # Get a product template info.
57
+ #
58
+ # ==== Parameters
59
+ # id:: (Integer) -- Product template id.
60
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
61
+ #
62
+ # ==== First Example
63
+ # @data = @mints_user.get_product_template(1)
64
+ #
65
+ # ==== Second Example
66
+ # options = { fields: 'title' }
67
+ # @data = @mints_user.get_product_template(1, options)
68
+ def get_product_template(id, options = nil)
69
+ @client.raw('get', "/ecommerce/product-templates/#{id}", options)
70
+ end
71
+
72
+ # === Create product template.
73
+ # Create a product template with data.
74
+ #
75
+ # ==== Parameters
76
+ # data:: (Hash) -- Data to be submitted.
77
+ #
78
+ # ==== Example
79
+ # data = {
80
+ # title: 'New Product Template',
81
+ # slug: 'new-product-template'
82
+ # }
83
+ # @data = @mints_user.create_product_template(data)
84
+ def create_product_template(data)
85
+ @client.raw('post', '/ecommerce/product-templates/', nil, data_transform(data))
86
+ end
87
+
88
+ # === Update product template.
89
+ # Update a product template info.
90
+ #
91
+ # ==== Parameters
92
+ # id:: (Integer) -- Product template id.
93
+ # data:: (Hash) -- Data to be submitted.
94
+ #
95
+ # ==== Example
96
+ # data = {
97
+ # title: 'New Product Template Modified',
98
+ # slug: 'new-product-template'
99
+ # }
100
+ # @data = @mints_user.update_product_template(3, data)
101
+ def update_product_template(id, data)
102
+ @client.raw('put', "/ecommerce/product-templates/#{id}", nil, data_transform(data))
103
+ end
104
+ end
@@ -1,129 +1,131 @@
1
1
  module ProductVariations
2
- ##
3
- # == Product Variation
4
- #
2
+ ##
3
+ # == Product Variation
4
+ #
5
5
 
6
- # === Generate product variation.
7
- # Generate a product variation.
8
- #
9
- # ==== Parameters
10
- # productId:: (Integer) -- Product id.
11
- # data:: (Hash) -- Data to be submitted.
12
- #
13
- def generate_product_variation(productId, data) #TODO: Research use
14
- #TODO: Notify line 247 had a '/' before Exception
15
- @client.raw("post", "/ecommerce/product-variations/generate/#{productId}", nil, data_transform(data))
16
- end
6
+ # === Generate product variation.
7
+ # Generate a product variation.
8
+ #
9
+ # ==== Parameters
10
+ # product_id:: (Integer) -- Product id.
11
+ # data:: (Hash) -- Data to be submitted.
12
+ #
13
+ def generate_product_variation(product_id, data)
14
+ # TODO: Research use
15
+ # TODO: Notify line 247 had a '/' before Exception
16
+ @client.raw('post', "/ecommerce/product-variations/generate/#{product_id}", nil, data_transform(data))
17
+ end
17
18
 
18
- # === Set prices to product variations.
19
- # Set prices to product variations.
20
- #
21
- # ==== Parameters
22
- # data:: (Hash) -- Data to be submitted.
23
- #
24
- # ==== Example
25
- # skus = [
26
- # { "id": 100 }
27
- # ]
28
- # prices = [
29
- # { "id": 1, "value": 1259 },
30
- # { "id": 2, "value": 1260 }
31
- # ]
32
- # data = {
33
- # "skus": skus.to_json,
34
- # "prices": prices.to_json
35
- # }
36
- # @data = @mints_user.set_prices_to_product_variations(data)
37
- def set_prices_to_product_variations(data)
38
- @client.raw("post", "/ecommerce/product-variations/set-prices", nil, data_transform(data))
39
- end
19
+ # === Set prices to product variations.
20
+ # Set prices to product variations.
21
+ #
22
+ # ==== Parameters
23
+ # data:: (Hash) -- Data to be submitted.
24
+ #
25
+ # ==== Example
26
+ # skus = [
27
+ # { id: 100 }
28
+ # ]
29
+ # prices = [
30
+ # { id: 1, value: 1259 },
31
+ # { id: 2, value: 1260 }
32
+ # ]
33
+ # data = {
34
+ # skus: skus,
35
+ # prices: prices
36
+ # }.to_json
37
+ #
38
+ # @data = @mints_user.set_prices_to_product_variations(data)
39
+ def set_prices_to_product_variations(data)
40
+ @client.raw('post', '/ecommerce/product-variations/set-prices', nil, data_transform(data))
41
+ end
40
42
 
41
- # === Get product from product variation.
42
- # Get a product from a product variation.
43
- #
44
- # ==== Parameters
45
- # productId:: (Integer) -- Product id.
46
- #
47
- # ==== Example
48
- # @data = @mints_user.get_product_from_product_variation(1)
49
- def get_product_from_product_variation(productId)
50
- @client.raw("get", "/ecommerce/product-variations/product/#{productId}")
51
- end
43
+ # === Get product from product variation.
44
+ # Get a product from a product variation.
45
+ #
46
+ # ==== Parameters
47
+ # product_id:: (Integer) -- Product id.
48
+ #
49
+ # ==== Example
50
+ # @data = @mints_user.get_product_from_product_variation(1)
51
+ def get_product_from_product_variation(product_id)
52
+ @client.raw('get', "/ecommerce/product-variations/product/#{product_id}")
53
+ end
52
54
 
53
- # === Get product variations.
54
- # Get a collection of product variations.
55
- #
56
- # ==== Parameters
57
- # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
58
- #
59
- # ==== Example
60
- # @data = @mints_user.get_product_variations
61
- def get_product_variations
62
- @client.raw("get", "/ecommerce/product-variations")
63
- end
55
+ # === Get product variations.
56
+ # Get a collection of product variations.
57
+ #
58
+ # ==== Parameters
59
+ # options:: (Hash) -- List of Resource Collection Options shown above can be used as parameter.
60
+ #
61
+ # ==== Example
62
+ # @data = @mints_user.get_product_variations
63
+ def get_product_variations
64
+ @client.raw('get', '/ecommerce/product-variations')
65
+ end
64
66
 
65
- # === Get product variation.
66
- # Get a product variation info.
67
- #
68
- # ==== Parameters
69
- # id:: (Integer) -- Product variation id.
70
- #
71
- # ==== Example
72
- # @data = @mints_user.get_product_variation(100)
73
- def get_product_variation(id)
74
- @client.raw("get", "/ecommerce/product-variations/#{id}")
75
- end
67
+ # === Get product variation.
68
+ # Get a product variation info.
69
+ #
70
+ # ==== Parameters
71
+ # id:: (Integer) -- Product variation id.
72
+ #
73
+ # ==== Example
74
+ # @data = @mints_user.get_product_variation(100)
75
+ def get_product_variation(id)
76
+ @client.raw('get', "/ecommerce/product-variations/#{id}")
77
+ end
76
78
 
77
- # === Create product variation.
78
- # Create a product variation with data.
79
- #
80
- # ==== Parameters
81
- # data:: (Hash) -- Data to be submitted.
82
- #
83
- # ==== Example
84
- # data = {
85
- # "title": "New Product Variation",
86
- # "sku": "NEW-PRODUCT-VARIATION-SKU",
87
- # "product_id": 5,
88
- # "supplier": 36,
89
- # "prices": [
90
- # { "id": 1, "value": 300 }
91
- # ]
92
- # }
93
- # @data = @mints_user.create_product_variation(data)
94
- def create_product_variation(data)
95
- @client.raw("post", "/ecommerce/product-variations", nil, data_transform(data))
96
- end
79
+ # === Create product variation.
80
+ # Create a product variation with data.
81
+ #
82
+ # ==== Parameters
83
+ # data:: (Hash) -- Data to be submitted.
84
+ #
85
+ # ==== Example
86
+ # data = {
87
+ # title: 'New Product Variation',
88
+ # sku: 'NEW-PRODUCT-VARIATION-SKU',
89
+ # product_id: 5,
90
+ # supplier: 36,
91
+ # prices: [
92
+ # { id: 1, value: 300 }
93
+ # ]
94
+ # }
95
+ # @data = @mints_user.create_product_variation(data)
96
+ def create_product_variation(data)
97
+ @client.raw('post', '/ecommerce/product-variations', nil, data_transform(data))
98
+ end
97
99
 
98
- # === Update product variation.
99
- # Update a product variation info.
100
- #
101
- # ==== Parameters
102
- # id:: (Integer) -- Product variation id.
103
- # data:: (Hash) -- Data to be submitted.
104
- #
105
- # ==== Example
106
- # data = {
107
- # "title": "New Product Variation Modified",
108
- # "cost": 123,
109
- # "prices": [
110
- # { "id": 1, "value": 400 }
111
- # ]
112
- # }
113
- # @data = @mints_user.update_product_variation(528, data)
114
- def update_product_variation(id, data)
115
- @client.raw("put", "/ecommerce/product-variations/#{id}", nil, data_transform(data))
116
- end
100
+ # === Update product variation.
101
+ # Update a product variation info.
102
+ #
103
+ # ==== Parameters
104
+ # id:: (Integer) -- Product variation id.
105
+ # data:: (Hash) -- Data to be submitted.
106
+ #
107
+ # ==== Example
108
+ # data = {
109
+ # title: 'New Product Variation Modified',
110
+ # cost: 123,
111
+ # prices: [
112
+ # { id: 1, value: 400 }
113
+ # ]
114
+ # }
115
+ # @data = @mints_user.update_product_variation(528, data)
116
+ def update_product_variation(id, data)
117
+ @client.raw('put', "/ecommerce/product-variations/#{id}", nil, data_transform(data))
118
+ end
117
119
 
118
- # === Delete product variation.
119
- # Delete a product variation.
120
- #
121
- # ==== Parameters
122
- # id:: (Integer) -- Product variation id.
123
- #
124
- # ==== Example
125
- # @data = @mints_user.delete_product_variation(528)
126
- def delete_product_variation(id)
127
- @client.raw("delete", "/ecommerce/product-variations/#{id}")
128
- end
129
- end
120
+ # === Delete product variation.
121
+ # Delete a product variation.
122
+ #
123
+ # ==== Parameters
124
+ # id:: (Integer) -- Product variation id.
125
+ #
126
+ # ==== Example
127
+ # @data = @mints_user.delete_product_variation(528)
128
+ def delete_product_variation(id)
129
+ @client.raw('delete', "/ecommerce/product-variations/#{id}")
130
+ end
131
+ end