Class: Varejonline::API::CreditLimits
- Defined in:
- lib/varejonline/api/credit_limits.rb
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
Methods inherited from Client
#card_negotiations, #category_levels, #client_classes, #companies, #credit_limits, #default_entries, #entities, #initialize, #installments, #orders, #payables, #payment_conditions, #payments, #product_categories, #products, #provisions, #receivables, #sales_history, #sellers, #third_parties, #user_data
Methods included from ClassMethods
Constructor Details
This class inherits a constructor from Varejonline::Client
Instance Method Details
#block_history(third_party_id, start_date, end_date) ⇒ Object
15 16 17 |
# File 'lib/varejonline/api/credit_limits.rb', line 15 def block_history(third_party_id, start_date, end_date) return parse_response(self.class.get('/historico_bloqueio', body: build_body({'desde' => start_date, 'ate' => end_date, 'idTerceiro' => third_party_id}), headers: header)) end |
#list(searcher = nil) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/varejonline/api/credit_limits.rb', line 8 def list(searcher = nil) raise ArgumentError unless searcher.nil? || searcher.is_a?(Varejonline::Searcher::Commercial::CreditLimitSearcher) return parse_response(self.class.get('/', body: build_body(searcher.as_parameter), headers: header)) if searcher return parse_response(self.class.get('/', body: build_body, headers: header)) unless searcher end |