insightly2 0.1.8 → 0.1.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abd52718bf938cd57f32cb1862ee078e64349204
4
- data.tar.gz: c023b942fc8b9718936b750271f99d1e065aef22
3
+ metadata.gz: e00b420e422a79d3c717d616b3c3dab40865b1d0
4
+ data.tar.gz: d8d24a01ad04f871ff8032cbdfe9d8eb1885b8f5
5
5
  SHA512:
6
- metadata.gz: e74f7f5fb8e848bc03480ec05adf5b5dc93165f2cceb46b6a0a39ddf331064679a29468d5dfc4108917549b2aa2b78ce07e9615ca8f35fba51bbeac5cce72af8
7
- data.tar.gz: 61e811465e6174c1bb648f7aafa23a634446f83373095b10ef93bad13f542b3ee6b0fccd323bcfbb2a09249718d9b802af44843e1d1c542d0e0f5d938408a93d
6
+ metadata.gz: 00fb086675d2ecee6d6a7650a7428d6cff35719cc881feac8d8bb74736a179df16d21ae9f1076d5133d2d198e5fece7d1f0bd090cee520a7560e75da8e104fe1
7
+ data.tar.gz: 3df99c5ffe33d5bccb6d6495c8e05484b3a3bfec115bd9fb8421ec44dca38343ccca42ae06a299e2e41c85365a8ba23ebd77bd4bd383bc898463a9b28789c7c6
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A comment's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Comment, nil].
10
- def get_comment(id:)
10
+ def get_comment(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Comment.parse(request(:get, "Comments/#{id}"))
13
13
  end
@@ -18,7 +18,7 @@ module Insightly2
18
18
  # @param [String] filename The name of the attachment.
19
19
  # @raise [ArgumentError] If the method arguments are blank.
20
20
  # @return [Faraday::Response].
21
- def create_comment_attachment(id:, filename:)
21
+ def create_comment_attachment(id: nil, filename: nil)
22
22
  raise ArgumentError, "ID cannot be blank" if id.blank?
23
23
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
24
24
  request(:post, "Comments/?c_id=#{id}&filename=#{filename}")
@@ -29,7 +29,7 @@ module Insightly2
29
29
  # @param [Hash] comment The comment to update.
30
30
  # @raise [ArgumentError] If the method arguments are blank.
31
31
  # @return [Insightly2::Resources::Comment, nil].
32
- def update_comment(comment:)
32
+ def update_comment(comment: nil)
33
33
  raise ArgumentError, "Comment cannot be blank" if comment.blank?
34
34
  Resources::Comment.parse(request(:put, "Comments", comment))
35
35
  end
@@ -39,7 +39,7 @@ module Insightly2
39
39
  # @param [String, Fixnum] id A comment's ID.
40
40
  # @raise [ArgumentError] If the method arguments are blank.
41
41
  # @return [Faraday::Response].
42
- def delete_comment(id:)
42
+ def delete_comment(id: nil)
43
43
  raise ArgumentError, "ID cannot be blank" if id.blank?
44
44
  request(:delete, "Comments/#{id}")
45
45
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id The ID of the contact.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Contact, nil].
10
- def get_contact(id:)
10
+ def get_contact(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Contact.parse(request(:get, "Contacts/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [id:] id of the contact.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_contact_emails(id:)
20
+ def get_contact_emails(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Email.parse(request(:get, "Contacts/#{id}/Emails"))
23
23
  end
@@ -27,7 +27,7 @@ module Insightly2
27
27
  # @param [String, Fixnum] id The ID of the contact.
28
28
  # @raise [ArgumentError] If the method arguments are blank.
29
29
  # @return [Faraday::Response].
30
- def get_contact_image(id:)
30
+ def get_contact_image(id: nil)
31
31
  raise ArgumentError, "ID cannot be blank" if id.blank?
32
32
  request(:get, "Contacts/#{id}/Image")
33
33
  end
@@ -37,7 +37,7 @@ module Insightly2
37
37
  # @param [String, Fixnum] id The ID of the contact.
38
38
  # @raise [ArgumentError] If the method arguments are blank.
39
39
  # @return [Array, nil].
40
- def get_contact_notes(id:)
40
+ def get_contact_notes(id: nil)
41
41
  raise ArgumentError, "ID cannot be blank" if id.blank?
42
42
  Resources::Note.parse(request(:get, "Contacts/#{id}/Notes"))
43
43
  end
@@ -47,7 +47,7 @@ module Insightly2
47
47
  # @param [String, Fixnum] id The ID of the contact.
48
48
  # @raise [ArgumentError] If the method arguments are blank.
49
49
  # @return [Array, nil].
50
- def get_contact_tasks(id:)
50
+ def get_contact_tasks(id: nil)
51
51
  raise ArgumentError, "ID cannot be blank" if id.blank?
52
52
  Resources::Task.parse(request(:get, "Contacts/#{id}/Tasks"))
53
53
  end
@@ -68,7 +68,7 @@ module Insightly2
68
68
  # @param [Hash] contact The contact to create.
69
69
  # @raise [ArgumentError] If the method arguments are blank.
70
70
  # @return [Insightly2::Resources::Contact, nil].
71
- def create_contact(contact:)
71
+ def create_contact(contact: nil)
72
72
  raise ArgumentError, "Contact cannot be blank" if contact.blank?
73
73
  Resources::Contact.parse(request(:post, "Contacts", contact))
74
74
  end
@@ -79,7 +79,7 @@ module Insightly2
79
79
  # @param [String] filename The name of image file to be attached to the contact.
80
80
  # @raise [ArgumentError] If the method arguments are blank.
81
81
  # @return [Faraday::Response].
82
- def create_contact_image(id:, filename:)
82
+ def create_contact_image(id: nil, filename: nil)
83
83
  raise ArgumentError, "ID cannot be blank" if id.blank?
84
84
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
85
85
  request(:post, "Contacts/#{id}/Image/#{filename}")
@@ -90,7 +90,7 @@ module Insightly2
90
90
  # @param [Hash] contact The contact to update.
91
91
  # @raise [ArgumentError] If the method arguments are blank.
92
92
  # @return [Insightly2::Resources::Contact, nil].
93
- def update_contact(contact:)
93
+ def update_contact(contact: nil)
94
94
  raise ArgumentError, "Contact cannot be blank" if contact.blank?
95
95
  Resources::Contact.parse(request(:put, "Contacts", contact))
96
96
  end
@@ -101,7 +101,7 @@ module Insightly2
101
101
  # @param [String] filename The name of image file to be attached to the contact.
102
102
  # @raise [ArgumentError] If the method arguments are blank.
103
103
  # @return [Faraday::Response].
104
- def update_contact_image(id:, filename:)
104
+ def update_contact_image(id: nil, filename: nil)
105
105
  raise ArgumentError, "ID cannot be blank" if id.blank?
106
106
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
107
107
  request(:put, "Contacts/#{id}/Image/#{filename}")
@@ -112,7 +112,7 @@ module Insightly2
112
112
  # @param [String, Fixnum] id The ID of the contact to delete.
113
113
  # @raise [ArgumentError] If the method arguments are blank.
114
114
  # @return [Faraday::Response].
115
- def delete_contact(id:)
115
+ def delete_contact(id: nil)
116
116
  raise ArgumentError, "ID cannot be blank" if id.blank?
117
117
  request(:delete, "Contacts/#{id}")
118
118
  end
@@ -122,7 +122,7 @@ module Insightly2
122
122
  # @param [String, Fixnum] id The ID of the contact with the image to delete.
123
123
  # @raise [ArgumentError] If the method arguments are blank.
124
124
  # @return [Faraday::Response].
125
- def delete_contact_image(id:)
125
+ def delete_contact_image(id: nil)
126
126
  raise ArgumentError, "ID cannot be blank" if id.blank?
127
127
  request(:delete, "Contacts/#{id}/Image")
128
128
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A CustomField's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::CustomField, nil].
10
- def get_custom_field(id:)
10
+ def get_custom_field(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::CustomField.parse(request(:get, "CustomFields/#{id}"))
13
13
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id The ID of the email.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Email, nil]
10
- def get_email(id:)
10
+ def get_email(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Email.parse(request(:get, "Emails/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id The ID of the email.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_email_comments(id:)
20
+ def get_email_comments(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Comment.parse(request(:get, "Emails/#{id}/Comments"))
23
23
  end
@@ -38,7 +38,7 @@ module Insightly2
38
38
  # @param [Hash] comment The comment to create.
39
39
  # @raise [ArgumentError] If the method arguments are blank.
40
40
  # @return [Faraday::Response].
41
- def create_email_comment(id:, comment:)
41
+ def create_email_comment(id: nil, comment: nil)
42
42
  raise ArgumentError, "ID cannot be blank" if id.blank?
43
43
  raise ArgumentError, "Comment cannot be blank" if comment.blank?
44
44
  request(:post, "Emails/#{id}/Comments", comment)
@@ -49,7 +49,7 @@ module Insightly2
49
49
  # @param [String, Fixnum] id The ID of the email to delete.
50
50
  # @raise [ArgumentError] If the method arguments are blank.
51
51
  # @return [Faraday::Response].
52
- def delete_email(id:)
52
+ def delete_email(id: nil)
53
53
  raise ArgumentError, "ID cannot be blank" if id.blank?
54
54
  request(:delete, "Emails/#{id}")
55
55
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id An event's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Event, nil].
10
- def get_event(id:)
10
+ def get_event(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Event.parse(request(:get, "Events/#{id}"))
13
13
  end
@@ -24,7 +24,7 @@ module Insightly2
24
24
  # @param [Hash] event The event to create.
25
25
  # @raise [ArgumentError] If the method arguments are blank.
26
26
  # @return [Insightly2::Resources::Event, nil]
27
- def create_event(event:)
27
+ def create_event(event: nil)
28
28
  raise ArgumentError, "Event cannot be blank" if event.blank?
29
29
  Resources::Event.parse(request(:post, "Events", event))
30
30
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] event The event to update.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::Event, nil]
37
- def update_event(event:)
37
+ def update_event(event: nil)
38
38
  raise ArgumentError, "Event cannot be blank" if event.blank?
39
39
  Resources::Event.parse(request(:put, "Events", event))
40
40
  end
@@ -44,7 +44,7 @@ module Insightly2
44
44
  # @param [String, Fixnum] id An event's ID.
45
45
  # @raise [ArgumentError] If the method arguments are blank.
46
46
  # @return [Faraday::Response].
47
- def delete_event(id:)
47
+ def delete_event(id: nil)
48
48
  raise ArgumentError, "ID cannot be blank" if id.blank?
49
49
  request(:delete, "Events/#{id}")
50
50
  end
@@ -6,7 +6,7 @@ module Insightly2
6
6
  # @param [String, Fixnum] id A file attachment's ID.
7
7
  # @raise [ArgumentError] If the method arguments are blank.
8
8
  # @return [Faraday::Response].
9
- def get_file_attachment(id:)
9
+ def get_file_attachment(id: nil)
10
10
  raise ArgumentError, "ID cannot be blank" if id.blank?
11
11
  request(:get, "FileAttachments/#{id}")
12
12
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id: A file category's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::FileCategory, nil].
10
- def get_file_category(id:)
10
+ def get_file_category(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::FileCategory.parse(request(:get, "FileCategories/#{id}"))
13
13
  end
@@ -24,7 +24,7 @@ module Insightly2
24
24
  # @param [Hash] category: File Category attributes.
25
25
  # @raise [ArgumentError] If the method arguments are blank.
26
26
  # @return [Insightly2::Resources::FileCategory, nil].
27
- def create_file_category(category:)
27
+ def create_file_category(category: nil)
28
28
  raise ArgumentError, "Category cannot be blank" if category.blank?
29
29
  Resources::FileCategory.parse(request(:post, "FileCategories", category))
30
30
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] category: File Category attributes.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::FileCategory].
37
- def update_file_category(category:)
37
+ def update_file_category(category: nil)
38
38
  raise ArgumentError, "Category cannot be blank" if category.blank?
39
39
  Resources::FileCategory.parse(request(:put, "FileCategories", category))
40
40
  end
@@ -44,7 +44,7 @@ module Insightly2
44
44
  # @param [String, Fixnum] id: A file category's ID.
45
45
  # @raise [ArgumentError] If the method arguments are blank.
46
46
  # @return [Faraday::Response].
47
- def delete_file_category(id:)
47
+ def delete_file_category(id: nil)
48
48
  raise ArgumentError, "ID cannot be blank" if id.blank?
49
49
  request(:delete, "FileCategories/#{id}")
50
50
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A note's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Note, nil].
10
- def get_note(id:)
10
+ def get_note(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Note.parse(request(:get, "Notes/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id A note's ID.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_note_comments(id:)
20
+ def get_note_comments(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Comment.parse(request(:get, "Notes/#{id}/Comments"))
23
23
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] note The note to create.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::Note, nil].
37
- def create_note(note:)
37
+ def create_note(note: nil)
38
38
  raise ArgumentError, "Note cannot be blank" if note.blank?
39
39
  Resources::Note.parse(request(:post, "Notes", note))
40
40
  end
@@ -45,7 +45,7 @@ module Insightly2
45
45
  # @param [String] comment The comment to add to the note.
46
46
  # @raise [ArgumentError] If the method arguments are blank.
47
47
  # @return [Faraday::Response].
48
- def create_note_comment(id:, comment:)
48
+ def create_note_comment(id: nil, comment: nil)
49
49
  raise ArgumentError, "ID cannot be blank" if id.blank?
50
50
  raise ArgumentError, "Comment cannot be blank" if comment.blank?
51
51
  request(:post, "Notes/#{id}/Comments", comment)
@@ -57,7 +57,7 @@ module Insightly2
57
57
  # @param [String] filename The name of the file.
58
58
  # @raise [ArgumentError] If the method arguments are blank.
59
59
  # @return [Faraday::Response].
60
- def create_note_file(id:, filename:)
60
+ def create_note_file(id: nil, filename: nil)
61
61
  raise ArgumentError, "ID cannot be blank" if id.blank?
62
62
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
63
63
  request(:post, "Notes?c_id=#{id}&filename=#{filename}")
@@ -68,7 +68,7 @@ module Insightly2
68
68
  # @param [Hash] note The note to update.
69
69
  # @raise [ArgumentError] If the method arguments are blank.
70
70
  # @return [Insightly2::Resources::Note, nil].
71
- def update_note(note:)
71
+ def update_note(note: nil)
72
72
  raise ArgumentError, "Note cannot be blank" if note.blank?
73
73
  Resources::Note.parse(request(:put, "Notes", note))
74
74
  end
@@ -77,7 +77,7 @@ module Insightly2
77
77
  # @param [String, Fixnum] id A note's ID.
78
78
  # @raise [ArgumentError] If the method arguments are blank.
79
79
  # @return [Faraday::Response].
80
- def delete_note(id:)
80
+ def delete_note(id: nil)
81
81
  raise ArgumentError, "ID cannot be blank" if id.blank?
82
82
  request(:delete, "Notes/#{id}")
83
83
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id An opportunity's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Opportunity, nil].
10
- def get_opportunity(id:)
10
+ def get_opportunity(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Opportunity.parse(request(:get, "Opportunities/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id An opportunity's ID.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_opportunity_emails(id:)
20
+ def get_opportunity_emails(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Email.parse(request(:get, "Opportunities/#{id}/Emails"))
23
23
  end
@@ -26,7 +26,7 @@ module Insightly2
26
26
  # @param [String, Fixnum] id An opportunity's ID
27
27
  # @raise [ArgumentError] If the method arguments are blank.
28
28
  # @return [Faraday::Response]
29
- def get_opportunity_image(id:)
29
+ def get_opportunity_image(id: nil)
30
30
  request(:get, "Opportunities/#{id}/Image")
31
31
  end
32
32
 
@@ -35,7 +35,7 @@ module Insightly2
35
35
  # @param [String, Fixnum] id An opportunity's ID.
36
36
  # @raise [ArgumentError] If the method arguments are blank.
37
37
  # @return [Array, nil].
38
- def get_opportunity_notes(id:)
38
+ def get_opportunity_notes(id: nil)
39
39
  raise ArgumentError, "ID cannot be blank" if id.blank?
40
40
  Resources::Note.parse(request(:get, "Opportunities/#{id}/Notes"))
41
41
  end
@@ -45,7 +45,7 @@ module Insightly2
45
45
  # @param [String, Fixnum] id An opportunity's ID.
46
46
  # @raise [ArgumentError] If the method arguments are blank.
47
47
  # @return [Array, nil].
48
- def get_opportunity_state_history(id:)
48
+ def get_opportunity_state_history(id: nil)
49
49
  raise ArgumentError, "ID cannot be blank" if id.blank?
50
50
  Resources::OpportunityStateReason.parse(request(:get, "Opportunities/#{id}/StateHistory"))
51
51
  end
@@ -55,7 +55,7 @@ module Insightly2
55
55
  # @param [String, Fixnum] id An opportunity's ID.
56
56
  # @raise [ArgumentError] If the method arguments are blank.
57
57
  # @return [Array, nil].
58
- def get_opportunity_tasks(id:)
58
+ def get_opportunity_tasks(id: nil)
59
59
  raise ArgumentError, "ID cannot be blank" if id.blank?
60
60
  Resources::Task.parse(request(:get, "Opportunities/#{id}/Tasks"))
61
61
  end
@@ -75,7 +75,7 @@ module Insightly2
75
75
  # @param [Hash] opportunity The opportunity to create.
76
76
  # @raise [ArgumentError] If the method arguments are blank.
77
77
  # @return [Insightly2::Resources::Opportunity, nil].
78
- def create_opportunity(opportunity:)
78
+ def create_opportunity(opportunity: nil)
79
79
  raise ArgumentError, "Opportunity cannot be blank" if opportunity.blank?
80
80
  Resources::Opportunity.parse(request(:post, "Opportunities", opportunity))
81
81
  end
@@ -86,7 +86,7 @@ module Insightly2
86
86
  # @param [String] filename A name of a file.
87
87
  # @raise [ArgumentError] If the method arguments are blank.
88
88
  # @return [Faraday::Response]
89
- def create_opportunity_image(id:, filename:)
89
+ def create_opportunity_image(id: nil, filename: nil)
90
90
  raise ArgumentError, "ID cannot be blank" if id.blank?
91
91
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
92
92
  request(:post, "Opportunities/#{id}/Image/#{filename}")
@@ -97,7 +97,7 @@ module Insightly2
97
97
  # @param [Hash] opportunity The opportunity to update.
98
98
  # @raise [ArgumentError] If the method arguments are blank.
99
99
  # @return [Insightly2::Resources::Opportunity, nil]
100
- def update_opportunity(opportunity:)
100
+ def update_opportunity(opportunity: nil)
101
101
  raise ArgumentError, "Opportunity cannot be blank" if opportunity.blank?
102
102
  Resources::Opportunity.parse(request(:put, "Opportunities", opportunity))
103
103
  end
@@ -107,7 +107,7 @@ module Insightly2
107
107
  # @param [String] filename A name of a file.
108
108
  # @raise [ArgumentError] If the method arguments are blank.
109
109
  # @return [Faraday::Response].
110
- def update_opportunity_image(id:, filename:)
110
+ def update_opportunity_image(id: nil, filename: nil)
111
111
  raise ArgumentError, "ID cannot be blank" if id.blank?
112
112
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
113
113
  request(:put, "Opportunities/#{id}/Image/#{filename}")
@@ -117,7 +117,7 @@ module Insightly2
117
117
  # @param [String, Fixnum] id An opportunity's ID.
118
118
  # @raise [ArgumentError] If the method arguments are blank.
119
119
  # @return [Faraday::Response].
120
- def delete_opportunity(id:)
120
+ def delete_opportunity(id: nil)
121
121
  raise ArgumentError, "ID cannot be blank" if id.blank?
122
122
  request(:delete, "Opportunities/#{id}")
123
123
  end
@@ -126,7 +126,7 @@ module Insightly2
126
126
  # @param [String, Fixnum] id An opportunity's ID.
127
127
  # @raise [ArgumentError] If the method arguments are blank.
128
128
  # @return [Faraday::Response].
129
- def delete_opportunity_image(id:)
129
+ def delete_opportunity_image(id: nil)
130
130
  raise ArgumentError, "ID cannot be blank" if id.blank?
131
131
  request(:delete, "Opportunities/#{id}/Image")
132
132
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id An opportunity category's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::OpportunityCategory, nil].
10
- def get_opportunity_category(id:)
10
+ def get_opportunity_category(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::OpportunityCategory.parse(request(:get, "OpportunityCategories/#{id}"))
13
13
  end
@@ -24,7 +24,7 @@ module Insightly2
24
24
  # @param [Hash] category The opportunity category to create.
25
25
  # @raise [ArgumentError] If the method arguments are blank.
26
26
  # @return [Insightly2::Resources::OpportunityCategory, nil].
27
- def create_opportunity_category(category:)
27
+ def create_opportunity_category(category: nil)
28
28
  raise ArgumentError, "Category cannot be blank" if category.blank?
29
29
  Resources::OpportunityCategory.parse(request(:post, "OpportunityCategories", category))
30
30
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] category The opportunity category to update.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::OpportunityCategory, nil].
37
- def update_opportunity_category(category:)
37
+ def update_opportunity_category(category: nil)
38
38
  raise ArgumentError, "Category cannot be blank" if category.blank?
39
39
  Resources::OpportunityCategory.parse(request(:put, "OpportunityCategories", category))
40
40
  end
@@ -44,7 +44,7 @@ module Insightly2
44
44
  # @param [String, Fixnum] id A OpportunityCategory's ID.
45
45
  # @raise [ArgumentError] If the method arguments are blank.
46
46
  # @return [Faraday::Response].
47
- def delete_opportunity_category(id:)
47
+ def delete_opportunity_category(id: nil)
48
48
  raise ArgumentError, "ID cannot be blank" if id.blank?
49
49
  request(:delete, "OpportunityCategories/#{id}")
50
50
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id An organisation's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Organisation, nil].
10
- def get_organisation(id:)
10
+ def get_organisation(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Organisation.parse(request(:get, "Organisations/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id An organisation's ID.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_organisation_emails(id:)
20
+ def get_organisation_emails(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Email.parse(request(:get, "Organisations/#{id}/Emails"))
23
23
  end
@@ -27,7 +27,7 @@ module Insightly2
27
27
  # @param [String, Fixnum] id An organisation's ID
28
28
  # @raise [ArgumentError] If the method arguments are blank.
29
29
  # @return [Faraday::Response].
30
- def get_organisation_image(id:)
30
+ def get_organisation_image(id: nil)
31
31
  request(:get, "Organisations/#{id}/Image")
32
32
  end
33
33
 
@@ -36,7 +36,7 @@ module Insightly2
36
36
  # @param [String, Fixnum] id An organisation's ID.
37
37
  # @raise [ArgumentError] If the method arguments are blank.
38
38
  # @return [Array, nil].
39
- def get_organisation_notes(id:)
39
+ def get_organisation_notes(id: nil)
40
40
  raise ArgumentError, "ID cannot be blank" if id.blank?
41
41
  Resources::Note.parse(request(:get, "Organisations/#{id}/Notes"))
42
42
  end
@@ -46,7 +46,7 @@ module Insightly2
46
46
  # @param [String, Fixnum] id An organisation's ID.
47
47
  # @raise [ArgumentError] If the method arguments are blank.
48
48
  # @return [Array, nil].
49
- def get_organisation_tasks(id:)
49
+ def get_organisation_tasks(id: nil)
50
50
  raise ArgumentError, "ID cannot be blank" if id.blank?
51
51
  Resources::Task.parse(request(:get, "Organisations/#{id}/Tasks"))
52
52
  end
@@ -66,7 +66,7 @@ module Insightly2
66
66
  # @param [Hash] organisation The organisation to create.
67
67
  # @raise [ArgumentError] If the method arguments are blank.
68
68
  # @return [Insightly2::Resources::Organisation].
69
- def create_organisation(organisation:)
69
+ def create_organisation(organisation: nil)
70
70
  raise ArgumentError, "Organisation cannot be blank" if organisation.blank?
71
71
  Resources::Organisation.parse(request(:post, "Organisations", organisation))
72
72
  end
@@ -77,7 +77,7 @@ module Insightly2
77
77
  # @param [String] filename The name of the file.
78
78
  # @raise [ArgumentError] If the method arguments are blank.
79
79
  # @return [Faraday::Response].
80
- def create_organisation_image(id:, filename:)
80
+ def create_organisation_image(id: nil, filename: nil)
81
81
  raise ArgumentError, "ID cannot be blank" if id.blank?
82
82
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
83
83
  request(:post, "Organisations/#{id}/Image/#{filename}")
@@ -88,7 +88,7 @@ module Insightly2
88
88
  # @param [Hash] organisation The organisation to update.
89
89
  # @raise [ArgumentError] If the method arguments are blank.
90
90
  # @return [Insightly2::Resources::Organisation, nil].
91
- def update_organisation(organisation:)
91
+ def update_organisation(organisation: nil)
92
92
  raise ArgumentError, "Organisation cannot be blank" if organisation.blank?
93
93
  Resources::Organisation.parse(request(:put, "Organisations", organisation))
94
94
  end
@@ -99,7 +99,7 @@ module Insightly2
99
99
  # @param [String] filename name of the file.
100
100
  # @raise [ArgumentError] If the method arguments are blank.
101
101
  # @return [Faraday::Response].
102
- def update_organisation_image(id:, filename:)
102
+ def update_organisation_image(id: nil, filename: nil)
103
103
  raise ArgumentError, "ID cannot be blank" if id.blank?
104
104
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
105
105
  request(:put, "Organisations/#{id}/Image/#{filename}")
@@ -110,7 +110,7 @@ module Insightly2
110
110
  # @param [String, Fixnum] id An organisation's ID.
111
111
  # @raise [ArgumentError] If the method arguments are blank.
112
112
  # @return [Faraday::Response].
113
- def delete_organisation(id:)
113
+ def delete_organisation(id: nil)
114
114
  raise ArgumentError, "ID cannot be blank" if id.blank?
115
115
  request(:delete, "Organisations/#{id}")
116
116
  end
@@ -120,7 +120,7 @@ module Insightly2
120
120
  # @param [String, Fixnum] id An organisation's ID.
121
121
  # @raise [ArgumentError] If the method arguments are blank.
122
122
  # @return [Faraday::Response].
123
- def delete_organisation_image(id:)
123
+ def delete_organisation_image(id: nil)
124
124
  raise ArgumentError, "ID cannot be blank" if id.blank?
125
125
  request(:delete, "Organisations/#{id}/Image")
126
126
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A pipeline stage's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::PipelineStage, nil].
10
- def get_pipeline_stage(id:)
10
+ def get_pipeline_stage(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::PipelineStage.parse(request(:get, "PipelineStages/#{id}"))
13
13
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A pipeline's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Pipeline, nil].
10
- def get_pipeline(id:)
10
+ def get_pipeline(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Pipeline.parse(request(:get, "Pipelines/#{id}"))
13
13
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A project category's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::ProjectCategory, nil].
10
- def get_project_category(id:)
10
+ def get_project_category(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::ProjectCategory.parse(request(:get, "ProjectCategories/#{id}"))
13
13
  end
@@ -24,7 +24,7 @@ module Insightly2
24
24
  # @param [Hash] category: The project category to create.
25
25
  # @raise [ArgumentError] If the method arguments are blank.
26
26
  # @return [Insightly2::Resources::ProjectCategory, nil].
27
- def create_project_category(category:)
27
+ def create_project_category(category: nil)
28
28
  raise ArgumentError, "Category cannot be blank" if category.blank?
29
29
  Resources::ProjectCategory.parse(request(:post, "ProjectCategories", category))
30
30
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] category The project category to update.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::ProjectCategory, nil]
37
- def update_project_category(category:)
37
+ def update_project_category(category: nil)
38
38
  raise ArgumentError, "Category cannot be blank" if category.blank?
39
39
  Resources::ProjectCategory.parse(request(:put, "ProjectCategories", category))
40
40
  end
@@ -44,7 +44,7 @@ module Insightly2
44
44
  # @param [String, Fixnum] id A project category's ID.
45
45
  # @raise [ArgumentError] If the method arguments are blank.
46
46
  # @return [Faraday::Response].
47
- def delete_project_category(id:)
47
+ def delete_project_category(id: nil)
48
48
  raise ArgumentError, "ID cannot be blank" if id.blank?
49
49
  request(:delete, "ProjectCategories/#{id}")
50
50
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A project's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Project, nil].
10
- def get_project(id:)
10
+ def get_project(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Project.parse(request(:get, "Projects/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id A project's ID.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_project_emails(id:)
20
+ def get_project_emails(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Email.parse(request(:get, "Projects/#{id}/Emails"))
23
23
  end
@@ -27,7 +27,7 @@ module Insightly2
27
27
  # @param [String, Fixnum] id A project's ID.
28
28
  # @raise [ArgumentError] If the method arguments are blank.
29
29
  # @return [Faraday::Response].
30
- def get_project_image(id:)
30
+ def get_project_image(id: nil)
31
31
  raise ArgumentError, "ID cannot be blank" if id.blank?
32
32
  request(:get, "Projects/#{id}/Image")
33
33
  end
@@ -37,7 +37,7 @@ module Insightly2
37
37
  # @param [String, Fixnum] id A project's ID.
38
38
  # @raise [ArgumentError] If the method arguments are blank.
39
39
  # @return [Array, nil].
40
- def get_project_notes(id:)
40
+ def get_project_notes(id: nil)
41
41
  raise ArgumentError, "ID cannot be blank" if id.blank?
42
42
  Resources::Note.parse(request(:get, "Projects/#{id}/Notes"))
43
43
  end
@@ -47,7 +47,7 @@ module Insightly2
47
47
  # @param [String, Fixnum] id A project's ID.
48
48
  # @raise [ArgumentError] If the method arguments are blank.
49
49
  # @return [Array, nil].
50
- def get_project_tasks(id:)
50
+ def get_project_tasks(id: nil)
51
51
  raise ArgumentError, "ID cannot be blank" if id.blank?
52
52
  Resources::Task.parse(request(:get, "Projects/#{id}/Tasks"))
53
53
  end
@@ -67,7 +67,7 @@ module Insightly2
67
67
  # @param [Hash] project The project to create.
68
68
  # @raise [ArgumentError] If the method arguments are blank.
69
69
  # @return [Insightly2::Resources::Project, nil].
70
- def create_project(project:)
70
+ def create_project(project: nil)
71
71
  raise ArgumentError, "Project cannot be blank" if project.blank?
72
72
  Resources::Project.parse(request(:post, "Projects", project))
73
73
  end
@@ -78,7 +78,7 @@ module Insightly2
78
78
  # @param [String] filename A Project image file name.
79
79
  # @raise [ArgumentError] If the method arguments are blank.
80
80
  # @return [Faraday::Response].
81
- def create_project_image(id:, filename:)
81
+ def create_project_image(id: nil, filename: nil)
82
82
  raise ArgumentError, "ID cannot be blank" if id.blank?
83
83
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
84
84
  request(:post, "Projects/#{id}/Image/#{filename}")
@@ -89,7 +89,7 @@ module Insightly2
89
89
  # @param [Hash] project The project to update.
90
90
  # @raise [ArgumentError] If the method arguments are blank.
91
91
  # @return [Insightly2::Resources::Project, nil].
92
- def update_project(project:)
92
+ def update_project(project: nil)
93
93
  raise ArgumentError, "Project cannot be blank" if project.blank?
94
94
  Resources::Project.parse(request(:put, "Projects", project))
95
95
  end
@@ -100,7 +100,7 @@ module Insightly2
100
100
  # @param [String] filename A project image file name.
101
101
  # @raise [ArgumentError] If the method arguments are blank.
102
102
  # @return [Faraday::Response].
103
- def update_project_image(id:, filename:)
103
+ def update_project_image(id: nil, filename: nil)
104
104
  raise ArgumentError, "ID cannot be blank" if id.blank?
105
105
  raise ArgumentError, "Filename cannot be blank" if filename.blank?
106
106
  request(:put, "Projects/#{id}/Image/#{filename}")
@@ -111,7 +111,7 @@ module Insightly2
111
111
  # @param [String, Fixnum] id A project's ID.
112
112
  # @raise [ArgumentError] If the method arguments are blank.
113
113
  # @return [Faraday::Response].
114
- def delete_project(id:)
114
+ def delete_project(id: nil)
115
115
  raise ArgumentError, "ID cannot be blank" if id.blank?
116
116
  request(:delete, "Projects/#{id}")
117
117
  end
@@ -121,7 +121,7 @@ module Insightly2
121
121
  # @param [String, Fixnum] id A project's ID.
122
122
  # @raise [ArgumentError] If the method arguments are blank.
123
123
  # @return [Faraday::Response].
124
- def delete_project_image(id:)
124
+ def delete_project_image(id: nil)
125
125
  raise ArgumentError, "ID cannot be blank" if id.blank?
126
126
  request(:delete, "Projects/#{id}/Image")
127
127
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A Tag's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Tag, nil].
10
- def get_tag(id:)
10
+ def get_tag(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Tag.parse(request(:get, "Tags/#{id}"))
13
13
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A task category's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::TaskCategory, nil].
10
- def get_task_category(id:)
10
+ def get_task_category(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::TaskCategory.parse(request(:get, "TaskCategories/#{id}"))
13
13
  end
@@ -24,7 +24,7 @@ module Insightly2
24
24
  # @param [Hash] category The task category to create.
25
25
  # @raise [ArgumentError] If the method arguments are blank.
26
26
  # @return [Insightly2::Resources::TaskCategory, nil].
27
- def create_task_category(category:)
27
+ def create_task_category(category: nil)
28
28
  raise ArgumentError, "Category cannot be blank" if category.blank?
29
29
  Resources::TaskCategory.parse(request(:post, "TaskCategories", category))
30
30
  end
@@ -34,7 +34,7 @@ module Insightly2
34
34
  # @param [Hash] category The task category to update.
35
35
  # @raise [ArgumentError] If the method arguments are blank.
36
36
  # @return [Insightly2::Resources::TaskCategory, nil].
37
- def update_task_category(category:)
37
+ def update_task_category(category: nil)
38
38
  raise ArgumentError, "Category cannot be blank" if category.blank?
39
39
  Resources::TaskCategory.parse(request(:put, "TaskCategories", category))
40
40
  end
@@ -44,7 +44,7 @@ module Insightly2
44
44
  # @param [String, Fixnum] id A task category's ID.
45
45
  # @raise [ArgumentError] If the method arguments are blank.
46
46
  # @return [Faraday::Response].
47
- def delete_task_category(id:)
47
+ def delete_task_category(id: nil)
48
48
  raise ArgumentError, "ID cannot be blank" if id.blank?
49
49
  request(:delete, "TaskCategories/#{id}")
50
50
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A Task's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::Task, nil].
10
- def get_task(id:)
10
+ def get_task(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::Task.parse(request(:get, "Tasks/#{id}"))
13
13
  end
@@ -17,7 +17,7 @@ module Insightly2
17
17
  # @param [String, Fixnum] id A Task's ID.
18
18
  # @raise [ArgumentError] If the method arguments are blank.
19
19
  # @return [Array, nil].
20
- def get_task_comments(id:)
20
+ def get_task_comments(id: nil)
21
21
  raise ArgumentError, "ID cannot be blank" if id.blank?
22
22
  Resources::Comment.parse(request(:get, "Tasks/#{id}/Comments"))
23
23
  end
@@ -36,7 +36,7 @@ module Insightly2
36
36
  # @param [Hash] task The task to create.
37
37
  # @raise [ArgumentError] If the method arguments are blank.
38
38
  # @return [Insightly2::Resources::Task, nil].
39
- def create_task(task:)
39
+ def create_task(task: nil)
40
40
  raise ArgumentError, "Task cannot be blank" if task.blank?
41
41
  Resources::Task.parse(request(:post, "Tasks", task))
42
42
  end
@@ -47,7 +47,7 @@ module Insightly2
47
47
  # @param [Hash] comment The comment to create.
48
48
  # @raise [ArgumentError] If the method arguments are blank.
49
49
  # @return [Insightly2::Resources::Comment, nil].
50
- def create_task_comment(id:, comment:)
50
+ def create_task_comment(id: nil, comment: nil)
51
51
  raise ArgumentError, "ID cannot be blank" if id.blank?
52
52
  raise ArgumentError, "Comment cannot be blank" if comment.blank?
53
53
  Resources::Comment.parse(request(:post, "Tasks/#{id}/Comments", comment))
@@ -58,7 +58,7 @@ module Insightly2
58
58
  # @param [Hash] task The task to update.
59
59
  # @raise [ArgumentError] If the method arguments are blank.
60
60
  # @return [Insightly2::Resources::Comment, nil].
61
- def update_task(task:)
61
+ def update_task(task: nil)
62
62
  raise ArgumentError, "Task cannot be blank" if task.blank?
63
63
  Resources::Task.parse(request(:put, "Tasks", task))
64
64
  end
@@ -68,7 +68,7 @@ module Insightly2
68
68
  # @param [String, Fixnum] id A Task's ID.
69
69
  # @raise [ArgumentError] If the method arguments are blank.
70
70
  # @return [Faraday::Response].
71
- def delete_task(id:)
71
+ def delete_task(id: nil)
72
72
  raise ArgumentError, "ID cannot be blank" if id.blank?
73
73
  request(:delete, "Tasks/#{id}")
74
74
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A team member's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::TeamMember, nil].
10
- def get_team_member(id:)
10
+ def get_team_member(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::TeamMember.parse(request(:get, "TeamMembers/#{id}"))
13
13
  end
@@ -16,7 +16,7 @@ module Insightly2
16
16
  # Get a list of team members.
17
17
  # @param [String, Fixnum] team_id: The ID of the team we're getting members for (optional).
18
18
  # @return [Array, nil]
19
- def get_team_members(team_id:)
19
+ def get_team_members(team_id: nil)
20
20
  Resources::TeamMember.parse(request(:get, "TeamMembers/?teamid=#{team_id}"))
21
21
  end
22
22
 
@@ -25,7 +25,7 @@ module Insightly2
25
25
  # @param [Hash] team_member The team_member we're creating.
26
26
  # @raise [ArgumentError] If the method arguments are blank.
27
27
  # @return [Insightly2::Resources::TeamMember, nil].
28
- def create_team_member(team_member:)
28
+ def create_team_member(team_member: nil)
29
29
  raise ArgumentError, "Team member cannot be blank" if team_member.blank?
30
30
  Resources::TeamMember.parse(request(:post, "TeamMembers", team_member))
31
31
  end
@@ -35,7 +35,7 @@ module Insightly2
35
35
  # @param [Hash] team_member The team_member we're updating.
36
36
  # @raise [ArgumentError] If the method arguments are blank.
37
37
  # @return [Insightly2::Resources::TeamMember, nil].
38
- def update_team_member(team_member:)
38
+ def update_team_member(team_member: nil)
39
39
  raise ArgumentError, "Team member cannot be blank" if team_member.blank?
40
40
  Resources::TeamMember.parse(request(:put, "TeamMembers", team_member))
41
41
  end
@@ -45,7 +45,7 @@ module Insightly2
45
45
  # @param [String, Fixnum] id A team member's ID.
46
46
  # @raise [ArgumentError] If the method arguments are blank.
47
47
  # @return [Faraday::Response].
48
- def delete_team_member(id:)
48
+ def delete_team_member(id: nil)
49
49
  raise ArgumentError, "ID cannot be blank" if id.blank?
50
50
  request(:delete, "TeamMembers/#{id}")
51
51
  end
@@ -8,7 +8,7 @@ module Insightly2
8
8
  # @param [String, Fixnum] id A team's ID.
9
9
  # @raise [ArgumentError] If the method arguments are blank.
10
10
  # @return [Insightly2::Resources::Team].
11
- def get_team(id:)
11
+ def get_team(id: nil)
12
12
  raise ArgumentError, "ID cannot be blank" if id.blank?
13
13
  Resources::Team.parse(request(:get, "Teams/#{id}"))
14
14
  end
@@ -25,7 +25,7 @@ module Insightly2
25
25
  # @param [Hash] team The team we're creating.
26
26
  # @raise [ArgumentError] If the method arguments are blank.
27
27
  # @return [Insightly2::Resources::Team, nil].
28
- def create_team(team:)
28
+ def create_team(team: nil)
29
29
  raise ArgumentError, "Team cannot be blank" if team.blank?
30
30
  Resources::Team.parse(request(:post, "Teams", team))
31
31
  end
@@ -35,7 +35,7 @@ module Insightly2
35
35
  # @param [Hash] team The team we're updating.
36
36
  # @raise [ArgumentError] If the method arguments are blank.
37
37
  # @return [Insightly2::Resources::Team, nil].
38
- def update_team(team:)
38
+ def update_team(team: nil)
39
39
  raise ArgumentError, "Team cannot be blank" if team.blank?
40
40
  Resources::Team.parse(request(:put, 'Teams', team))
41
41
  end
@@ -45,7 +45,7 @@ module Insightly2
45
45
  # @param [String, Fixnum] id A Team's ID.
46
46
  # @raise [ArgumentError] If the method arguments are blank.
47
47
  # @return [Faraday::Response].
48
- def delete_team(id:)
48
+ def delete_team(id: nil)
49
49
  raise ArgumentError, "ID cannot be blank" if id.blank?
50
50
  request(:delete, "Teams/#{id}")
51
51
  end
@@ -7,7 +7,7 @@ module Insightly2
7
7
  # @param [String, Fixnum] id A user's ID.
8
8
  # @raise [ArgumentError] If the method arguments are blank.
9
9
  # @return [Insightly2::Resources::User, nil].
10
- def get_user(id:)
10
+ def get_user(id: nil)
11
11
  raise ArgumentError, "ID cannot be blank" if id.blank?
12
12
  Resources::User.parse(request(:get, "Users/#{id}"))
13
13
  end
@@ -2,7 +2,7 @@ module Insightly2
2
2
  module Errors
3
3
  class ClientError < StandardError
4
4
  attr_reader :response
5
- def initialize(response:)
5
+ def initialize(response: nil)
6
6
  @response = response
7
7
  end
8
8
  end
@@ -5,7 +5,7 @@ module Insightly2
5
5
  # @param [UrlHelper] path The name of the resource path as per the URL e.g. contacts.
6
6
  # @param [Hash] params A hash of params we're turning into a querystring.
7
7
  # @return [UrlHelper] The URL of the resource with required params.
8
- def self.build_url(path:, params:)
8
+ def self.build_url(path: nil, params: nil)
9
9
  params.delete_if {|k,v| v.blank?}
10
10
  params = params.to_query
11
11
  query = path
@@ -1,3 +1,3 @@
1
1
  module Insightly2
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insightly2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-29 00:00:00.000000000 Z
13
+ date: 2015-07-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday