diff --git a/.rubocop.yml b/.rubocop.yml index e0a2b37..e11331a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,10 +9,16 @@ Metrics/LineLength: Style/SymbolArray: MinSize: 3 +Style/FrozenStringLiteralComment: + Enabled: false + +Gemspec/RubyVersionGlobalsUsage: + Enabled: false + Metrics/MethodLength: Max: 15 -Naming/UncommunicativeMethodParamName: +Naming/MethodParameterName: MinNameLength: 1 AllowNamesEndingInNumbers: false diff --git a/README.md b/README.md index 4d5937e..5046280 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,9 @@ You can find plan API documentation at . diff --git a/lib/razorpay/entity.rb b/lib/razorpay/entity.rb index 791209c..8c7a61b 100644 --- a/lib/razorpay/entity.rb +++ b/lib/razorpay/entity.rb @@ -28,8 +28,8 @@ def respond_to_missing?(method_name, include_private = false) # Public: Convert the Entity object to JSON # Returns the JSON representation of the Entity (as a string) - def to_json(*args) - @attributes.to_json(*args) + def to_json(*_args) + @attributes.to_json end # Mutates the entity in accordance with diff --git a/lib/razorpay/subscription.rb b/lib/razorpay/subscription.rb index 6b893eb..cedc143 100644 --- a/lib/razorpay/subscription.rb +++ b/lib/razorpay/subscription.rb @@ -21,6 +21,10 @@ def self.all(options = {}) request.all options end + def self.update(id, options = {}) + request.patch id, options + end + def self.cancel(id, options = {}) request.post "#{id}/cancel", options end