Skip to content

Commit f325320

Browse files
committed
Added method to update subitems
1 parent ecdaad9 commit f325320

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/iugu/subscription.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ def change_plan_simulation(plan_identifier, options = {})
7272
options))
7373
end
7474

75+
def change_subitems(subitems, options = {})
76+
options.merge!({ subitems: subitems })
77+
Iugu::Factory.create_from_response(self.class.object_type,
78+
APIRequest.request('PUT',
79+
"#{self.class.url(self.id)}/",
80+
options))
81+
end
82+
7583
def customer
7684
return false unless @attributes['customer_id']
7785
Customer.fetch @attributes['customer_id']

0 commit comments

Comments
 (0)