Sha256: d0b1d23761ed5f6a3567ada737870ad64bb72a6ad96773f68ac85a2770710de5
Contents?: true
Size: 716 Bytes
Versions: 22
Compression:
Stored size: 716 Bytes
Contents
module EventbriteSDK module Lists class OwnedEventOrdersList < ResourceList def search(term) send(:"term_provided_#{!!term}", term) @pagination = { 'page_count' => 1, 'page_number' => 1 } self end private # Swaps the endpoint out to allow searches def term_provided_true(term) @url_base.sub!('owned_event_orders', 'search_owned_event_orders') @query[:search_term] = term end # Swaps the endpoint out owned events, and removes the search_term query def term_provided_false(_term) @url_base.sub!('search_owned_event_orders', 'owned_event_orders') @query.delete(:search_term) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems