Class: PagiiiApi::Metafield

Inherits:
Base
  • Object
show all
Defined in:
lib/pagiii_api/metafield.rb

Class Method Summary collapse

Class Method Details

.update(page_id:, options:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/pagiii_api/metafield.rb', line 4

def update(page_id:, options:)
  conn = Pagiii.create_connection

  response = conn.patch("/api/v1/admin/pages/#{page_id}/metafield") do |req|
    req.body = {
      metafield: options
    }.to_json
  end

  Pagiii.build_response(response)
end