# Ad Exchange Buyer API . proposals

## Instance Methods

Get a proposal given its id

Create the given list of proposals

Update the given proposal. This method supports patch semantics.

Search for proposals using pql query

Update the given proposal to indicate that setup has been completed.

Update the given proposal

### Method Details

`get(proposalId)`

    Get a proposal given its id

    Args:
      proposalId: string, Id of the proposal to retrieve. (required)

    Returns:
      An object of the form:

        { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "labels": [ # List of labels associated with the proposal. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
        "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
        "revisionNumber": "A String", # The revision number for the proposal (readonly).
        "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
        "seller": { # Reference to the seller on the proposal. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        },
        "proposalId": "A String", # The unique id of the proposal. (readonly).
        "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
        "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
          "A String",
        ],
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
        "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
        "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
        "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
        "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
        "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
        "proposalState": "A String", # The current state of the proposal. (readonly)
        "name": "A String", # The name for the proposal (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
        "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      }

`insert(body)`

    Create the given list of proposals

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    {
        "webPropertyCode": "A String", # Web property id of the seller creating these orders
        "proposals": [ # The list of proposals to create.
          { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
              #
              # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
            "labels": [ # List of labels associated with the proposal. (readonly)
              {
                "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
                "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
                  "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                    "accountId": "A String", # Adx account id of the buyer.
                  },
                  "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                    "subAccountId": "A String", # Optional sub-account id for the seller.
                    "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
                  },
                },
                "label": "A String", # The label to use.
                "accountId": "A String", # The accountId of the party that created the label.
              },
            ],
            "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
            "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
            "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
            "revisionNumber": "A String", # The revision number for the proposal (readonly).
            "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
            "seller": { # Reference to the seller on the proposal. (readonly, except on create)
              "subAccountId": "A String", # Optional sub-account id for the seller.
              "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
            },
            "proposalId": "A String", # The unique id of the proposal. (readonly).
            "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
            "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
              "A String",
            ],
            "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
            "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
            "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
            "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
            "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
            "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
            "proposalState": "A String", # The current state of the proposal. (readonly)
            "name": "A String", # The name for the proposal (updatable)
            "buyerPrivateData": { # Private data for buyer. (hidden from seller).
              "referenceId": "A String",
              "referencePayload": "A String",
            },
            "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
            "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
          },
        ],
      }

    Returns:
      An object of the form:

        {
        "proposals": [ # The list of proposals successfully created.
          { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
              #
              # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
            "labels": [ # List of labels associated with the proposal. (readonly)
              {
                "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
                "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
                  "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                    "accountId": "A String", # Adx account id of the buyer.
                  },
                  "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                    "subAccountId": "A String", # Optional sub-account id for the seller.
                    "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
                  },
                },
                "label": "A String", # The label to use.
                "accountId": "A String", # The accountId of the party that created the label.
              },
            ],
            "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
            "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
            "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
            "revisionNumber": "A String", # The revision number for the proposal (readonly).
            "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
            "seller": { # Reference to the seller on the proposal. (readonly, except on create)
              "subAccountId": "A String", # Optional sub-account id for the seller.
              "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
            },
            "proposalId": "A String", # The unique id of the proposal. (readonly).
            "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
            "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
              "A String",
            ],
            "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
            "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
            "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
            "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
            "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
            "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
            "proposalState": "A String", # The current state of the proposal. (readonly)
            "name": "A String", # The name for the proposal (updatable)
            "buyerPrivateData": { # Private data for buyer. (hidden from seller).
              "referenceId": "A String",
              "referencePayload": "A String",
            },
            "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
            "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
          },
        ],
      }

