Skip to content

Commit

Permalink
style: change the resource definition for payout and shopify_payment
Browse files Browse the repository at this point in the history
  • Loading branch information
sonikasresta committed Jan 15, 2024
1 parent 2c252f9 commit df7e2f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/shopify_api/resources/payout.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module ShopifyAPI
class Payout < Base
self.prefix = '/admin/shopify_payments/'
self.resource_prefix = 'shopify_payments/'
end
end
end
10 changes: 7 additions & 3 deletions lib/shopify_api/resources/shopify_payment.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
module ShopifyAPI
class ShopifyPayout < Base
self.prefix = '/admin/shopify_payments/payouts/'
self.resource_prefix = 'shopify_payments/payouts/'

def self.find_search(date_min=Time.zone.now.beginning_of_month.to_date.to_s, date_max=Time.zone.now.end_of_month.to_date.to_s)
self.find(:all, from: "/admin/shopify_payments/payouts.json?date_min=#{date_min}&date_max=#{date_max}")
self.find(:all,
from: api_version.construct_api_path(
"shopify_payments/payouts.json?date_min=#{date_min}&date_max=#{date_max}"
)
)
end
end
end
end

0 comments on commit df7e2f7

Please sign in to comment.