# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).

from datetime import datetime
import oci

# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()


# Initialize service client with default config file
marketplace_private_offer_client = oci.marketplace_private_offer.OfferClient(
    config)


# Send the request to service, some parameters are not required, see API
# doc for more info
update_offer_response = marketplace_private_offer_client.update_offer(
    offer_id="ocid1.test.oc1..<unique_ID>EXAMPLE-offerId-Value",
    update_offer_details=oci.marketplace_private_offer.models.UpdateOfferDetails(
        display_name="EXAMPLE-displayName-Value",
        buyer_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-buyerCompartmentId-Value",
        description="EXAMPLE-description-Value",
        internal_notes="EXAMPLE-internalNotes-Value",
        time_start_date=datetime.strptime(
            "2017-11-07T17:28:15.764Z",
            "%Y-%m-%dT%H:%M:%S.%fZ"),
        duration="EXAMPLE-duration-Value",
        time_accept_by=datetime.strptime(
            "2023-10-14T04:25:43.302Z",
            "%Y-%m-%dT%H:%M:%S.%fZ"),
        pricing=oci.marketplace_private_offer.models.Pricing(
            currency_type="xUE",
            total_amount=669,
            billing_cycle="ONE_TIME"),
        buyer_information=oci.marketplace_private_offer.models.BuyerInformation(
            company_name="EXAMPLE-companyName-Value",
            note_to_buyer="EXAMPLE-noteToBuyer-Value",
            primary_contact=oci.marketplace_private_offer.models.Contact(
                first_name="EXAMPLE-firstName-Value",
                last_name="EXAMPLE-lastName-Value",
                email="EXAMPLE-email-Value"),
            additional_contacts=[
                oci.marketplace_private_offer.models.Contact(
                    first_name="EXAMPLE-firstName-Value",
                    last_name="EXAMPLE-lastName-Value",
                    email="EXAMPLE-email-Value")]),
        seller_information=oci.marketplace_private_offer.models.SellerInformation(
            primary_contact=oci.marketplace_private_offer.models.Contact(
                first_name="EXAMPLE-firstName-Value",
                last_name="EXAMPLE-lastName-Value",
                email="EXAMPLE-email-Value"),
            additional_contacts=[
                oci.marketplace_private_offer.models.Contact(
                    first_name="EXAMPLE-firstName-Value",
                    last_name="EXAMPLE-lastName-Value",
                    email="EXAMPLE-email-Value")]),
        resource_bundles=[
            oci.marketplace_private_offer.models.ResourceBundle(
                type="LISTING",
                quantity=465,
                unit_of_measurement="INSTANCE_PER_HOUR",
                resource_ids=["EXAMPLE--Value"])],
        custom_fields=[
            oci.marketplace_private_offer.models.CustomField(
                key="EXAMPLE-key-Value",
                value="EXAMPLE-value-Value")],
        freeform_tags={
            'EXAMPLE_KEY_zQZ41': 'EXAMPLE_VALUE_iEyHQeBnjGnZXL4mKwCs'},
        defined_tags={
            'EXAMPLE_KEY_idXCs': {
                'EXAMPLE_KEY_5Qief': 'EXAMPLE--Value'}}),
    if_match="EXAMPLE-ifMatch-Value",
    opc_request_id="TDLZLJFFCO8KTKHWMCEJ<unique_ID>")

# Get the data from response
print(update_offer_response.data)