`patch(proposalId, revisionNumber, updateAction, body)`

    Update the given proposal. This method supports patch semantics.

    Args:
      proposalId: string, The proposal id to update. (required)
      revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
      updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
        Allowed values
          accept -
          cancel -
          propose -
          proposeAndAccept -
          unknownAction -
          updateNonTerms -
      body: object, The request body. (required)
        The object takes the form of:

    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
        #
        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
      "labels": [ # List of labels associated with the proposal. (readonly)
        {
          "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
          "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
            "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
              "accountId": "A String", # Adx account id of the buyer.
            },
            "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
              "subAccountId": "A String", # Optional sub-account id for the seller.
              "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
            },
          },
          "label": "A String", # The label to use.
          "accountId": "A String", # The accountId of the party that created the label.
        },
      ],
      "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
        {
          "email": "A String", # Email address of the contact.
          "name": "A String", # The name of the contact.
        },
      ],
      "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
      "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
      "revisionNumber": "A String", # The revision number for the proposal (readonly).
      "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
      "seller": { # Reference to the seller on the proposal. (readonly, except on create)
        "subAccountId": "A String", # Optional sub-account id for the seller.
        "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
      },
      "proposalId": "A String", # The unique id of the proposal. (readonly).
      "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
      "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
        "A String",
      ],
      "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
      "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
      "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
      "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
      "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
        "accountId": "A String", # Adx account id of the buyer.
      },
      "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
      "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
      "proposalState": "A String", # The current state of the proposal. (readonly)
      "name": "A String", # The name for the proposal (updatable)
      "buyerPrivateData": { # Private data for buyer. (hidden from seller).
        "referenceId": "A String",
        "referencePayload": "A String",
      },
      "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
        "accountId": "A String", # Adx account id of the buyer.
      },
      "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
      "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
        {
          "email": "A String", # Email address of the contact.
          "name": "A String", # The name of the contact.
        },
      ],
    }

    Returns:
      An object of the form:

        { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "labels": [ # List of labels associated with the proposal. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
        "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
        "revisionNumber": "A String", # The revision number for the proposal (readonly).
        "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
        "seller": { # Reference to the seller on the proposal. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        },
        "proposalId": "A String", # The unique id of the proposal. (readonly).
        "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
        "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
          "A String",
        ],
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
        "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
        "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
        "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
        "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
        "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
        "proposalState": "A String", # The current state of the proposal. (readonly)
        "name": "A String", # The name for the proposal (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
        "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      }

`search(pqlQuery=None)`

    Search for proposals using pql query

    Args:
      pqlQuery: string, Query string to retrieve specific proposals.

    Returns:
      An object of the form:

        {
        "proposals": [ # The list of matching proposals.
          { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
              #
              # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
            "labels": [ # List of labels associated with the proposal. (readonly)
              {
                "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
                "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
                  "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                    "accountId": "A String", # Adx account id of the buyer.
                  },
                  "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                    "subAccountId": "A String", # Optional sub-account id for the seller.
                    "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
                  },
                },
                "label": "A String", # The label to use.
                "accountId": "A String", # The accountId of the party that created the label.
              },
            ],
            "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
            "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
            "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
            "revisionNumber": "A String", # The revision number for the proposal (readonly).
            "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
            "seller": { # Reference to the seller on the proposal. (readonly, except on create)
              "subAccountId": "A String", # Optional sub-account id for the seller.
              "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
            },
            "proposalId": "A String", # The unique id of the proposal. (readonly).
            "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
            "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
              "A String",
            ],
            "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
            "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
            "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
            "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
            "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
            "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
            "proposalState": "A String", # The current state of the proposal. (readonly)
            "name": "A String", # The name for the proposal (updatable)
            "buyerPrivateData": { # Private data for buyer. (hidden from seller).
              "referenceId": "A String",
              "referencePayload": "A String",
            },
            "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
              "accountId": "A String", # Adx account id of the buyer.
            },
            "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
            "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
              {
                "email": "A String", # Email address of the contact.
                "name": "A String", # The name of the contact.
              },
            ],
          },
        ],
      }

`setupcomplete(proposalId)`

    Update the given proposal to indicate that setup has been completed.

    Args:
      proposalId: string, The proposal id for which the setup is complete (required)

