<commit_before>require "lob/resources/resource_base"

module Lob
  module Resources
    class Card < Lob::Resources::ResourceBase

      def initialize(config)
        super(config)
        @endpoint = "cards"
      end
      
      def update(resource_id, body={}, headers={})
        request = {
          method: :post,
          url: resource_url(resource_id),
          body: body,
          headers: headers
        }

        submit(request)
      end

    end
  end
end<commit_msg>Add card order create & list<commit_after>require "lob/resources/resource_base"

module Lob
  module Resources
    class Card < Lob::Resources::ResourceBase

      def initialize(config)
        super(config)
        @endpoint = "cards"
      end
      
      def update(resource_id, body={}, headers={})
        request = {
          method: :post,
          url: resource_url(resource_id),
          body: body,
          headers: headers
        }

        submit(request)
      end

      def create_order(resource_id, body={}, headers={})
        request = {
          method: :post,
          url: "#{resource_url(resource_id)}/orders",
          body: body,
          headers: headers
        }

        submit(request)
      end

      def list_orders(resource_id, query={})
        request = {
          method: :get,
          url: "#{resource_url(resource_id)}/orders",
          query: query
        }

        submit(request)
      end

    end
  end
end
{'fraction_non_alphanumeric': 0.10096153846153846, 'fraction_numerical': 0.0, 'mean_word_length': 1.8073217726396917, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7556580', 'n_tokens_mistral': 417, 'n_tokens_neox': 406, 'n_words': 96}