`update(proposalId, revisionNumber, updateAction, body)`

    Update the given proposal

    Args:
      proposalId: string, The proposal id to update. (required)
      revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
      updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
        Allowed values
          accept -
          cancel -
          propose -
          proposeAndAccept -
          unknownAction -
          updateNonTerms -
      body: object, The request body. (required)
        The object takes the form of:

    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
        #
        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
      "labels": [ # List of labels associated with the proposal. (readonly)
        {
          "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
          "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
            "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
              "accountId": "A String", # Adx account id of the buyer.
            },
            "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
              "subAccountId": "A String", # Optional sub-account id for the seller.
              "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
            },
          },
          "label": "A String", # The label to use.
          "accountId": "A String", # The accountId of the party that created the label.
        },
      ],
      "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
        {
          "email": "A String", # Email address of the contact.
          "name": "A String", # The name of the contact.
        },
      ],
      "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
      "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
      "revisionNumber": "A String", # The revision number for the proposal (readonly).
      "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
      "seller": { # Reference to the seller on the proposal. (readonly, except on create)
        "subAccountId": "A String", # Optional sub-account id for the seller.
        "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
      },
      "proposalId": "A String", # The unique id of the proposal. (readonly).
      "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
      "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
        "A String",
      ],
      "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
      "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
      "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
      "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
      "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
        "accountId": "A String", # Adx account id of the buyer.
      },
      "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
      "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
      "proposalState": "A String", # The current state of the proposal. (readonly)
      "name": "A String", # The name for the proposal (updatable)
      "buyerPrivateData": { # Private data for buyer. (hidden from seller).
        "referenceId": "A String",
        "referencePayload": "A String",
      },
      "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
        "accountId": "A String", # Adx account id of the buyer.
      },
      "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
      "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
        {
          "email": "A String", # Email address of the contact.
          "name": "A String", # The name of the contact.
        },
      ],
    }

    Returns:
      An object of the form:

        { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
          #
          # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
        "labels": [ # List of labels associated with the proposal. (readonly)
          {
            "createTimeMs": "A String", # The creation time (in ms since epoch) for the label.
            "deprecatedMarketplaceDealParty": { # Information about the party that created the label.
              "buyer": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
                "accountId": "A String", # Adx account id of the buyer.
              },
              "seller": { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
                "subAccountId": "A String", # Optional sub-account id for the seller.
                "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              },
            },
            "label": "A String", # The label to use.
            "accountId": "A String", # The accountId of the party that created the label.
          },
        ],
        "sellerContacts": [ # Optional contact information of the seller (buyer-readonly).
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
        "negotiationId": "A String", # Optional negotiation id if this proposal is a preferred deal proposal.
        "inventorySource": "A String", # What exchange will provide this inventory (readonly, except on create).
        "revisionNumber": "A String", # The revision number for the proposal (readonly).
        "revisionTimeMs": "A String", # The time (ms since epoch) when the proposal was last revised (readonly).
        "seller": { # Reference to the seller on the proposal. (readonly, except on create)
          "subAccountId": "A String", # Optional sub-account id for the seller.
          "accountId": "A String", # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        },
        "proposalId": "A String", # The unique id of the proposal. (readonly).
        "isRenegotiating": True or False, # True if the proposal is being renegotiated (readonly).
        "dbmAdvertiserIds": [ # IDs of DBM advertisers permission to this proposal.
          "A String",
        ],
        "lastUpdaterOrCommentorRole": "A String", # The role of the last user that either updated the proposal or left a comment. (readonly)
        "privateAuctionId": "A String", # Optional private auction id if this proposal is a private auction proposal.
        "originatorRole": "A String", # Indicates whether the buyer/seller created the proposal.(readonly)
        "hasSellerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
        "buyer": { # Reference to the buyer on the proposal. (readonly, except on create)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "hasBuyerSignedOff": True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
        "kind": "adexchangebuyer#proposal", # Identifies what kind of resource this is. Value: the fixed string "adexchangebuyer#proposal".
        "proposalState": "A String", # The current state of the proposal. (readonly)
        "name": "A String", # The name for the proposal (updatable)
        "buyerPrivateData": { # Private data for buyer. (hidden from seller).
          "referenceId": "A String",
          "referencePayload": "A String",
        },
        "billedBuyer": { # Reference to the buyer that will get billed for this proposal. (readonly)
          "accountId": "A String", # Adx account id of the buyer.
        },
        "isSetupComplete": True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action)
        "buyerContacts": [ # Optional contact information of the buyer. (seller-readonly)
          {
            "email": "A String", # Email address of the contact.
            "name": "A String", # The name of the contact.
          },
        ],
      }