swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Billing client provides access to billing resources for Azure subscriptions.
  title: BillingManagementClient
  version: 2019-10-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/billing/resource-manager/Microsoft.Billing/preview/2019-10-01-preview/billing.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: billing
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters:
  agreementNameParameter:
    description: Agreement Id.
    in: path
    name: agreementName
    required: true
    type: string
    x-ms-parameter-location: method
  apiVersionParameter:
    description: Version of the API to be used with the client request. The current version is 2019-10-01-preview.
    in: query
    name: api-version
    required: true
    type: string
  billingAccountNameParameter:
    description: billing Account Id.
    in: path
    name: billingAccountName
    required: true
    type: string
    x-ms-parameter-location: method
  billingProfileNameParameter:
    description: Billing Profile Id.
    in: path
    name: billingProfileName
    required: true
    type: string
    x-ms-parameter-location: method
  billingRoleAssignmentNameParameter:
    description: role assignment id.
    in: path
    name: billingRoleAssignmentName
    required: true
    type: string
    x-ms-parameter-location: method
  billingRoleDefinitionNameParameter:
    description: role definition id.
    in: path
    name: billingRoleDefinitionName
    required: true
    type: string
    x-ms-parameter-location: method
  billingSubscriptionNameParameter:
    description: Billing Subscription Id.
    in: path
    name: billingSubscriptionName
    required: true
    type: string
    x-ms-parameter-location: method
  customerNameParameter:
    description: Customer name.
    in: path
    name: customerName
    required: true
    type: string
    x-ms-parameter-location: method
  departmentNameParameter:
    description: Department Id.
    in: path
    name: departmentName
    required: true
    type: string
    x-ms-parameter-location: method
  enrollmentAccountNameParameter:
    description: Enrollment Account Id.
    in: path
    name: enrollmentAccountName
    required: true
    type: string
    x-ms-parameter-location: method
  instructionNameParameter:
    description: Instruction Name.
    in: path
    name: instructionName
    required: true
    type: string
    x-ms-parameter-location: method
  invoiceNameParameter:
    description: Invoice Id.
    in: path
    name: invoiceName
    required: true
    type: string
    x-ms-parameter-location: method
  invoiceSectionNameParameter:
    description: InvoiceSection Id.
    in: path
    name: invoiceSectionName
    required: true
    type: string
    x-ms-parameter-location: method
  operationIdParameter:
    description: Operation Id.
    in: path
    name: operationId
    required: true
    type: string
    x-ms-parameter-location: method
  productNameParameter:
    description: Invoice Id.
    in: path
    name: productName
    required: true
    type: string
    x-ms-parameter-location: method
  subscriptionIdParameter:
    description: Azure Subscription ID.
    in: path
    name: subscriptionId
    required: true
    type: string
  transactionNameParameter:
    description: Transaction name.
    in: path
    name: transactionName
    required: true
    type: string
    x-ms-parameter-location: method
  transferNameParameter:
    description: Transfer Name.
    in: path
    name: transferName
    required: true
    type: string
    x-ms-parameter-location: method
  updateAutoRenewRequestParameter:
    description: Update auto renew request parameters.
    in: body
    name: body
    required: true
    schema:
      $ref: "#/definitions/UpdateAutoRenewRequest"
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.Billing/billingAccounts:
    get:
      description: Lists all billing accounts for a user which he has access to.
      operationId: BillingAccounts_List
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to expand the address, invoiceSections and billingProfiles.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingAccountListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingAccounts
      x-ms-examples:
        BillingAccountsList:
          parameters:
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      agreementType: MicrosoftCustomerAgreement
                      customerType: Enterprise
                      displayName: Test Account 1
                      organizationId: 00000000-0000-0000-0000-000000000000
                    type: Microsoft.Billing/billingAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000
                    name: 10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000
                    properties:
                      address: null
                      agreementType: MicrosoftCustomerAgreement
                      customerType: Enterprise
                      displayName: Test Account 2
                      organizationId: 00000000-0000-0000-0000-000000000000
                    type: Microsoft.Billing/billingAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/20000000-0000-0000-0000-000000000002_00000000-0000-0000-0000-000000000000
                    name: 20000000-0000-0000-0000-000000000002_00000000-0000-0000-0000-000000000000
                    properties:
                      agreementType: MicrosoftCustomerAgreement
                      customerType: Enterprise
                      displayName: Test Account 3
                      organizationId: 00000000-0000-0000-0000-000000000000
                    type: Microsoft.Billing/billingAccounts
        BillingAccountsListWithExpand:
          parameters:
            $expand: address, billingProfiles, billingProfiles/invoiceSections
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                    name: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      address:
                        addressLine1: Test Address
                        addressLine2: Test Address
                        addressLine3: Test Address
                        city: City
                        companyName: Contoso
                        country: US
                        firstName: Test
                        lastName: User
                        postalCode: "00000"
                        region: WA
                      agreementType: MicrosoftCustomerAgreement
                      billingProfiles:
                        - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000000
                          name: 11000000-0000-0000-0000-000000000000
                          properties:
                            address:
                              addressLine1: Test Address1
                              addressLine2: Test Address2
                              addressLine3: Test Address3
                              city: City
                              companyName: Contoso
                              country: US
                              firstName: Test
                              lastName: User
                              postalCode: "00000"
                              region: WA
                            currency: USD
                            displayName: BillingProfile1
                            enabledAzurePlans:
                              - skuDescription: Microsoft Azure Dev/Test
                                skuId: "0001"
                              - skuDescription: Microsoft Azure Standard
                                skuId: "0002"
                            invoiceDay: 5
                            invoiceEmailOptIn: true
                            invoiceSections:
                              - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/invoiceSectionId1
                                name: invoiceSectionId1
                                properties:
                                  displayName: invoiceSectionName1
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                              - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/invoiceSectionId2
                                name: invoiceSectionId2
                                properties:
                                  displayName: invoiceSectionName2
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                            poNumber: ABC12345
                          type: Microsoft.Billing/billingAccounts/billingProfiles
                        - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000001
                          name: 11000000-0000-0000-0000-000000000001
                          properties:
                            address:
                              addressLine1: Test Address1
                              addressLine2: Test Address2
                              addressLine3: Test Address3
                              city: City
                              companyName: Contoso
                              country: US
                              firstName: Test
                              lastName: User
                              postalCode: "00000"
                              region: WA
                            currency: USD
                            displayName: BillingProfile2
                            enabledAzurePlans:
                              - skuDescription: Microsoft Azure Dev/Test
                                skuId: "0001"
                              - skuDescription: Microsoft Azure Standard
                                skuId: "0002"
                            invoiceDay: 5
                            invoiceEmailOptIn: true
                            invoiceSections:
                              - id: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000001/invoiceSections/invoiceSectionId11
                                name: invoiceSectionId11
                                properties:
                                  displayName: invoiceSectionName11
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                            poNumber: ABC12345
                          type: Microsoft.Billing/billingAccounts/billingProfiles
                      customerType: Enterprise
                      displayName: Test Account 1
                      organizationId: 00000000-0000-0000-0000-000000000000
                    type: Microsoft.Billing/billingAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000
                    name: 10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000
                    properties:
                      address: null
                      agreementType: MicrosoftCustomerAgreement
                      billingProfiles:
                        - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000004
                          name: 11000000-0000-0000-0000-000000000004
                          properties:
                            address:
                              addressLine1: Test Address1
                              addressLine2: Test Address2
                              addressLine3: Test Address3
                              city: City
                              companyName: Contoso Test
                              country: US
                              firstName: Test
                              lastName: User
                              postalCode: "00000"
                              region: WA
                            currency: USD
                            displayName: BillingProfile3
                            enabledAzurePlans:
                              - skuDescription: Microsoft Azure Dev/Test
                                skuId: "0001"
                              - skuDescription: Microsoft Azure Standard
                                skuId: "0002"
                            invoiceDay: 5
                            invoiceEmailOptIn: true
                            invoiceSections:
                              - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000004/invoiceSections/invoiceSectionId3
                                name: invoiceSectionId3
                                properties:
                                  displayName: invoiceSectionName3
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                              - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000004/invoiceSections/invoiceSectionId4
                                name: invoiceSectionId4
                                properties:
                                  displayName: invoiceSectionName4
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                            poNumber: ABC12345
                          type: Microsoft.Billing/billingAccounts/billingProfiles
                        - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000005
                          name: 11000000-0000-0000-0000-000000000005
                          properties:
                            address:
                              addressLine1: Test Address1
                              addressLine2: Test Address2
                              addressLine3: Test Address3
                              city: City
                              companyName: Contoso Test
                              country: US
                              firstName: Test
                              lastName: User
                              postalCode: "00000"
                              region: WA
                            currency: USD
                            displayName: BillingProfile4
                            enabledAzurePlans:
                              - skuDescription: Microsoft Azure Dev/Test
                                skuId: "0001"
                              - skuDescription: Microsoft Azure Standard
                                skuId: "0002"
                            invoiceDay: 5
                            invoiceEmailOptIn: true
                            invoiceSections:
                              - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000005/invoiceSections/invoiceSectionId5
                                name: invoiceSectionId5
                                properties:
                                  displayName: invoiceSectionName5
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                              - id: /providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000001_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000005/invoiceSections/invoiceSectionId6
                                name: invoiceSectionId6
                                properties:
                                  displayName: invoiceSectionName6
                                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                            poNumber: ABC12345
                          type: Microsoft.Billing/billingAccounts/billingProfiles
                      customerType: Enterprise
                      displayName: Test Account 2
                      organizationId: 00000000-0000-0000-0000-000000000000
                    type: Microsoft.Billing/billingAccounts
        BillingAccountsListWithExpandForEnrollmentDetails:
          parameters:
            $expand: properties/enrollmentDetails, properties/departments, properties/enrollmentAccounts
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/7645820
                    name: "7645820"
                    properties:
                      address:
                        addressLine1: Test Address
                        addressLine2: Test Address
                        addressLine3: Test Address
                        city: City
                        country: US
                        postalCode: "00000"
                        region: WA
                      agreementType: EnterpriseAgreement
                      departments:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                          name: departmentId1
                          properties:
                            costCenter: C1
                            departmentName: departmentName1
                            status: Active
                          type: Microsoft.Billing/departments
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId2
                          name: departmentId2
                          properties:
                            costCenter: C4
                            departmentName: departmentName2
                            status: Active
                          type: Microsoft.Billing/departments
                      enrollmentAccounts:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0
                          name: accountId0
                          properties:
                            accountName: AccountName0
                            costCenter: C0
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1
                          name: accountId1
                          properties:
                            accountName: AccountName1
                            costCenter: C4
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2
                          name: accountId2
                          properties:
                            accountName: AccountName2
                            costCenter: C4
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                      enrollmentDetails:
                        billingCycle: Monthly
                        channel: EaDirect
                        countryCode: US
                        currency: USD
                        endDate: 2019-05-31T17:32:28Z
                        language: en
                        policies:
                          accountOwnerViewCharges: true
                          departmentAdminViewCharges: true
                          marketplacesEnabled: true
                          reservedInstancesEnabled: true
                        startDate: 2018-05-01T17:32:28Z
                        status: Active
                    type: Microsoft.Billing/billingAccounts
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}":
    get:
      description: Get the billing account by id.
      operationId: BillingAccounts_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to expand the address, invoiceSections and billingProfiles.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingAccount"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingAccounts
      x-ms-examples:
        BillingAccountWithExpand:
          parameters:
            $expand: address, invoiceSections, billingProfiles
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                name: "{billingAccountName}"
                properties:
                  address:
                    addressLine1: Test Address
                    addressLine2: Test Address
                    addressLine3: Test Address
                    city: City
                    companyName: Contoso
                    country: US
                    firstName: Test
                    lastName: User
                    postalCode: "00000"
                    region: WA
                  agreementType: MicrosoftCustomerAgreement
                  billingProfiles:
                    - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      name: 11000000-0000-0000-0000-000000000000
                      properties:
                        address:
                          addressLine1: Test Address1
                          addressLine2: Test Address2
                          addressLine3: Test Address3
                          city: City
                          companyName: Contoso
                          country: US
                          firstName: Test
                          lastName: User
                          postalCode: "00000"
                          region: WA
                        currency: USD
                        displayName: BillingProfile1
                        enabledAzurePlans:
                          - skuDescription: Microsoft Azure Dev/Test
                            skuId: "0001"
                          - skuDescription: Microsoft Azure Standard
                            skuId: "0002"
                        invoiceDay: 5
                        invoiceEmailOptIn: true
                        invoiceSections:
                          - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/invoiceSectionId1
                            name: invoiceSectionId1
                            properties:
                              displayName: invoiceSectionName1
                            type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                        poNumber: ABC12345
                      type: Microsoft.Billing/billingAccounts/billingProfiles
                    - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001
                      name: 11000000-0000-0000-0000-000000000001
                      properties:
                        address:
                          addressLine1: Test Address1
                          addressLine2: Test Address2
                          addressLine3: Test Address3
                          city: City
                          companyName: Contoso
                          country: US
                          firstName: Test
                          lastName: User
                          postalCode: "00000"
                          region: WA
                        currency: USD
                        displayName: BillingProfile2
                        enabledAzurePlans:
                          - skuDescription: Microsoft Azure Dev/Test
                            skuId: "0001"
                          - skuDescription: Microsoft Azure Standard
                            skuId: "0002"
                        invoiceDay: 5
                        invoiceEmailOptIn: true
                        invoiceSections:
                          - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001/invoiceSections/invoiceSectionId2
                            name: invoiceSectionId2
                            properties:
                              displayName: invoiceSectionName2
                            type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                        poNumber: ABC12345
                      type: Microsoft.Billing/billingAccounts/billingProfiles
                  customerType: Enterprise
                  displayName: Test Account 1
                  organizationId: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Billing/billingAccounts
        BillingAccounts:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                name: "{billingAccountName}"
                properties:
                  agreementType: MicrosoftCustomerAgreement
                  customerType: Enterprise
                  displayName: Test Account
                  organizationId: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Billing/billingAccounts
    patch:
      description: The operation to update a billing account.
      operationId: BillingAccounts_Update
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: Request parameters supplied to the update billing account operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingAccountUpdateRequest"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingAccount"
        "202":
          description: Accepted. Billing account update is in progress.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingAccounts
      x-ms-examples:
        UpdateBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            parameters:
              properties:
                address:
                  addressLine1: 1 Microsoft Way
                  city: Redmond
                  companyName: Contoso
                  country: US
                  firstName: Test
                  lastName: User
                  postalCode: "98052"
                  region: WA
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                name: "{billingAccountName}"
                properties:
                  agreementType: MicrosoftCustomerAgreement
                  customerType: Enterprise
                  displayName: Test Account
                  organizationId: 00000000-0000-0000-0000-000000000000
                type: Microsoft.Billing/billingAccounts
            "202":
              headers:
                Location: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationStatus/65e1f2bf-c31c-4b89-a599-25d9d4172af9?api-version=2019-10-01-preview
                Retry-After: "10"
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements":
    get:
      description: Lists all agreements for a billing account.
      operationId: Agreements_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to expand the participants.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/AgreementListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Agreements
      x-ms-examples:
        AgreementsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement1
                    name: Agreement1
                    properties:
                      agreementLink: https://agreementuri1.com
                      effectiveDate: 2018-12-05T00:00:00Z
                      expirationDate: 2018-12-05T00:00:00Z
                      participants:
                        - email: abc@contoso.com
                          status: Accepted
                          statusDate: 2018-11-01T00:00:00Z
                        - email: xtz@contoso.com
                          status: Declined
                          statusDate: 2018-11-02T00:00:00Z
                      status: Published
                    type: Microsoft.Billing/billingAccounts/agreements
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/Agreement2
                    name: Agreement2
                    properties:
                      agreementLink: https://agreementuri2.com
                      effectiveDate: 2018-12-05T00:00:00Z
                      expirationDate: 2018-12-05T00:00:00Z
                      participants:
                        - email: abc@contoso.com
                          status: Unknown
                          statusDate: 2018-11-01T00:00:00Z
                      status: PendingSignature
                    type: Microsoft.Billing/billingAccounts/agreements
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}":
    get:
      description: Get the agreement by name.
      operationId: Agreements_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/agreementNameParameter"
        - description: May be used to expand the participants.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Agreement"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Agreements
      x-ms-examples:
        AgreementByName:
          parameters:
            agreementName: "{agreementName}"
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}
                name: "{agreementName}"
                properties:
                  agreementLink: https://agreementuri1.com
                  effectiveDate: 2018-12-05T00:00:00Z
                  expirationDate: 2018-12-05T00:00:00Z
                  participants:
                    - email: abc@contoso.com
                      status: Accepted
                      statusDate: 2018-11-01T00:00:00Z
                    - email: xyz@contoso.com
                      status: Declined
                      statusDate: 2018-11-02T00:00:00Z
                  status: Published
                type: Microsoft.Billing/billingAccounts/agreements
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingPermissions":
    get:
      description: Lists all billing permissions for the caller under a billing account.
      operationId: BillingPermissions_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingPermissionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingPermissions
      x-ms-examples:
        BillingAccountPermissionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - actions:
                      - 10000000-aaaa-bbbb-cccc-200000000006
                      - 10000000-aaaa-bbbb-cccc-200000000003
                      - 10000000-aaaa-bbbb-cccc-200000000002
                      - 10000000-aaaa-bbbb-cccc-200000000001
                      - 10000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000004
                      - 30000000-aaaa-bbbb-cccc-200000000015
                      - 20000000-aaaa-bbbb-cccc-200000000002
                      - 30000000-aaaa-bbbb-cccc-200000000009
                      - 40000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000000
                      - 20000000-aaaa-bbbb-cccc-200000000000
                      - 10000000-aaaa-bbbb-cccc-200000000008
                      - 10000000-aaaa-bbbb-cccc-200000000007
                      - 40000000-aaaa-bbbb-cccc-200000000008
                      - 40000000-aaaa-bbbb-cccc-200000000006
                      - 40000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000010
                      - 30000000-aaaa-bbbb-cccc-200000000001
                    notActions: []
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles":
    get:
      description: Lists all billing profiles for a user which that user has access to.
      operationId: BillingProfiles_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to expand the invoiceSections.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingProfileListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingProfiles
      x-ms-examples:
        BillingProfilesListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                    name: 11000000-0000-0000-0000-000000000000
                    properties:
                      address:
                        addressLine1: Test Address1
                        addressLine2: Test Address2
                        addressLine3: Test Address3
                        city: City
                        companyName: Contoso
                        country: US
                        firstName: Test
                        lastName: User
                        postalCode: "00000"
                        region: WA
                      currency: USD
                      displayName: BillingProfile1
                      enabledAzurePlans:
                        - skuDescription: Microsoft Azure Dev/Test
                          skuId: "0001"
                        - skuDescription: Microsoft Azure Standard
                          skuId: "0002"
                      invoiceDay: 5
                      invoiceEmailOptIn: true
                      poNumber: ABC12345
                    type: Microsoft.Billing/billingAccounts/billingProfiles
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001
                    name: 11000000-0000-0000-0000-000000000001
                    properties:
                      address:
                        addressLine1: Test Address1
                        addressLine2: Test Address2
                        addressLine3: Test Address3
                        city: City
                        companyName: Contoso
                        country: US
                        firstName: Test
                        lastName: User
                        postalCode: "00000"
                        region: WA
                      currency: USD
                      displayName: BillingProfile2
                      enabledAzurePlans:
                        - skuDescription: Microsoft Azure Dev/Test
                          skuId: "0001"
                        - skuDescription: Microsoft Azure Standard
                          skuId: "0002"
                      invoiceDay: 5
                      invoiceEmailOptIn: true
                      poNumber: ABC12345
                    type: Microsoft.Billing/billingAccounts/billingProfiles
        BillingProfilesListWithExpand:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                    name: 11000000-0000-0000-0000-000000000000
                    properties:
                      address:
                        addressLine1: Test Address1
                        addressLine2: Test Address2
                        addressLine3: Test Address3
                        city: City
                        companyName: Contoso
                        country: US
                        firstName: Test
                        lastName: User
                        postalCode: "00000"
                        region: WA
                      currency: USD
                      displayName: BillingProfile1
                      enabledAzurePlans:
                        - skuDescription: Microsoft Azure Dev/Test
                          skuId: "0001"
                        - skuDescription: Microsoft Azure Standard
                          skuId: "0002"
                      invoiceDay: 5
                      invoiceEmailOptIn: true
                      invoiceSections:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/invoiceSectionId1
                          name: invoiceSectionId1
                          properties:
                            displayName: invoiceSectionName1
                          type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                      poNumber: ABC12345
                    type: Microsoft.Billing/billingAccounts/billingProfiles
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001
                    name: 11000000-0000-0000-0000-000000000001
                    properties:
                      address:
                        addressLine1: Test Address1
                        addressLine2: Test Address2
                        addressLine3: Test Address3
                        city: City
                        companyName: Contoso
                        country: US
                        firstName: Test
                        lastName: User
                        postalCode: "00000"
                        region: WA
                      currency: USD
                      displayName: BillingProfile2
                      enabledAzurePlans:
                        - skuDescription: Microsoft Azure Dev/Test
                          skuId: "0001"
                        - skuDescription: Microsoft Azure Standard
                          skuId: "0002"
                      invoiceDay: 5
                      invoiceEmailOptIn: true
                      invoiceSections:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000001/invoiceSections/invoiceSectionId2
                          name: invoiceSectionId2
                          properties:
                            displayName: invoiceSectionName2
                          type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                      poNumber: ABC12345
                    type: Microsoft.Billing/billingAccounts/billingProfiles
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}":
    get:
      description: Get the billing profile by id.
      operationId: BillingProfiles_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: May be used to expand the invoiceSections.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingProfile"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingProfiles
      x-ms-examples:
        BillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                name: "{billingProfileName}"
                properties:
                  address:
                    addressLine1: Test Address1
                    addressLine2: Test Address2
                    addressLine3: Test Address3
                    city: City
                    companyName: Contoso
                    country: US
                    firstName: Test
                    lastName: User
                    postalCode: "00000"
                    region: WA
                  currency: USD
                  displayName: Billing Profile1
                  enabledAzurePlans:
                    - skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                    - skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                  invoiceDay: 5
                  invoiceEmailOptIn: true
                  poNumber: ABC12345
                type: Microsoft.Billing/billingAccounts/billingProfiles
        BillingProfileWithExpand:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                name: "{billingProfileName}"
                properties:
                  address:
                    addressLine1: Test Address1
                    addressLine2: Test Address2
                    addressLine3: Test Address3
                    city: City
                    companyName: Contoso
                    country: US
                    firstName: Test
                    lastName: User
                    postalCode: "00000"
                    region: WA
                  currency: USD
                  displayName: Billing Profile1
                  enabledAzurePlans:
                    - skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                    - skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                  invoiceDay: 5
                  invoiceEmailOptIn: true
                  invoiceSections:
                    - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/invoiceSectionId1
                      name: invoiceSectionId1
                      properties:
                        displayName: invoiceSectionName1
                      type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                  poNumber: ABC12345
                type: Microsoft.Billing/billingAccounts/billingProfiles
    patch:
      description: The operation to update a billing profile.
      operationId: BillingProfiles_Update
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: Request parameters supplied to the update billing profile operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingProfile"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingProfile"
        "202":
          description: Accepted. Billing profile update is in progress.
          headers:
            Location:
              description: GET this URL to retrieve the status of the asynchronous operation.
              type: string
            Retry-After:
              description: The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingProfiles
      x-ms-examples:
        UpdateBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            parameters:
              properties:
                displayName: BillingProfile11
                invoiceEmailOptIn: true
                poNumber: ABC12345
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                name: "{billingProfileName}"
                properties:
                  address:
                    addressLine1: Test Address1
                    addressLine2: Test Address2
                    addressLine3: Test Address3
                    city: City
                    companyName: Contoso
                    country: US
                    firstName: Test
                    lastName: User
                    postalCode: "00000"
                    region: WA
                  currency: USD
                  displayName: BillingProfile11
                  enabledAzurePlans:
                    - skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                    - skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                  invoiceDay: 5
                  invoiceEmailOptIn: true
                  poNumber: ABC12345
                type: Microsoft.Billing/billingAccounts/billingProfiles
            "202":
              headers:
                Location: /providers/Microsoft.Billing/billingOperations/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-05-31-preview
                Retry-After: "60"
      x-ms-long-running-operation: true
    put:
      description: The operation to create a BillingProfile.
      operationId: BillingProfiles_Create
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: Request parameters supplied to the Create BillingProfile operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingProfileCreationRequest"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingProfile"
        "202":
          description: Accepted
          headers:
            Location:
              description: Location URI to poll for result
              type: string
            Retry-After:
              description: Recommends the retryable time after receiving this.
              type: integer
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingProfiles
      x-ms-examples:
        CreateBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            parameters:
              address:
                addressLine1: 1 Microsoft Way
                city: Redmond
                country: US
                firstName: Test
                lastName: User
                postalCode: "98052"
                region: WA
              displayName: Finance
              enabledAzurePlans:
                - skuId: "0001"
                - skuId: "0002"
              invoiceEmailOptIn: true
              poNumber: ABC12345
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/billingProfileId1
                name: billingProfileId1
                properties:
                  address:
                    addressLine1: 1 Microsoft Way
                    city: Redmond
                    country: US
                    firstName: Test
                    lastName: User
                    postalCode: "98052"
                    region: WA
                  currency: USD
                  displayName: Finance
                  enabledAzurePlans:
                    - skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                    - skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                  invoiceDay: 5
                  invoiceEmailOptIn: true
                  poNumber: ABC12345
                type: Microsoft.Billing/billingAccounts/billingProfiles
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-07-31
                Retry-After: "60"
      x-ms-long-running-operation: true
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default":
    get:
      description: The latest available credit balance for a given billingAccountName and billingProfileName.
      operationId: AvailableBalances_GetByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/AvailableBalance"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - AvailableBalances
      x-ms-examples:
        AvailableBalanceByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default
                name: default
                properties:
                  amount:
                    currency: USD
                    value: 500
                type: Microsoft.Billing/billingAccounts/billingProfiles/availableBalance
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingPermissions":
    get:
      description: Lists all billing permissions the caller has for a billing account.
      operationId: BillingPermissions_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingPermissionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingPermissions
      x-ms-examples:
        BillingProfilePermissionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - actions:
                      - 10000000-aaaa-bbbb-cccc-200000000006
                      - 10000000-aaaa-bbbb-cccc-200000000003
                      - 10000000-aaaa-bbbb-cccc-200000000002
                      - 10000000-aaaa-bbbb-cccc-200000000001
                      - 10000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000004
                      - 30000000-aaaa-bbbb-cccc-200000000015
                      - 20000000-aaaa-bbbb-cccc-200000000002
                      - 30000000-aaaa-bbbb-cccc-200000000009
                      - 40000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000000
                      - 20000000-aaaa-bbbb-cccc-200000000000
                      - 10000000-aaaa-bbbb-cccc-200000000008
                      - 10000000-aaaa-bbbb-cccc-200000000007
                      - 40000000-aaaa-bbbb-cccc-200000000008
                      - 40000000-aaaa-bbbb-cccc-200000000006
                      - 40000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000010
                      - 30000000-aaaa-bbbb-cccc-200000000001
                    notActions: []
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments":
    get:
      description: Get the role assignments on the Billing Profile
      operationId: BillingRoleAssignments_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingProfileRoleAssignmentList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:58:19.9073876+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                      principalId: 00000000-0000-0000-0000-000000000000
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    properties:
                      createdByPrincipalId: 00000000-0000-0000-0000-000000000000
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-22T06:03:51.430844+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                      principalId: 129db794-64a5-44e0-9838-002780478959
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    properties:
                      createdByPrincipalId: 00000000-0000-0000-0000-000000000000
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-06T05:52:57.1463874+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      principalId: d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    properties:
                      createdByPrincipalId: 00000000-0000-0000-0000-000000000000
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-10T22:04:33.8309285+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      principalId: c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}":
    delete:
      description: Delete the role assignment on this Billing Profile
      operationId: BillingRoleAssignments_DeleteByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingProfileRoleAssignmentDelete:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleAssignmentName: "{billingRoleAssignmentName}"
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                properties:
                  createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:58:19.9073876+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                  principalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                type: Microsoft.Billing/billingRoleAssignments
    get:
      description: Get the role assignment for the caller on the Billing Profile
      operationId: BillingRoleAssignments_GetByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingProfileRoleAssignment:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleAssignmentName: "{billingRoleAssignmentName}"
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                properties:
                  createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:58:19.9073876+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                  principalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions":
    get:
      description: Lists the role definition for a Billing Profile
      operationId: BillingRoleDefinitions_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinitionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        BillingProfileRoleDefinitionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000
                    properties:
                      description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000000
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 20000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000000
                            - 40000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: billing_profile_owner
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000001
                    name: 10000000-aaaa-bbbb-cccc-100000000001
                    properties:
                      description: The Contributor role give the user all permissions except access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: billing_profile_contributor
                    type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}":
    get:
      description: Gets the role definition for a role
      operationId: BillingRoleDefinitions_GetByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/billingRoleDefinitionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinition"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        BillingProfileRoleDefinition:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleDefinitionName: "{billingRoleDefinitionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{billingRoleDefinitionName}
                name: "{billingRoleDefinitionName}"
                properties:
                  description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                  permissions:
                    - actions:
                        - 10000000-aaaa-bbbb-cccc-200000000000
                        - 10000000-aaaa-bbbb-cccc-200000000008
                        - 10000000-aaaa-bbbb-cccc-200000000001
                        - 10000000-aaaa-bbbb-cccc-200000000002
                        - 10000000-aaaa-bbbb-cccc-200000000003
                        - 10000000-aaaa-bbbb-cccc-200000000006
                        - 10000000-aaaa-bbbb-cccc-200000000007
                        - 20000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000000
                        - 40000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000009
                        - 20000000-aaaa-bbbb-cccc-200000000002
                        - 30000000-aaaa-bbbb-cccc-200000000015
                        - 30000000-aaaa-bbbb-cccc-200000000004
                        - 30000000-aaaa-bbbb-cccc-200000000007
                        - 30000000-aaaa-bbbb-cccc-200000000001
                        - 30000000-aaaa-bbbb-cccc-200000000010
                        - 40000000-aaaa-bbbb-cccc-200000000007
                        - 40000000-aaaa-bbbb-cccc-200000000006
                        - 40000000-aaaa-bbbb-cccc-200000000008
                      notActions: []
                  roleName: commerce_root_owner
                type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions":
    get:
      description: Lists billing subscriptions by billing profile name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: BillingSubscriptions_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscriptionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscriptionsListByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/billinSubscriptionId1
                    name: billingSubscriptionId1
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      displayName: My subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 5000
                      monthToDateCharges:
                        currency: USD
                        value: 600
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/billinSubscriptionId2
                    name: billingSubscriptionId2
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      displayName: Test subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 1000
                      monthToDateCharges:
                        currency: USD
                        value: 400
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-6b96d3f2
                    type: Microsoft.Billing/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/billinSubscriptionId3
                    name: billingSubscriptionId3
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      displayName: Dev Subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 6000
                      monthToDateCharges:
                        currency: USD
                        value: 900
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-4a9d-9008-912f-f87744185aa3
                    type: Microsoft.Billing/billingSubscriptions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment":
    post:
      description: The operation to add a role assignment to a billing profile.
      operationId: BillingRoleAssignments_AddByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: Parameters supplied to add a role assignment.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingRoleAssignmentPayload"
      responses:
        "201":
          description: Role assignment is successfully created
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        AddRoleAssignmentToBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            parameters:
              billingRoleDefinitionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000
              principalId: 00000000-0000-0000-0000-000000000000
          responses:
            "201":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                      principalId: 00000000-0000-0000-0000-000000000000
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers":
    get:
      description: Lists customers by billing profile which the current user can work with on-behalf of a partner.
      operationId: Customers_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: May be used to filter the list of customers.
          in: query
          name: $filter
          required: false
          type: string
        - description: Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
          in: query
          name: $skiptoken
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/CustomerListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Customers
      x-ms-examples:
        CustomersListByBillingAccount:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000000
                    name: 22000000-0000-0000-0000-000000000000
                    properties:
                      displayName: customer1
                    type: Microsoft.Billing/customers
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000011
                    name: 22000000-0000-0000-0000-000000000011
                    properties:
                      displayName: customer2
                    type: Microsoft.Billing/customers
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/initiateTransfer":
    post:
      description: Initiates the request to transfer the legacy subscriptions or RIs.
      operationId: PartnerTransfers_Initiate
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - description: Parameters supplied to initiate the transfer.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/InitiateTransferRequest"
      responses:
        "200":
          description: Initiated transfer details.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        InitiatePartnerTransfer:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            customerName: "{customerName}"
            parameters:
              properties:
                recipientEmailId: user@contoso.com
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  creationTime: 2018-10-10T17:32:28Z
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: Pending
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers":
    get:
      description: Lists all transfer's details initiated from given invoice section.
      operationId: PartnerTransfers_List
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/customerNameParameter"
      responses:
        "200":
          description: List of transfers initiated from this invoice section.
          schema:
            $ref: "#/definitions/TransferDetailsListResult"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransfersList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                value:
                  - properties:
                      billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                      billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      creationTime: 2018-10-10T17:32:28Z
                      detailedTransferStatus:
                        - productId: subscriptionId
                          productType: AzureSubscription
                          transferStatus: InProgress
                        - productId: reservedInstanceId
                          productType: AzureReservation
                          transferStatus: InProgress
                      expirationTime: 2018-11-05T17:32:28Z
                      initiatorEmailId: xyz@contoso.com
                      invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}
                      lastModifiedTime: 2018-10-10T17:32:28Z
                      recipientEmailId: user@contoso.com
                      transferStatus: InProgress
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}":
    delete:
      description: Cancels the transfer for given transfer Id.
      operationId: PartnerTransfers_Cancel
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of canceled transfer.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransferCancel:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            customerName: "{customerName}"
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  canceledBy: user@contoso.com
                  creationTime: 2018-10-10T17:32:28Z
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: Pending
    get:
      description: Gets the transfer details for given transfer Id.
      operationId: PartnerTransfers_Get
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of transfer.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransferGet:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            customerName: "{customerName}"
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  creationTime: 2018-10-10T17:32:28Z
                  detailedTransferStatus:
                    - productId: subscriptionId
                      productType: AzureSubscription
                      transferStatus: InProgress
                    - productId: reservedInstanceId
                      productType: AzureReservation
                      transferStatus: InProgress
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorCustomerType: Partner
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: InProgress
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions":
    get:
      description: Lists the instructions by billing profile id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Instructions_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InstructionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Instructions
      x-ms-examples:
        InstructionsListByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/TO1:CLIN001
                    name: TO1:CLIN001
                    properties:
                      amount: 5000
                      endDate: 2020-12-30T21:26:47.997Z
                      startDate: 2019-12-30T21:26:47.997Z
                    type: Microsoft.Billing/billingAccounts/billingProfiles/instructions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/TO1:CLIN002
                    name: TO1:CLIN002
                    properties:
                      amount: 2000
                      endDate: 2020-12-30T21:26:47.997Z
                      startDate: 2019-12-30T21:26:47.997Z
                    type: Microsoft.Billing/billingAccounts/billingProfiles/instructions
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}":
    get:
      description: Get the instruction by name.
      operationId: Instructions_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/instructionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Instruction"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Instructions
      x-ms-examples:
        Instruction:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            instructionName: "{instructionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}
                name: "{instructionName}"
                properties:
                  amount: 5000
                  endDate: 2020-12-30T21:26:47.997Z
                  startDate: 2019-12-30T21:26:47.997Z
                type: Microsoft.Billing/billingAccounts/billingProfiles/instructions
    put:
      description: The operation to create or update a instruction.
      operationId: Instructions_Put
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/instructionNameParameter"
        - description: The new instruction.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Instruction"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Instruction"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Instructions
      x-ms-examples:
        PutInstruction:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            instructionName: "{instructionName}"
            parameters:
              properties:
                amount: 5000
                endDate: 2020-12-30T21:26:47.997Z
                startDate: 2019-12-30T21:26:47.997Z
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/instructions/{instructionName}
                name: "{instructionName}"
                properties:
                  amount: 5000
                  endDate: 2020-12-30T21:26:47.997Z
                  startDate: 2019-12-30T21:26:47.997Z
                type: Microsoft.Billing/billingAccounts/billingProfiles/instructions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections":
    get:
      description: Lists all invoice sections for a user which he has access to.
      operationId: InvoiceSections_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceSectionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - InvoiceSections
      x-ms-examples:
        InvoiceSectionsListByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                    name: 22000000-0000-0000-0000-000000000000
                    properties:
                      displayName: invoiceSection1
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000011
                    name: 22000000-0000-0000-0000-000000000011
                    properties:
                      displayName: invoiceSection2
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}":
    get:
      description: Get the InvoiceSection by id.
      operationId: InvoiceSections_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceSection"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - InvoiceSections
      x-ms-examples:
        InvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                name: "{invoiceSectionName}"
                properties:
                  displayName: invoiceSection1
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
    patch:
      description: The operation to update a InvoiceSection.
      operationId: InvoiceSections_Update
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - description: Request parameters supplied to the Create InvoiceSection operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/InvoiceSection"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceSection"
        "202":
          description: Accepted. InvoiceSection update is in progress.
          headers:
            Location:
              description: GET this URL to retrieve the status of the asynchronous operation.
              type: string
            Retry-After:
              description: The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - InvoiceSections
      x-ms-examples:
        UpdateInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              properties:
                displayName: invoiceSection1
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                name: "{invoiceSectionName}"
                properties:
                  displayName: invoiceSection1
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2019-10-01-preview
                Retry-After: "60"
      x-ms-long-running-operation: true
    put:
      description: The operation to create an invoice section.
      operationId: InvoiceSections_Create
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - description: Request parameters supplied to the Create InvoiceSection operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/InvoiceSectionCreationRequest"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceSection"
        "202":
          description: Accepted
          headers:
            Location:
              description: Location URI to poll for result
              type: string
            Retry-After:
              description: Recommends the retryable time after receiving this.
              type: integer
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - InvoiceSections
      x-ms-examples:
        CreateInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              displayName: invoiceSection1
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/invoiceSectionId1
                name: invoiceSectionId1
                properties:
                  displayName: invoiceSection1
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-07-31
                Retry-After: "60"
      x-ms-long-running-operation: true
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingPermissions":
    get:
      description: Lists all billing permissions for the caller under invoice section.
      operationId: BillingPermissions_ListByInvoiceSections
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingPermissionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingPermissions
      x-ms-examples:
        InvoiceSectionPermissionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - actions:
                      - 10000000-aaaa-bbbb-cccc-200000000006
                      - 10000000-aaaa-bbbb-cccc-200000000003
                      - 10000000-aaaa-bbbb-cccc-200000000002
                      - 10000000-aaaa-bbbb-cccc-200000000001
                      - 10000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000004
                      - 30000000-aaaa-bbbb-cccc-200000000015
                      - 20000000-aaaa-bbbb-cccc-200000000002
                      - 30000000-aaaa-bbbb-cccc-200000000009
                      - 40000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000000
                      - 20000000-aaaa-bbbb-cccc-200000000000
                      - 10000000-aaaa-bbbb-cccc-200000000008
                      - 10000000-aaaa-bbbb-cccc-200000000007
                      - 40000000-aaaa-bbbb-cccc-200000000008
                      - 40000000-aaaa-bbbb-cccc-200000000006
                      - 40000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000010
                      - 30000000-aaaa-bbbb-cccc-200000000001
                    notActions: []
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments":
    get:
      description: Get the role assignments on the invoice Section
      operationId: BillingRoleAssignments_ListByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        InvoiceSectionRoleAssignmentList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    properties:
                      createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:58:19.9073876+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                      principalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-22T06:03:51.430844+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                      principalId: 129db794-64a5-44e0-9838-002780478959
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-06T05:52:57.1463874+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      principalId: d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-10T22:04:33.8309285+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      principalId: c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}":
    delete:
      description: Delete the role assignment on the invoice Section
      operationId: BillingRoleAssignments_DeleteByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        InvoiceSectionRoleAssignmentDelete:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleAssignmentName: "{billingRoleAssignmentName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                properties:
                  createdByPrincipalId: ""
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:34:12.2363515+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                type: Microsoft.Billing/billingRoleAssignments
    get:
      description: Get the role assignment for the caller on the invoice Section
      operationId: BillingRoleAssignments_GetByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        InvoiceSectionRoleAssignment:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleAssignmentName: "{billingRoleAssignmentName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                properties:
                  createdByPrincipalId: ""
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:34:12.2363515+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions":
    get:
      description: Lists the role definition for an invoice Section
      operationId: BillingRoleDefinitions_ListByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinitionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        InvoiceSectionRoleDefinitionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000
                    properties:
                      description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000000
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 20000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000000
                            - 40000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: project_owner
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000001
                    name: 10000000-aaaa-bbbb-cccc-100000000001
                    properties:
                      description: The Contributor role give the user all permissions except access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: project_contributor
                    type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}":
    get:
      description: Gets the role definition for a role
      operationId: BillingRoleDefinitions_GetByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingRoleDefinitionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinition"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        InvoiceSectionRoleDefinition:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingRoleDefinitionName: "{billingRoleDefinitionName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{billingRoleDefinitionName}
                name: "{billingRoleDefinitionName}"
                properties:
                  description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                  permissions:
                    - actions:
                        - 10000000-aaaa-bbbb-cccc-200000000000
                        - 10000000-aaaa-bbbb-cccc-200000000008
                        - 10000000-aaaa-bbbb-cccc-200000000001
                        - 10000000-aaaa-bbbb-cccc-200000000002
                        - 10000000-aaaa-bbbb-cccc-200000000003
                        - 10000000-aaaa-bbbb-cccc-200000000006
                        - 10000000-aaaa-bbbb-cccc-200000000007
                        - 20000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000000
                        - 40000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000009
                        - 20000000-aaaa-bbbb-cccc-200000000002
                        - 30000000-aaaa-bbbb-cccc-200000000015
                        - 30000000-aaaa-bbbb-cccc-200000000004
                        - 30000000-aaaa-bbbb-cccc-200000000007
                        - 30000000-aaaa-bbbb-cccc-200000000001
                        - 30000000-aaaa-bbbb-cccc-200000000010
                        - 40000000-aaaa-bbbb-cccc-200000000007
                        - 40000000-aaaa-bbbb-cccc-200000000006
                        - 40000000-aaaa-bbbb-cccc-200000000008
                      notActions: []
                  roleName: commerce_root_owner
                type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions":
    get:
      description: Lists billing subscription by invoice section name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: BillingSubscriptions_ListByInvoiceSection
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscriptionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscriptionsListByInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/billinSubscriptionId1
                    name: billingSubscriptionId1
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: My subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastMonthCharges:
                        currency: USD
                        value: 5000
                      monthToDateCharges:
                        currency: USD
                        value: 600
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/billinSubscriptionId2
                    name: billingSubscriptionId2
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Test subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastMonthCharges:
                        currency: USD
                        value: 1000
                      monthToDateCharges:
                        currency: USD
                        value: 400
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-6b96d3f2
                    type: Microsoft.Billing/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/billinSubscriptionId3
                    name: billingSubscriptionId3
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Dev Subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastMonthCharges:
                        currency: USD
                        value: 6000
                      monthToDateCharges:
                        currency: USD
                        value: 900
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-4a9d-9008-912f-f87744185aa3
                    type: Microsoft.Billing/billingSubscriptions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}":
    get:
      description: Get a single billing subscription by name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: BillingSubscriptions_Get
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscription"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscription:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}
                name: "{billingSubscriptionName}"
                properties:
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                  displayName: My Subscription
                  invoiceSectionDisplayName: Contoso operations invoiceSection
                  invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  lastMonthCharges:
                    currency: USD
                    value: 5000
                  monthToDateCharges:
                    currency: USD
                    value: 600
                  skuDescription: Microsoft Azure Dev/Test
                  skuId: "0001"
                  subscriptionBillingStatus: Active
                  subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/transfer":
    post:
      description: Transfers the subscription from one invoice section to another within a billing account.
      operationId: BillingSubscriptions_Transfer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - description: Request parameters supplied to the Transfer Billing Subscription operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/TransferBillingSubscriptionRequestProperties"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TransferBillingSubscriptionResult"
        "202":
          description: Accepted. Billing Subscription transfer is in progress.
          headers:
            Location:
              description: Location URI to poll for result.
              type: string
            Retry-After:
              description: Recommends the retryable time after receiving this.
              type: integer
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      x-ms-examples:
        TransferBillingSubscription:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{newInvoiceSectionName}
          responses:
            "200":
              body:
                properties:
                  billingSubscriptionName: Test subscription
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/transfer/operationResults/10000000-0000-0000-0000-000000000001?api-version=2019-10-01-preview
                Retry-After: "30"
      x-ms-long-running-operation: true
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions/{billingSubscriptionName}/validateTransferEligibility":
    post:
      description: Validates the transfer of billing subscriptions across invoice sections.
      operationId: BillingSubscriptions_ValidateTransfer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - description: Parameters supplied to the Transfer Billing Subscription operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/TransferBillingSubscriptionRequestProperties"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ValidateSubscriptionTransferEligibilityResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      x-ms-examples:
        SubscriptionTransferValidateFailure:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
          responses:
            "200":
              body:
                errorDetails:
                  code: SubscriptionNotActive
                  message: Invoice Sections can only be changed for active subscriptions.
                isTransferEligible: false
        SubscriptionTransferValidateSuccess:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
          responses:
            "200":
              body:
                isTransferEligible: true
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment":
    post:
      description: The operation to add a role assignment to a invoice Section.
      operationId: BillingRoleAssignments_AddByInvoiceSection
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - description: Parameters supplied to add a role assignment.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingRoleAssignmentPayload"
      responses:
        "201":
          description: Role assignment is successfully created
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        AddRoleAssignmentToInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              billingRoleDefinitionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000
              principalId: 00000000-0000-0000-0000-000000000000
          responses:
            "201":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                      principalId: 00000000-0000-0000-0000-000000000000
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/elevate":
    post:
      description: Elevates the caller's access to match their billing profile access.
      operationId: InvoiceSections_ElevateToBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "204":
          description: Elevated the caller's access to the invoice section.
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - InvoiceSections
      x-ms-examples:
        Elevate:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "204": {}
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/initiateTransfer":
    post:
      description: Initiates the request to transfer the legacy subscriptions or RIs.
      operationId: Transfers_Initiate
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - description: Parameters supplied to initiate the transfer.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/InitiateTransferRequest"
      responses:
        "200":
          description: Initiated transfer details.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        InitiateTransfer:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              properties:
                recipientEmailId: user@contoso.com
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  creationTime: 2018-10-10T17:32:28Z
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: Pending
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products":
    get:
      description: Lists products by invoice section name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Products_ListByInvoiceSection
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ProductsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        ProductsListByInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/00000000-0000-0000-0000-000000000000
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: OneTime
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Eng Reservation (1a13s21awe)
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastCharge:
                        currency: USD
                        value: 5000
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Reservation
                      productTypeId: A12345
                      purchaseDate: 2018-05-01T17:32:28Z
                      quantity: 4
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/products
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/10000000-0000-0000-0000-000000000001
                    name: 10000000-0000-0000-0000-000000000001
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: Monthly
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Engineering Email
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastCharge:
                        currency: USD
                        value: 500
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Azure subscription
                      productTypeId: A12345
                      purchaseDate: 2018-04-01T17:32:28Z
                      quantity: 4
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/products
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}":
    get:
      description: Get a single product by name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Products_Get
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/productNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Product"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        Product:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            productName: "{productName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}
                name: "{productName}"
                properties:
                  availabilityId: AvailabilityId1
                  billingFrequency: Monthly
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                  displayName: AIP Dev
                  invoiceSectionDisplayName: Contoso operations invoiceSection
                  invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  lastCharge:
                    currency: USD
                    value: 5000
                  lastChargeDate: 2018-06-15T17:32:28Z
                  parentProductId: 45000000-0000-0000-0000-0000000001242
                  productType: Subscription
                  productTypeId: A12345
                  purchaseDate: 2018-05-01T17:32:28Z
                  quantity: 4
                  skuDescription: Enterprise Agreement Development
                  skuId: "0001"
                  status: Active
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/products
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/transfer":
    post:
      description: The operation to transfer a Product to another invoice section.
      operationId: Products_Transfer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/productNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: Parameters supplied to the Transfer Product operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/TransferProductRequestProperties"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Product"
        "202":
          description: Accepted
          headers:
            Location:
              description: Location URI to poll for result
              type: string
            Retry-After:
              description: Recommends the retryable time after receiving this.
              type: integer
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        TransferProduct:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
            productName: "{productName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}/products/{productName}
                name: "{productName}"
                properties:
                  availabilityId: AvailabilityId1
                  billingFrequency: Monthly
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                  displayName: Test Product
                  invoiceSectionDisplayName: Contoso operations invoiceSection
                  invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
                  lastCharge:
                    currency: USD
                    value: 5000
                  lastChargeDate: 2018-06-15T17:32:28Z
                  parentProductId: 45000000-0000-0000-0000-0000000001242
                  productType: Subscription
                  productTypeId: A12345
                  purchaseDate: 2018-05-01T17:32:28Z
                  quantity: 4
                  skuDescription: Enterprise Agreement Development
                  skuId: "0001"
                  status: Active
                type: Microsoft.Billing/products
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/operationResults/44000000-0000-0000-0000-000000000000?api-version=2019-10-01-preview
                OData-EntityId: 44000000-0000-0000-0000-000000000000
                Retry-After: "60"
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/updateAutoRenew":
    post:
      description: Cancel auto renew for product by product id and invoice section name
      operationId: Products_UpdateAutoRenewByInvoiceSection
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/productNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/updateAutoRenewRequestParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/UpdateAutoRenewOperation"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        CancelProductForInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            body:
              autoRenew: "false"
            invoiceSectionName: "{invoiceSectionName}"
            productName: "{productName}"
          responses:
            "200":
              body:
                properties:
                  endDate: 2018-05-01T17:32:28Z
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/{productName}/validateTransferEligibility":
    post:
      description: Validates the transfer of products across invoice sections.
      operationId: Products_ValidateTransfer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/productNameParameter"
        - description: Parameters supplied to the Transfer Products operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/TransferProductRequestProperties"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ValidateProductTransferEligibilityResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      x-ms-examples:
        SubscriptionTransferValidateFailure:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
            productName: "{productName}"
          responses:
            "200":
              body:
                errorDetails:
                  code: ProductTypeNotSupported
                  message: Product '{productName}' is not allowed to be transferred.
                isTransferEligible: false
        SubscriptionTransferValidateSuccess:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            parameters:
              destinationBillingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}
              destinationInvoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{newBillingProfileName}/invoiceSections/{newInvoiceSectionName}
            productName: "{productName}"
          responses:
            "200":
              body:
                isTransferEligible: true
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transactions":
    get:
      description: Lists the transactions by invoice section name for given start date and end date.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Transactions_ListByInvoiceSection
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: Start date
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: End date
          in: query
          name: periodEndDate
          required: true
          type: string
        - description: May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TransactionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transactions
      x-ms-examples:
        ReservationTransactionsListByInvoiceSection:
          parameters:
            $filter: properties/kind eq 'Reservation'
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-04-23T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      kind: reservation
                      orderId: 6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c
                      orderName: Contoso Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 4
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/82000000-0000-0000-0000-000000000000
                    name: 82000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-05-05T00:00:00Z
                      invoice: Pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      kind: reservation
                      orderId: 1c24006f-8350-4315-ad8f-6d11180448f9
                      orderName: Test Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 5
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 6000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
        TransactionsListByInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-05-01T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      kind: all
                      productDescription: Standard D1, US West 3
                      productFamily: Storage
                      productType: Reserved VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/51000000-0000-0000-0000-000000000000
                    name: 51000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-04-01T00:00:00Z
                      invoice: pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      kind: all
                      productDescription: Standard Support
                      productFamily: Storage
                      productType: VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 50
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers":
    get:
      description: Lists all transfer's details initiated from given invoice section.
      operationId: Transfers_List
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
      responses:
        "200":
          description: List of transfers initiated from this invoice section.
          schema:
            $ref: "#/definitions/TransferDetailsListResult"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransfersList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
          responses:
            "200":
              body:
                value:
                  - properties:
                      billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                      billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      creationTime: 2018-10-10T17:32:28Z
                      detailedTransferStatus:
                        - productId: subscriptionId
                          productType: AzureSubscription
                          transferStatus: InProgress
                        - productId: reservedInstanceId
                          productType: AzureReservation
                          transferStatus: InProgress
                      expirationTime: 2018-11-05T17:32:28Z
                      initiatorEmailId: xyz@contoso.com
                      invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                      lastModifiedTime: 2018-10-10T17:32:28Z
                      recipientEmailId: user@contoso.com
                      transferStatus: InProgress
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}":
    delete:
      description: Cancels the transfer for given transfer Id.
      operationId: Transfers_Cancel
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of canceled transfer.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransferCancel:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  canceledBy: user@contoso.com
                  creationTime: 2018-10-10T17:32:28Z
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: Pending
    get:
      description: Gets the transfer details for given transfer Id.
      operationId: Transfers_Get
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceSectionNameParameter"
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of transfer.
          schema:
            $ref: "#/definitions/TransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transfers
      x-ms-examples:
        TransferGet:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceSectionName: "{invoiceSectionName}"
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  billingAccountId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}
                  billingProfileId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  creationTime: 2018-10-10T17:32:28Z
                  detailedTransferStatus:
                    - productId: subscriptionId
                      productType: AzureSubscription
                      transferStatus: InProgress
                    - productId: reservedInstanceId
                      productType: AzureReservation
                      transferStatus: InProgress
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  invoiceSectionId: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: InProgress
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices":
    get:
      description: List of invoices for a billing profile.
      operationId: Invoices_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: Invoice period start date.
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: Invoice period end date.
          in: query
          name: periodEndDate
          required: true
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Invoices
      x-ms-examples:
        InvoicesListByBillingProfile:
          parameters:
            $filter: invoicePeriodStartDate le 2018-06-01
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            periodEndDate: 2018-06-30
            periodStartDate: 2018-01-01
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/1383723
                    name: "1383723"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      billedAmount:
                        currency: USD
                        value: 2000
                      billingProfileDisplayName: Contoso Operations Billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      documents:
                        - kind: Invoice
                          url: https://microsoft.com/invoice.pdf
                        - kind: Receipt
                          url: https://microsoft.com/taxDoc.pdf
                        - kind: CreditNote
                          url: https://microsoft.com/creditNote.pdf
                      dueDate: 2018-01-16T17:32:28Z
                      invoiceDate: 2018-01-01T17:32:28Z
                      invoicePeriodEndDate: 2018-01-15T17:32:28Z
                      invoicePeriodStartDate: 2018-01-01T17:32:28Z
                      payments:
                        - amount:
                            currency: USD
                            value: 2000
                          date: 2018-01-14T17:32:28Z
                          paymentMethodFamily: CreditCard
                          paymentMethodType: visa
                          paymentType: credited
                      purchaseOrderNumber: "123456"
                      status: Due
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoices
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/1383724
                    name: "1383724"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      billedAmount:
                        currency: USD
                        value: 2000
                      billingProfileDisplayName: Contoso Operations Billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      documents:
                        - kind: Invoice
                          url: https://microsoft.com/invoice.pdf
                        - kind: Receipt
                          url: https://microsoft.com/taxDoc.pdf
                        - kind: CreditNote
                          url: https://microsoft.com/creditNote.pdf
                      dueDate: 2018-03-01T17:32:28Z
                      invoiceDate: 2018-01-01T17:32:28Z
                      invoicePeriodEndDate: 2018-02-30T17:32:28Z
                      invoicePeriodStartDate: 2018-02-01T17:32:28Z
                      payments:
                        - amount:
                            currency: USD
                            value: 2000
                          date: 2018-01-14T17:32:28Z
                          paymentMethodFamily: CreditCard
                          paymentMethodType: visa
                          paymentType: credited
                      purchaseOrderNumber: "123456"
                      status: PastDue
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoices
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}":
    get:
      description: Get the invoice by name.
      operationId: Invoices_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Invoice"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Invoices
      x-ms-examples:
        Invoice:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceName: "{invoiceName}"
          responses:
            "200":
              body:
                id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}
                name: "{invoiceName}"
                properties:
                  amountDue:
                    currency: USD
                    value: 2000
                  billedAmount:
                    currency: USD
                    value: 2000
                  billingProfileDisplayName: Contoso Operations Billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                  documents:
                    - kind: Invoice
                      url: https://microsoft.com/invoice.pdf
                    - kind: Receipt
                      url: https://microsoft.com/taxDoc.pdf
                    - kind: CreditNote
                      url: https://microsoft.com/creditNote.pdf
                  dueDate: 2018-01-16T17:32:28Z
                  invoiceDate: 2018-01-01T17:32:28Z
                  invoicePeriodEndDate: 2018-01-15T17:32:28Z
                  invoicePeriodStartDate: 2018-01-01T17:32:28Z
                  payments:
                    - amount:
                        currency: USD
                        value: 2000
                      date: 2018-01-14T17:32:28Z
                      paymentMethodFamily: CreditCard
                      paymentMethodType: visa
                      paymentType: credited
                  purchaseOrderNumber: "123456"
                  status: Due
                type: Microsoft.Billing/billingAccounts/billingProfiles/invoices
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices/{invoiceName}/pricesheet/default/download":
    post:
      description: Download price sheet for an invoice.
      operationId: PriceSheet_Download
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/invoiceNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/DownloadUrl"
        "202":
          description: Accepted.
          headers:
            Location:
              description: GET this URL to retrieve the status of the asynchronous operation.
              type: string
            OData-EntityId:
              description: The operation entity Id GUID.
              type: string
            Retry-After:
              description: The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - PriceSheet
      x-ms-examples:
        PricesheetDownload:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            invoiceName: "{invoiceName}"
          responses:
            "200":
              body:
                expiryTime: 2018-07-21T17:32:28Z
                url: https://myaccount.blob.core.windows.net/?restype=service&comp=properties&sv=2015-04-05&ss=bf&srt=s&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&spr=https&sig=G%2TEST%4B
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/operationResults/45000000-0000-0000-0000-000000000000?api-version=2018-07-31
                OData-EntityId: 45000000-0000-0000-0000-000000000000
                Retry-After: "60"
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods":
    get:
      description: Lists the Payment Methods by billing profile Id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: PaymentMethods_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/PaymentMethodsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - PaymentMethods
      x-ms-examples:
        PaymentMethodsListByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods/00000000-0000-0000-0000-000000000055
                    name: 00000000-0000-0000-0000-000000000055
                    properties:
                      currency: USD
                      details: Credits
                      expiration: 4/2020
                      paymentMethodType: Credits
                    type: Microsoft.Billing/billingAccounts/billingProfiles/paymentMethods
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethods/00000000-0000-0000-0000-000000000026
                    name: 00000000-0000-0000-0000-000000000026
                    properties:
                      details: Check Wire
                      paymentMethodType: CheckWire
                    type: Microsoft.Billing/billingAccounts/billingProfiles/paymentMethods
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default":
    get:
      description: The policy for a given billing account name and billing profile name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Policies_GetByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Policy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Policies
      x-ms-examples:
        PolicyByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default
                name: default
                properties:
                  marketplacePurchases: AllAllowed
                  reservationPurchases: Allowed
                  viewCharges: Allowed
                type: Microsoft.Billing/billingAccounts/billingProfiles/policies
    put:
      description: The operation to update a policy.
      operationId: Policies_Update
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - description: Parameters supplied to the update policy operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Policy"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Policy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Policies
      x-ms-examples:
        UpdateBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            eTag: '"1d34d012214157f"'
            parameters:
              properties:
                marketplacePurchases: OnlyFreeAllowed
                reservationPurchases: NotAllowed
                viewCharges: Allowed
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default
                name: default
                properties:
                  marketplacePurchases: OnlyFreeAllowed
                  reservationPurchases: NotAllowed
                  viewCharges: Allowed
                type: Microsoft.Billing/billingAccounts/billingProfiles/policies
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/pricesheet/default/download":
    post:
      description: Download price sheet for a billing profile.
      operationId: PriceSheet_DownloadByBillingProfile
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/DownloadUrl"
        "202":
          description: Accepted.
          headers:
            Location:
              description: GET this URL to retrieve the status of the asynchronous operation.
              type: string
            OData-EntityId:
              description: The operation entity Id GUID.
              type: string
            Retry-After:
              description: The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - PriceSheet
      x-ms-examples:
        PricesheetDownloadByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
          responses:
            "200":
              body:
                expiryTime: 2018-07-21T17:32:28Z
                url: https://myaccount.blob.core.windows.net/?restype=service&comp=properties&sv=2015-04-05&ss=bf&srt=s&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&spr=https&sig=G%2TEST%4B
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/operationResults/45000000-0000-0000-0000-000000000000?api-version=2018-07-31
                OData-EntityId: 45000000-0000-0000-0000-000000000000
                Retry-After: "60"
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions":
    get:
      description: Lists the transactions by billing profile name for given start date and end date.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Transactions_ListByBillingProfile
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: Start date
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: End date
          in: query
          name: periodEndDate
          required: true
          type: string
        - description: May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TransactionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transactions
      x-ms-examples:
        ReservationTransactionsListByBillingProfile:
          parameters:
            $filter: properties/kind eq 'Reservation'
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      date: 2018-04-23T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: reservation
                      orderId: 6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c
                      orderName: Contoso Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 4
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/65000000-0000-0000-0000-000000000000
                    name: 65000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      date: 2018-05-05T00:00:00Z
                      invoice: Pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: reservation
                      orderId: 1c24006f-8350-4315-ad8f-6d11180448f9
                      orderName: Test Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 5
                      subscriptionId: 82000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 6000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
        TransactionsListByBillingProfile:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      date: 2018-05-01T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: all
                      productDescription: Standard D1, US West 3
                      productFamily: Storage
                      productType: VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/{billingProfileName}/transactions/51000000-0000-0000-0000-000000000000
                    name: 51000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
                      date: 2018-04-01T00:00:00Z
                      invoice: pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: all
                      productDescription: Standard Support
                      productFamily: Storage
                      productType: VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 50
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/{transactionName}":
    get:
      description: Get the transaction.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Transactions_Get
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingProfileNameParameter"
        - $ref: "#/parameters/transactionNameParameter"
        - description: Start date
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: End date
          in: query
          name: periodEndDate
          required: true
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Transaction"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transactions
      x-ms-examples:
        Transaction:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingProfileName: "{billingProfileName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
            transactionName: "{transactionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/{transactionName}
                name: "{transactionName}"
                properties:
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                  date: 2018-05-01T00:00:00Z
                  invoice: "2344233"
                  invoiceSectionDisplayName: Contoso operations invoiceSection
                  invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
                  kind: all
                  productDescription: Standard D1, US West 3
                  productFamily: Storage
                  productType: Reserved VM Instance
                  productTypeId: A12345
                  transactionAmount:
                    currency: USD
                    value: 5000
                  transactionType: Purchase
                type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments":
    get:
      description: Get the role assignments on the Billing Account
      operationId: BillingRoleAssignments_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingAccountRoleAssignmentList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    properties:
                      createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:58:19.9073876+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                      principalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}":
    delete:
      description: Delete the role assignment on this billing account
      operationId: BillingRoleAssignments_DeleteByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingAccountRoleAssignmentDelete:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingRoleAssignmentName: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                properties:
                  createdByPrincipalId: ""
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:34:12.2363515+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                type: Microsoft.Billing/roleAssignments
    get:
      description: Get the role assignment for the caller
      operationId: BillingRoleAssignments_GetByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingRoleAssignmentNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        BillingAccountRoleAssignment:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingRoleAssignmentName: "{billingRoleAssignmentId}"
          responses:
            "200":
              body:
                id: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                properties:
                  createdByPrincipalId: ""
                  createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                  createdOn: 2018-06-21T21:34:12.2363515+00:00
                  name: 10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  principalId: 6fd330f6-7d26-4aff-b9cf-7bd699f965b9
                  scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions":
    get:
      description: Lists the role definition for a billing account
      operationId: BillingRoleDefinitions_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinitionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        BillingAccountRoleDefinitionsList:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000
                    properties:
                      description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000000
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 20000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000000
                            - 40000000-aaaa-bbbb-cccc-200000000000
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: commerce_root_owner
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000001
                    name: 10000000-aaaa-bbbb-cccc-100000000001
                    properties:
                      description: The Contributor role give the user all permissions except access management rights to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000001
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000009
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: commerce_root_contributor
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000002
                    name: 10000000-aaaa-bbbb-cccc-100000000002
                    properties:
                      description: The Reader role gives the user read only access to the Commerce Root.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000008
                            - 10000000-aaaa-bbbb-cccc-200000000003
                            - 20000000-aaaa-bbbb-cccc-200000000002
                            - 30000000-aaaa-bbbb-cccc-200000000015
                            - 30000000-aaaa-bbbb-cccc-200000000004
                            - 30000000-aaaa-bbbb-cccc-200000000007
                            - 30000000-aaaa-bbbb-cccc-200000000001
                            - 30000000-aaaa-bbbb-cccc-200000000010
                            - 40000000-aaaa-bbbb-cccc-200000000007
                            - 40000000-aaaa-bbbb-cccc-200000000006
                            - 40000000-aaaa-bbbb-cccc-200000000008
                          notActions: []
                      roleName: commerce_root_reader
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000003
                    name: 10000000-aaaa-bbbb-cccc-100000000003
                    properties:
                      description: The Signatory role can sign agreements on behalf of the customer.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000002
                            - 10000000-aaaa-bbbb-cccc-200000000003
                          notActions: []
                      roleName: signatory
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000004
                    name: 10000000-aaaa-bbbb-cccc-100000000004
                    properties:
                      description: The Basic Purchaser role gives the user the ability to make purchases by creating new Projects and Billing Groups.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000006
                            - 10000000-aaaa-bbbb-cccc-200000000007
                          notActions: []
                      roleName: commerce_root_basic_purchaser
                    type: Microsoft.Billing/billingRoleDefinitions
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/10000000-aaaa-bbbb-cccc-100000000005
                    name: 10000000-aaaa-bbbb-cccc-100000000005
                    properties:
                      description: The Project Creator role gives the user the ability to create new Projects.
                      permissions:
                        - actions:
                            - 10000000-aaaa-bbbb-cccc-200000000006
                          notActions: []
                      roleName: project_creator
                    type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}":
    get:
      description: Gets the role definition for a role
      operationId: BillingRoleDefinitions_GetByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingRoleDefinitionNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingRoleDefinition"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleDefinitions
      x-ms-examples:
        BillingAccountRoleDefinition:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingRoleDefinitionName: "{billingRoleDefinitionName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{billingRoleDefinitionName}
                name: "{billingRoleDefinitionName}"
                properties:
                  description: The Owner role gives the user all permissions including access management rights to the Commerce Root.
                  permissions:
                    - actions:
                        - 10000000-aaaa-bbbb-cccc-200000000000
                        - 10000000-aaaa-bbbb-cccc-200000000008
                        - 10000000-aaaa-bbbb-cccc-200000000001
                        - 10000000-aaaa-bbbb-cccc-200000000002
                        - 10000000-aaaa-bbbb-cccc-200000000003
                        - 10000000-aaaa-bbbb-cccc-200000000006
                        - 10000000-aaaa-bbbb-cccc-200000000007
                        - 20000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000000
                        - 40000000-aaaa-bbbb-cccc-200000000000
                        - 30000000-aaaa-bbbb-cccc-200000000009
                        - 20000000-aaaa-bbbb-cccc-200000000002
                        - 30000000-aaaa-bbbb-cccc-200000000015
                        - 30000000-aaaa-bbbb-cccc-200000000004
                        - 30000000-aaaa-bbbb-cccc-200000000007
                        - 30000000-aaaa-bbbb-cccc-200000000001
                        - 30000000-aaaa-bbbb-cccc-200000000010
                        - 40000000-aaaa-bbbb-cccc-200000000007
                        - 40000000-aaaa-bbbb-cccc-200000000006
                        - 40000000-aaaa-bbbb-cccc-200000000008
                      notActions: []
                  roleName: commerce_root_owner
                type: Microsoft.Billing/billingRoleDefinitions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions":
    get:
      description: Lists billing subscriptions by billing account name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: BillingSubscriptions_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscriptionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscriptionsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/90000000-0000-0000-0000-000000000000
                    name: 90000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: My subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 5000
                      monthToDateCharges:
                        currency: USD
                        value: 600
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/90000000-0000-0000-0000-000000000001
                    name: 90000000-0000-0000-0000-000000000001
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Test subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 1000
                      monthToDateCharges:
                        currency: USD
                        value: 400
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-6b96d3f2
                    type: Microsoft.Billing/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000/billingSubscriptions/90000000-0000-0000-0000-000000000002
                    name: 90000000-0000-0000-0000-000000000002
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Dev Subscription
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastMonthCharges:
                        currency: USD
                        value: 6000
                      monthToDateCharges:
                        currency: USD
                        value: 900
                      skuDescription: Microsoft Azure Dev/Test
                      skuId: "0001"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-4a9d-9008-912f-f87744185aa3
                    type: Microsoft.Billing/billingSubscriptions
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices":
    get:
      description: Lists invoices by billing subscriptions name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Invoices_ListByBillingSubscription
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - description: Invoice period start date.
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: Invoice period end date.
          in: query
          name: periodEndDate
          required: true
          type: string
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Invoices
      x-ms-examples:
        BillingSubscriptionsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            periodEndDate: 2018-06-30
            periodStartDate: 2018-01-01
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000/invoices/1383723
                    name: "1383723"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      dueDate: 2018-01-16T17:32:28Z
                      invoiceDate: 2018-01-01T17:32:28Z
                      invoicePeriodEndDate: 2018-01-15T17:32:28Z
                      invoicePeriodStartDate: 2018-01-01T17:32:28Z
                      invoiceType: AzureServices
                      purchaseOrderNumber: "123456"
                      status: Due
                    type: Microsoft.Billing/billingAccounts/billingSubscriptions/invoices
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000/invoices/1383724
                    name: "1383724"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      billedAmount:
                        currency: USD
                        value: 2000
                      billingProfileDisplayName: Contoso Operations Billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000
                      documents:
                        - kind: Invoice
                          url: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000/invoices/1383724/download
                      dueDate: 2018-03-01T17:32:28Z
                      invoiceDate: 2018-02-01T17:32:28Z
                      invoicePeriodEndDate: 2018-02-30T17:32:28Z
                      invoicePeriodStartDate: 2018-02-01T17:32:28Z
                      invoiceType: AzureMarketplace
                      payments:
                        - amount:
                            currency: USD
                            value: 2000
                          date: 2018-01-14T17:32:28Z
                          paymentMethodFamily: CreditCard
                          paymentMethodType: visa
                          paymentType: credited
                      purchaseOrderNumber: "123456"
                      status: PastDue
                    type: Microsoft.Billing/billingAccounts/billingSubscriptions/invoices
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/invoices/{invoiceName}":
    get:
      description: Gets the invoice by name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Invoices_GetById
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - $ref: "#/parameters/invoiceNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Invoice"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Invoices
      x-ms-examples:
        BillingSubscriptionsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            invoiceName: "{invoiceName}"
          responses:
            "200":
              body:
                id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000/invoices/1383724
                name: "1383724"
                properties:
                  amountDue:
                    currency: USD
                    value: 2000
                  billedAmount:
                    currency: USD
                    value: 2000
                  billingProfileDisplayName: Contoso Operations Billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000
                  documents:
                    - kind: Invoice
                      url: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/11000000-0000-0000-0000-000000000000/invoices/1383724/download
                  dueDate: 2018-03-01T17:32:28Z
                  invoiceDate: 2018-02-01T17:32:28Z
                  invoicePeriodEndDate: 2018-02-30T17:32:28Z
                  invoicePeriodStartDate: 2018-02-01T17:32:28Z
                  invoiceType: AzureMarketplace
                  payments:
                    - amount:
                        currency: USD
                        value: 2000
                      date: 2018-01-14T17:32:28Z
                      paymentMethodFamily: CreditCard
                      paymentMethodType: visa
                      paymentType: credited
                  purchaseOrderNumber: "123456"
                  status: PastDue
                type: Microsoft.Billing/billingAccounts/billingSubscriptions/invoices
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment":
    post:
      description: The operation to add a role assignment to a billing account.
      operationId: BillingRoleAssignments_AddByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: Parameters supplied to add a role assignment.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/BillingRoleAssignmentPayload"
      responses:
        "201":
          description: Role assignment is successfully created
          schema:
            $ref: "#/definitions/BillingRoleAssignmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingRoleAssignments
      x-ms-examples:
        AddRoleAssignmentToBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            parameters:
              billingRoleDefinitionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.Billing/billingRoleDefinition/10000000-aaaa-bbbb-cccc-100000000000
              principalId: 00000000-0000-0000-0000-000000000000
          responses:
            "201":
              body:
                value:
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                    properties:
                      createdByPrincipalId: ""
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:34:12.2363515+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_00000000-0000-0000-0000-000000000000
                      principalId: 00000000-0000-0000-0000-000000000000
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                    properties:
                      createdByPrincipalId: 46b831ec-42b2-4f1a-8b54-3fd5ff9d6aa1
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-21T21:58:19.9073876+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47
                      principalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-06-22T06:03:51.430844+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000002_129db794-64a5-44e0-9838-002780478959
                      principalId: 129db794-64a5-44e0-9838-002780478959
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-06T05:52:57.1463874+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000001_d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      principalId: d7b03fbc-ecd9-49b8-8e38-285b75eaa8f7
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
                  - id: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                    properties:
                      createdByPrincipalId: b1839933-b3ac-42ca-8112-d29c43f3ab47
                      createdByPrincipalTenantId: 7ca289b9-c32d-4f01-8566-7ff93261d76f
                      createdOn: 2018-07-10T22:04:33.8309285+00:00
                      name: 10000000-aaaa-bbbb-cccc-100000000000_c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      principalId: c4f54fd2-d920-4c49-9b4d-9f09387b881c
                      scope: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}
                    type: Microsoft.Billing/billingRoleAssignments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers":
    get:
      description: Lists customers which the current user can work with on-behalf of a partner.
      operationId: Customers_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to filter the list of customers.
          in: query
          name: $filter
          required: false
          type: string
        - description: Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
          in: query
          name: $skiptoken
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/CustomerListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Customers
      x-ms-examples:
        CustomersListByBillingAccount:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000000
                    name: 22000000-0000-0000-0000-000000000000
                    properties:
                      displayName: customer1
                    type: Microsoft.Billing/customers
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/22000000-0000-0000-0000-000000000011
                    name: 22000000-0000-0000-0000-000000000011
                    properties:
                      displayName: customer2
                    type: Microsoft.Billing/customers
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}":
    get:
      description: Gets a customer by its id.
      operationId: Customers_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - description: May be used to expand enabledAzurePlans, resellers.
          in: query
          name: $expand
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Customer"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Customers
      x-ms-examples:
        Customer:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                name: "{customerName}"
                properties:
                  displayName: customer1
                type: Microsoft.Billing/customers
        CustomerWithExpand:
          parameters:
            $expand: enabledAzurePlans,resellers
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                name: "{customerName}"
                properties:
                  displayName: customerName1
                  enabledAzurePlans:
                    - skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                  resellers:
                    - description: Reseller1
                      resellerId: 89e87bdf-a2a2-4687-925f-4c18b27bccfd
                    - description: Reseller2
                      resellerId: 3b65b5a8-bd4f-4084-90e9-e1bd667a2b19
                type: Microsoft.Billing/customers
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions":
    get:
      description: Lists all billing permissions the caller has for a customer.
      operationId: BillingPermissions_ListByCustomer
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingPermissionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingPermissions
      x-ms-examples:
        BillingProfilePermissionsList:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                value:
                  - actions:
                      - 30000000-aaaa-bbbb-cccc-200000000007
                      - 30000000-aaaa-bbbb-cccc-200000000004
                      - 30000000-aaaa-bbbb-cccc-200000000015
                      - 30000000-aaaa-bbbb-cccc-200000000009
                      - 30000000-aaaa-bbbb-cccc-200000000000
                      - 30000000-aaaa-bbbb-cccc-200000000010
                      - 30000000-aaaa-bbbb-cccc-200000000001
                    notActions: []
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions":
    get:
      description: Lists billing subscription by customer id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: BillingSubscriptions_ListByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscriptionsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscriptionsListByCustomer:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId1
                    name: billingSubscriptionId1
                    properties:
                      customerDisplayName: Customer1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      displayName: My subscription
                      lastMonthCharges:
                        currency: USD
                        value: 5000
                      monthToDateCharges:
                        currency: USD
                        value: 600
                      reseller:
                        description: Reseller1
                        resellerId: 89e87bdf-a2a2-4687-925f-4c18b27bccfd
                      skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                    type: Microsoft.Billing/billingSubscriptions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/billinSubscriptionId2
                    name: billingSubscriptionId2
                    properties:
                      customerDisplayName: Customer1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      displayName: Test subscription
                      lastMonthCharges:
                        currency: USD
                        value: 1000
                      monthToDateCharges:
                        currency: USD
                        value: 400
                      reseller:
                        description: Reseller3
                        resellerId: 3b65b5a8-bd4f-4084-90e9-e1bd667a2b19
                      skuDescription: Microsoft Azure Standard
                      skuId: "0002"
                      subscriptionBillingStatus: Active
                      subscriptionId: 6b96d3f2-9008-4a9d-912f-6b96d3f2
                    type: Microsoft.Billing/billingSubscriptions
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}":
    get:
      description: Get a single billing subscription by id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: BillingSubscriptions_GetByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/billingSubscriptionNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingSubscription"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingSubscriptions
      x-ms-examples:
        BillingSubscriptionByCustomer:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            billingSubscriptionName: "{billingSubscriptionName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions/{billingSubscriptionName}
                name: "{billingSubscriptionName}"
                properties:
                  customerDisplayName: Customer1
                  customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                  displayName: My Subscription
                  lastMonthCharges:
                    currency: USD
                    value: 5000
                  monthToDateCharges:
                    currency: USD
                    value: 600
                  reseller:
                    description: Reseller2
                    resellerId: 3b65b5a8-bd4f-4084-90e9-e1bd667a2b19
                  skuDescription: Microsoft Azure Standard
                  skuId: "0002"
                  subscriptionBillingStatus: Active
                  subscriptionId: 6b96d3f2-9008-4a9d-912f-f87744185aa3
                type: Microsoft.Billing/billingSubscriptions
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default":
    get:
      description: The policy for a given billing account name and customer name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Policies_GetByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/CustomerPolicy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Policies
      x-ms-examples:
        PolicyByCustomer:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default
                name: default
                properties:
                  viewCharges: Allowed
                type: Microsoft.Billing/billingAccounts/customers/policies
    put:
      description: The operation to update a Customer policy.
      operationId: Policies_UpdateCustomer
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - description: Parameters supplied to the update customer policy operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/CustomerPolicy"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/CustomerPolicy"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Policies
      x-ms-examples:
        UpdateCustomer:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
            eTag: '"1d34d012214127f"'
            parameters:
              properties:
                viewCharges: NotAllowed
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default
                name: default
                properties:
                  viewCharges: NotAllowed
                type: Microsoft.Billing/billingAccounts/customers/policies
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products":
    get:
      description: Lists products by customer id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Products_ListByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ProductsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        ProductsListByInvoiceSection:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/00000000-0000-0000-0000-000000000000
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: OneTime
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      customerDisplayName: Customer 1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      displayName: Eng Reservation (1a13s21awe)
                      lastCharge:
                        currency: USD
                        value: 5000
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Reservation
                      productTypeId: A12345
                      purchaseDate: 2018-05-01T17:32:28Z
                      quantity: 4
                      reseller:
                        description: Reseller1
                        resellerId: 2c917292-b7bc-42f2-99a2-e498b9087c06
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/customers/products
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/10000000-0000-0000-0000-000000000001
                    name: 10000000-0000-0000-0000-000000000001
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: Monthly
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      customerDisplayName: Customer 1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      displayName: Engineering Email
                      lastCharge:
                        currency: USD
                        value: 500
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Azure subscription
                      productTypeId: A12345
                      purchaseDate: 2018-04-01T17:32:28Z
                      quantity: 4
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/customers/products
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}":
    get:
      description: Get a customer's product by name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Products_GetByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/productNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Product"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        Product:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
            productName: "{productName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/products/{productName}
                name: "{productName}"
                properties:
                  availabilityId: AvailabilityId1
                  billingFrequency: Monthly
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                  customerDisplayName: Customer 1
                  customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                  displayName: AIP Dev
                  lastCharge:
                    currency: USD
                    value: 5000
                  lastChargeDate: 2018-06-15T17:32:28Z
                  parentProductId: 45000000-0000-0000-0000-0000000001242
                  productType: Subscription
                  productTypeId: A12345
                  purchaseDate: 2018-05-01T17:32:28Z
                  quantity: 4
                  reseller:
                    description: Reseller2
                    resellerId: 3b65b5a8-bd4f-4084-90e9-e1bd667a2b19
                  skuDescription: Enterprise Agreement Development
                  skuId: "0001"
                  status: Active
                type: Microsoft.Billing/billingAccounts/customers/products
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/transactions":
    get:
      description: Lists the transactions by customer id for given start date and end date.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/consumption/
      operationId: Transactions_ListByCustomer
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/customerNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: Start date
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: End date
          in: query
          name: periodEndDate
          required: true
          type: string
        - description: May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TransactionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transactions
      x-ms-examples:
        ReservationTransactionsListByCustomer:
          parameters:
            $filter: properties/kind eq 'Reservation'
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      customerDisplayName: Customer 1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      date: 2018-04-23T00:00:00Z
                      invoice: "2344233"
                      kind: reservation
                      orderId: 6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c
                      orderName: Contoso Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 4
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions/82000000-0000-0000-0000-000000000000
                    name: 82000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      customerDisplayName: Customer 1
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      date: 2018-05-05T00:00:00Z
                      invoice: Pending
                      kind: reservation
                      orderId: 1c24006f-8350-4315-ad8f-6d11180448f9
                      orderName: Test Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 5
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 6000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
        TransactionsListByCustomer:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
            customerName: "{customerName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      customerDisplayName: Contoso operations customer
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      date: 2018-05-01T00:00:00Z
                      invoice: "2344233"
                      kind: all
                      productDescription: Standard D1, US West 3
                      productFamily: Storage
                      productType: Reserved VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Purchase
                    type: Microsoft.Billing/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/customers/{customerName}/transactions/51000000-0000-0000-0000-000000000000
                    name: 51000000-0000-0000-0000-000000000000
                    properties:
                      customerDisplayName: Contoso operations customer
                      customerId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}
                      date: 2018-04-01T00:00:00Z
                      invoice: pending
                      kind: all
                      productDescription: Standard Support
                      productFamily: Storage
                      productType: VM Instance
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 50
                      transactionType: Cancel
                    type: Microsoft.Billing/transactions
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments":
    get:
      description: Lists all departments for a user which he has access to.
      operationId: Departments_ListByBillingAccountName
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to expand the enrollmentAccounts.
          in: query
          name: $expand
          required: false
          type: string
        - description: The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/DepartmentListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Departments
      x-ms-examples:
        DepartmentsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                nextLink: Link to next page
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                    name: departmentId1
                    properties:
                      costCenter: C1
                      departmentName: departmentName1
                      status: Active
                    type: Microsoft.Billing/departments
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId2
                    name: departmentId2
                    properties:
                      costCenter: C4
                      departmentName: departmentName2
                      status: Active
                    type: Microsoft.Billing/departments
        DepartmentsListByBillingAccountWithExpand:
          parameters:
            $expand: properties/enrollmentAccounts
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                nextLink: Link to next page
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                    name: departmentId1
                    properties:
                      costCenter: C1
                      departmentName: departmentName1
                      enrollmentAccounts:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0
                          name: accountId0
                          properties:
                            accountName: AccountName0
                            costCenter: C0
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1
                          name: accountId1
                          properties:
                            accountName: AccountName1
                            costCenter: C4
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                      status: Active
                    type: Microsoft.Billing/departments
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId2
                    name: departmentId2
                    properties:
                      costCenter: C4
                      departmentName: departmentName2
                      enrollmentAccounts:
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2
                          name: accountId2
                          properties:
                            accountName: AccountName2
                            costCenter: C4
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                        - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId5
                          name: accountId5
                          properties:
                            accountName: AccountName5
                            costCenter: C4
                            endDate: 2019-05-31T17:32:28Z
                            startDate: 2018-05-01T17:32:28Z
                            status: Active
                          type: Microsoft.Billing/enrollmentAccounts
                      status: Active
                    type: Microsoft.Billing/departments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}":
    get:
      description: Get the department by id.
      operationId: Departments_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/departmentNameParameter"
        - description: May be used to expand the enrollmentAccounts.
          in: query
          name: $expand
          required: false
          type: string
        - description: The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/Department"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Departments
      x-ms-examples:
        Department:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            departmentName: "{departmentName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}
                name: "{departmentName}"
                properties:
                  costCenter: C1
                  departmentName: Test department
                  status: Active
                type: Microsoft.Billing/departments
        DepartmentWithExpand:
          parameters:
            $expand: properties/enrollmentAccounts
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            departmentName: "{departmentName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}
                name: "{departmentName}"
                properties:
                  costCenter: C1
                  departmentName: departmentName1
                  enrollmentAccounts:
                    - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0
                      name: accountId0
                      properties:
                        accountName: AccountName0
                        costCenter: C0
                        endDate: 2019-05-31T17:32:28Z
                        startDate: 2018-05-01T17:32:28Z
                        status: Active
                      type: Microsoft.Billing/enrollmentAccounts
                    - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1
                      name: accountId1
                      properties:
                        accountName: AccountName1
                        costCenter: C4
                        endDate: 2019-05-31T17:32:28Z
                        startDate: 2018-05-01T17:32:28Z
                        status: Active
                      type: Microsoft.Billing/enrollmentAccounts
                  status: Active
                type: Microsoft.Billing/departments
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts":
    get:
      description: Lists all Enrollment Accounts for a user which he has access to.
      operationId: EnrollmentAccounts_ListByBillingAccountName
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: May be used to expand the department.
          in: query
          name: $expand
          required: false
          type: string
        - description: The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/EnrollmentAccountListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - EnrollmentAccounts
      x-ms-examples:
        EnrollmentAccountsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                nextLink: Link to next page
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0
                    name: accountId0
                    properties:
                      accountName: AccountName0
                      costCenter: C0
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1
                    name: accountId1
                    properties:
                      accountName: AccountName1
                      costCenter: C4
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2
                    name: accountId2
                    properties:
                      accountName: AccountName2
                      costCenter: C4
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
        EnrollmentAccountsListByBillingAccountWithExpand:
          parameters:
            $expand: properties/department
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                nextLink: Link to next page
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId0
                    name: accountId0
                    properties:
                      accountName: AccountName0
                      costCenter: C0
                      department:
                        id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                        name: departmentId1
                        properties:
                          costCenter: C1
                          departmentName: departmentName1
                          status: Active
                        type: Microsoft.Billing/departments
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId1
                    name: accountId1
                    properties:
                      accountName: AccountName1
                      costCenter: C4
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/accountId2
                    name: accountId2
                    properties:
                      accountName: AccountName2
                      costCenter: C4
                      department:
                        id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                        name: departmentId1
                        properties:
                          costCenter: C1
                          departmentName: departmentName1
                          status: Active
                        type: Microsoft.Billing/departments
                      endDate: 2019-05-31T17:32:28Z
                      startDate: 2018-05-01T17:32:28Z
                      status: Active
                    type: Microsoft.Billing/enrollmentAccounts
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}":
    get:
      description: Get the enrollment account by id.
      operationId: EnrollmentAccounts_GetByEnrollmentAccountId
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/enrollmentAccountNameParameter"
        - description: May be used to expand the Department.
          in: query
          name: $expand
          required: false
          type: string
        - description: The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/EnrollmentAccount"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - EnrollmentAccounts
      x-ms-examples:
        EnrollmentAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            enrollmentAccountName: "{enrollmentAccountName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
                name: "{enrollmentAccountName}"
                properties:
                  accountName: AccountName0
                  costCenter: C0
                  endDate: 2019-05-31T17:32:28Z
                  startDate: 2018-05-01T17:32:28Z
                  status: Active
                type: Microsoft.Billing/enrollmentAccounts
        EnrollmentAccountWithExpand:
          parameters:
            $expand: properties/department
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            enrollmentAccountName: "{enrollmentAccountName}"
          responses:
            "200":
              body:
                id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
                name: "{enrollmentAccountName}"
                properties:
                  accountName: AccountName0
                  costCenter: C0
                  department:
                    id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/departmentId1
                    name: departmentId1
                    properties:
                      costCenter: C1
                      departmentName: departmentName1
                      status: Active
                    type: Microsoft.Billing/departments
                  endDate: 2019-05-31T17:32:28Z
                  startDate: 2018-05-01T17:32:28Z
                  status: Active
                type: Microsoft.Billing/enrollmentAccounts
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices":
    get:
      description: List of invoices for a billing account.
      operationId: Invoices_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
        - description: Invoice period start date.
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: Invoice period end date.
          in: query
          name: periodEndDate
          required: true
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Invoices
      x-ms-examples:
        BillingAccountInvoicesList:
          parameters:
            $filter: invoicePeriodStartDate le 2018-06-01
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            periodEndDate: 2018-06-30
            periodStartDate: 2018-01-01
          responses:
            "200":
              body:
                value:
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoices/1383723
                    name: "1383723"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      billedAmount:
                        currency: USD
                        value: 2000
                      billingProfileDisplayName: Contoso Operations Billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      documents:
                        - kind: Invoice
                          url: https://microsoft.com/invoice.pdf
                      dueDate: 2018-01-16T17:32:28Z
                      invoiceDate: 2018-01-01T17:32:28Z
                      invoicePeriodEndDate: 2018-01-15T17:32:28Z
                      invoicePeriodStartDate: 2018-01-01T17:32:28Z
                      payments:
                        - amount:
                            currency: USD
                            value: 2000
                          date: 2018-01-14T17:32:28Z
                          paymentMethodFamily: CreditCard
                          paymentMethodType: visa
                          paymentType: credited
                      purchaseOrderNumber: "123456"
                      status: Due
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoices
                  - id: providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoices/1383724
                    name: "1383724"
                    properties:
                      amountDue:
                        currency: USD
                        value: 2000
                      billedAmount:
                        currency: USD
                        value: 2000
                      billingProfileDisplayName: Contoso Operations Billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      documents:
                        - kind: VoidNote
                          url: https://microsoft.com/voidNote.pdf
                      dueDate: 2018-03-01T17:32:28Z
                      invoiceDate: 2018-02-01T17:32:28Z
                      invoicePeriodEndDate: 2018-02-30T17:32:28Z
                      invoicePeriodStartDate: 2018-02-01T17:32:28Z
                      payments:
                        - amount:
                            currency: USD
                            value: 2000
                          date: 2018-01-14T17:32:28Z
                          paymentMethodFamily: CreditCard
                          paymentMethodType: visa
                          paymentType: credited
                      purchaseOrderNumber: "123456"
                      status: PastDue
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoices
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission":
    post:
      description: Lists all invoice sections with create subscription permission for a user.
      operationId: BillingAccounts_ListInvoiceSectionsByCreateSubscriptionPermission
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/billingAccountNameParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/InvoiceSectionListWithCreateSubPermissionResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingAccounts
      x-ms-examples:
        InvoiceSectionsListWithCreateSubPermission:
          parameters:
            api-version: 2018-11-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - billingProfileDisplayName: Contoso operations billing
                    billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                    enabledAzurePlans:
                      - skuDescription: Microsoft Azure Plan
                        skuId: "0001"
                      - skuDescription: Microsoft Azure Plan for DevTest
                        skuId: "0002"
                    invoiceSectionDisplayName: invoiceSection1
                    invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods":
    get:
      description: Lists the Payment Methods by billing account Id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/2019-10-01-preview/paymentmethods
      operationId: PaymentMethods_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/PaymentMethodsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - PaymentMethods
      x-ms-examples:
        PaymentMethodsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/00000000-0000-0000-0000-000000000011/paymentMethods/00000000-0000-0000-0000-000000000055
                    name: 00000000-0000-0000-0000-000000000055
                    properties:
                      currency: USD
                      details: Credits
                      expiration: 4/2020
                      paymentMethodType: Credits
                    type: Microsoft.Billing/billingAccounts/billingProfiles/paymentMethods
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/00000000-0000-0000-0000-000000000022/paymentMethods/00000000-0000-0000-0000-000000000026
                    name: 00000000-0000-0000-0000-000000000026
                    properties:
                      details: Check Wire
                      paymentMethodType: CheckWire
                    type: Microsoft.Billing/billingAccounts/billingProfiles/paymentMethods
                  - id: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/00000000-0000-0000-0000-000000000011/paymentMethods/00000000-0000-0000-0000-000000000026
                    name: 00000000-0000-0000-0000-000000000026
                    properties:
                      details: Check Wire
                      paymentMethodType: CheckWire
                    type: Microsoft.Billing/billingAccounts/billingProfiles/paymentMethods
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products":
    get:
      description: Lists products by billing account name.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Products_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: May be used to filter by product type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ProductsListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Products
      x-ms-examples:
        ProductsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/00000000-0000-0000-0000-000000000000
                    name: 00000000-0000-0000-0000-000000000000
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: OneTime
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Eng Reservation (1a13s21awe)
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastCharge:
                        currency: USD
                        value: 5000
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Reservation
                      productTypeId: A12345
                      purchaseDate: 2018-05-01T17:32:28Z
                      quantity: 4
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/products
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products/10000000-0000-0000-0000-000000000001
                    name: 10000000-0000-0000-0000-000000000001
                    properties:
                      availabilityId: AvailabilityId1
                      billingFrequency: Monthly
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      displayName: Engineering Email
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000
                      lastCharge:
                        currency: USD
                        value: 5000
                      lastChargeDate: 2018-06-15T17:32:28Z
                      parentProductId: 45000000-0000-0000-0000-0000000001242
                      productType: Azure subscription
                      productTypeId: A12345
                      purchaseDate: 2018-04-01T17:32:28Z
                      quantity: 4
                      skuDescription: Enterprise Agreement Development
                      skuId: "0001"
                      status: Active
                    type: Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/products
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions":
    get:
      description: Lists the transactions by billing account name for given start and end date.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: Transactions_ListByBillingAccount
      parameters:
        - $ref: "#/parameters/billingAccountNameParameter"
        - $ref: "#/parameters/apiVersionParameter"
        - description: Start date
          in: query
          name: periodStartDate
          required: true
          type: string
        - description: End date
          in: query
          name: periodEndDate
          required: true
          type: string
        - description: May be used to filter by transaction kind. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).
          in: query
          name: $filter
          required: false
          type: string
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/TransactionListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Transactions
      x-ms-examples:
        ReservationTransactionsListByBillingAccount:
          parameters:
            $filter: properties/kind eq 'Reservation'
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-04-23T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: reservation
                      orderId: 6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c
                      orderName: Contoso Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 4
                      subscriptionId: 7800000000-0000-0000-0000-0000000000009456
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Cancel
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/21000000-0000-0000-0000-000000000000
                    name: 21000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-05-05T00:00:00Z
                      invoice: Pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: reservation
                      orderId: 1c24006f-8350-4315-ad8f-6d11180448f9
                      orderName: Test Reserved
                      productDescription: Standard D1, US West 3
                      quantity: 5
                      subscriptionId: 00000000-0000-0000-0000-000000000000
                      subscriptionName: Contoso operations billing
                      transactionAmount:
                        currency: USD
                        value: 6000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
        TransactionsListByBillingAccount:
          parameters:
            api-version: 2019-10-01-preview
            billingAccountName: "{billingAccountName}"
            periodEndDate: 2018-05-30
            periodStartDate: 2018-04-01
          responses:
            "200":
              body:
                value:
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/41000000-0000-0000-0000-000000000000
                    name: 41000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-05-01T00:00:00Z
                      invoice: "2344233"
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: all
                      productDescription: Standard D1, US West 3
                      productFamily: Storage
                      productType: Dev Support
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 5000
                      transactionType: Purchase
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
                  - id: /providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/51000000-0000-0000-0000-000000000000
                    name: 51000000-0000-0000-0000-000000000000
                    properties:
                      billingProfileDisplayName: Contoso operations billing
                      billingProfileId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000
                      date: 2018-04-01T00:00:00Z
                      invoice: pending
                      invoiceSectionDisplayName: Contoso operations invoiceSection
                      invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
                      kind: all
                      productDescription: Send grid Gold
                      productFamily: Storage
                      productType: Azure subscription
                      productTypeId: A12345
                      transactionAmount:
                        currency: USD
                        value: 50
                      transactionType: Usage Charge
                    type: Microsoft.Billing/billingAccounts/billingProfiles/transactions
      x-ms-pageable:
        nextLinkName: nextLink
  /providers/Microsoft.Billing/operations:
    get:
      description: Lists all of the available billing REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Operations
      x-ms-pageable:
        nextLinkName: nextLink
  /providers/Microsoft.Billing/transfers:
    get:
      operationId: RecipientTransfers_List
      responses:
        "200":
          description: List of transfers received by caller.
          schema:
            $ref: "#/definitions/RecipientTransferDetailsListResult"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Lists the transfers received by caller.
      tags:
        - RecipientTransfers
      x-ms-examples:
        RecipientTransfersList:
          parameters:
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                value:
                  - properties:
                      creationTime: 2018-10-10T17:32:28Z
                      detailedTransferStatus:
                        - productId: subscriptionId
                          productType: AzureSubscription
                          transferStatus: InProgress
                        - productId: reservedInstanceId
                          productType: ReservedInstance
                          transferStatus: InProgress
                      expirationTime: 2018-11-05T17:32:28Z
                      initiatorEmailId: xyz@contoso.com
                      lastModifiedTime: 2018-10-10T17:32:28Z
                      recipientEmailId: user@contoso.com
                      transferStatus: InProgress
      x-ms-pageable:
        nextLinkName: nextLink
  "/providers/Microsoft.Billing/transfers/{transferName}":
    get:
      operationId: RecipientTransfers_Get
      parameters:
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of the transfers with given Id.
          schema:
            $ref: "#/definitions/RecipientTransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Gets the transfer with given transfer Id.
      tags:
        - RecipientTransfers
      x-ms-examples:
        RecipientTransferGet:
          parameters:
            api-version: 2019-10-01-preview
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  creationTime: 2018-10-10T17:32:28Z
                  detailedTransferStatus:
                    - productId: subscriptionId
                      productType: AzureSubscription
                      transferStatus: InProgress
                    - productId: reservedInstanceId
                      productType: AzureReservation
                      transferStatus: InProgress
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: InProgress
  "/providers/Microsoft.Billing/transfers/{transferName}/acceptTransfer":
    post:
      operationId: RecipientTransfers_Accept
      parameters:
        - $ref: "#/parameters/transferNameParameter"
        - description: Parameters supplied to accept the transfer.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/AcceptTransferRequest"
      responses:
        "200":
          description: Details of the accepted transfer.
          schema:
            $ref: "#/definitions/RecipientTransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Accepts the transfer with given transfer Id.
      tags:
        - RecipientTransfers
      x-ms-examples:
        AcceptTransfer:
          parameters:
            api-version: 2019-10-01-preview
            parameters:
              properties:
                productDetails:
                  - productId: subscriptionId
                    productType: AzureSubscription
                  - productId: reservedInstanceId
                    productType: AzureReservation
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  creationTime: 2018-10-10T17:32:28Z
                  detailedTransferStatus:
                    - productId: subscriptionId
                      productType: AzureSubscription
                      transferStatus: InProgress
                    - productId: reservedInstanceId
                      productType: AzureReservation
                      transferStatus: InProgress
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: InProgress
  "/providers/Microsoft.Billing/transfers/{transferName}/declineTransfer":
    post:
      operationId: RecipientTransfers_Decline
      parameters:
        - $ref: "#/parameters/transferNameParameter"
      responses:
        "200":
          description: Details of the declined transfer.
          schema:
            $ref: "#/definitions/RecipientTransferDetails"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Declines the transfer with given transfer Id.
      tags:
        - RecipientTransfers
      x-ms-examples:
        DeclineTransfer:
          parameters:
            api-version: 2019-10-01-preview
            transferName: transferName
          responses:
            "200":
              body:
                properties:
                  creationTime: 2018-10-10T17:32:28Z
                  expirationTime: 2018-11-05T17:32:28Z
                  initiatorEmailId: xyz@contoso.com
                  lastModifiedTime: 2018-10-10T17:32:28Z
                  recipientEmailId: user@contoso.com
                  transferStatus: Declined
  "/providers/Microsoft.Billing/transfers/{transferName}/validateTransfer":
    post:
      operationId: RecipientTransfers_Validate
      parameters:
        - $ref: "#/parameters/transferNameParameter"
        - description: Parameters supplied to validate the transfer.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/AcceptTransferRequest"
      responses:
        "200":
          description: Results of the transfer validation.
          schema:
            $ref: "#/definitions/ValidateTransferListResponse"
        default:
          description: Unexpected error.
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Validates if the products can be transferred in the context of the given transfer name.
      tags:
        - RecipientTransfers
      x-ms-examples:
        ValidateTransfer:
          parameters:
            api-version: 2019-10-01-preview
            parameters:
              properties:
                productDetails:
                  - productId: subscriptionId
                    productType: AzureSubscription
                  - productId: reservedInstanceId
                    productType: AzureReservation
            transferName: transferName
          responses:
            "200":
              body:
                value:
                  - properties:
                      productId: subscriptionId
                      results:
                        - code: NotIntendedRecipient
                          level: Error
                          message: Intented recipient is different.
                      status: Failed
  /providers/Microsoft.Billing/validateAddress:
    post:
      description: Validates the address.
      operationId: Address_Validate
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - in: body
          name: address
          required: true
          schema:
            $ref: "#/definitions/AddressDetails"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/ValidateAddressResponse"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - Address
      x-ms-examples:
        AddressInvalid:
          parameters:
            address:
              addressLine1: 55 110th Ave NE
              city: bellevue
              country: us
              postalCode: "98004"
              region: wa
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                status: Invalid
                suggestedAddresses:
                  - addressLine1: 100 110th Ave NE
                    city: Bellevue
                    country: US
                    postalCode: "98004"
                    region: WA
                  - addressLine1: 102 110th Ave NE
                    city: Bellevue
                    country: US
                    postalCode: 98004-5804
                    region: WA
                  - addressLine1: 104 110th Ave NE
                    city: Bellevue
                    country: US
                    postalCode: 98004-5804
                    region: WA
                validationMessage: Invalid address
        AddressValid:
          parameters:
            address:
              addressLine1: 555 110th Ave NE
              city: bellevue
              country: us
              postalCode: "98004"
              region: wa
            api-version: 2019-10-01-preview
          responses:
            "200":
              body:
                status: Valid
                suggestedAddresses:
                  - addressLine1: 555 110th Ave NE
                    city: Bellevue
                    country: US
                    postalCode: 98004-5124
                    region: WA
  "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default":
    get:
      description: Get the current line of credit.
      operationId: LineOfCredits_Get
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/LineOfCredit"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - LineOfCredits
      x-ms-examples:
        LineOfCreditBySubscription:
          parameters:
            api-version: 2019-10-01-preview
            subscriptionId: "{subscriptionId}"
          responses:
            "200":
              body:
                id: /subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default
                name: default
                properties:
                  creditLimit:
                    currency: USD
                    value: 20000
                  reason: null
                  remainingBalance:
                    currency: USD
                    value: 6000
                  status: Approved
                type: Microsoft.Billing/lineOfCredit
    put:
      description: Increase the current line of credit.
      operationId: LineOfCredits_Update
      parameters:
        - $ref: "#/parameters/apiVersionParameter"
        - $ref: "#/parameters/subscriptionIdParameter"
        - description: Parameters supplied to the increase line of credit operation.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/LineOfCredit"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/LineOfCredit"
        "202":
          description: Accepted. Line of credit increase is in progress.
          headers:
            Location:
              description: Location URI to poll for result.
              type: string
            Retry-After:
              description: Recommends the retryable time after receiving this.
              type: integer
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - LineOfCredits
      x-ms-examples:
        IncreaseLineOfCreditBySubscription:
          parameters:
            api-version: 2019-10-01-preview
            parameters:
              properties:
                creditLimit:
                  value: 20000
            subscriptionId: "{subscriptionId}"
          responses:
            "200":
              body:
                id: /subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingAccounts/default/lineOfCredit/default
                name: default
                properties:
                  creditLimit:
                    currency: USD
                    value: 20000
                  reason: null
                  remainingBalance:
                    currency: USD
                    value: 6000
                  status: Approved
                type: Microsoft.Billing/lineOfCredit
            "202":
              headers:
                Location: https://management.azure.com/providers/Microsoft.Billing/operationResults/44000000-0000-0000-0000-000000000000?api-version=2019-10-01-preview
                OData-EntityId: 44000000-0000-0000-0000-000000000000
                Retry-After: "60"
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
  "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default":
    get:
      description: Get billing property by subscription Id.
      externalDocs:
        url: https://docs.microsoft.com/en-us/rest/api/billing/
      operationId: BillingProperty_Get
      parameters:
        - $ref: "#/parameters/subscriptionIdParameter"
        - $ref: "#/parameters/apiVersionParameter"
      responses:
        "200":
          description: OK. The request has succeeded.
          schema:
            $ref: "#/definitions/BillingProperty"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/ErrorResponse"
      tags:
        - BillingProperties
      x-ms-examples:
        BillingProperty:
          parameters:
            api-version: 2019-10-01-preview
            subscriptionId: "{subscriptionId}"
          responses:
            "200":
              body:
                id: /subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingProperty/default
                name: default
                properties:
                  billingAccountDisplayName: My Account
                  billingAccountId: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                  billingProfileDisplayName: Contoso operations billing
                  billingProfileId: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/billingProfiles/11000000-0000-0000-0000-000000000000
                  billingTenantId: 90000000-0000-0000-0000-000000000011
                  costCenter: "1010"
                  invoiceSectionDisplayName: Contoso operations invoice section
                  invoiceSectionId: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000
                  productId: /providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000/products/44000000-0000-0000-0000-000000000000
                  productName: Standard Dev
                  skuDescription: Microsoft Azure Standard
                  skuId: "0001"
                type: Microsoft.Billing/billingProperty
definitions:
  AcceptTransferProperties:
    description: Request parameters to accept transfer.
    properties:
      productDetails:
        description: Request parameters to accept transfer.
        items:
          $ref: "#/definitions/ProductDetails"
        type: array
    type: object
  AcceptTransferRequest:
    description: Request parameters to accept transfer.
    properties:
      properties:
        $ref: "#/definitions/AcceptTransferProperties"
        description: Request parameters to accept transfer.
        x-ms-client-flatten: true
    type: object
  Action:
    description: the action the caller allowed to do
    readOnly: true
    type: string
  AddressDetails:
    description: Address details.
    properties:
      addressLine1:
        description: Address Line1.
        type: string
      addressLine2:
        description: Address Line2.
        type: string
      addressLine3:
        description: Address Line3.
        type: string
      city:
        description: Address City.
        type: string
      companyName:
        description: Company Name.
        type: string
      country:
        description: Country code uses ISO2, 2-digit format.
        type: string
      firstName:
        description: First Name.
        type: string
      lastName:
        description: Last Name.
        type: string
      postalCode:
        description: Address Postal Code.
        type: string
      region:
        description: Address Region.
        type: string
  AddressValidationStatus:
    description: Status of the address validation response.
    enum:
      - Valid
      - Invalid
    type: string
    x-ms-enum:
      modelAsString: true
      name: addressValidationStatus
  Agreement:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An agreement resource.
    properties:
      properties:
        $ref: "#/definitions/AgreementProperties"
        description: An agreement.
        x-ms-client-flatten: true
    type: object
  AgreementListResult:
    description: Result of listing agreements.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of agreements.
        items:
          $ref: "#/definitions/Agreement"
        readOnly: true
        type: array
  AgreementProperties:
    description: The properties of the agreement.
    properties:
      agreementLink:
        description: The link to the agreement.
        readOnly: true
        type: string
      effectiveDate:
        description: Effective date.
        format: date-time
        readOnly: true
        type: string
      expirationDate:
        description: Expiration date.
        format: date-time
        readOnly: true
        type: string
      participants:
        description: Participants or signer of the agreement.
        items:
          $ref: "#/definitions/Participants"
        type: array
      status:
        description: The agreement status
        readOnly: true
        type: string
  Amount:
    description: The Amount.
    properties:
      currency:
        description: The currency for the amount value.
        readOnly: true
        type: string
      value:
        description: Amount value.
        type: number
  AvailableBalance:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Latest available balance on Monetary Credit PI.
    properties:
      properties:
        $ref: "#/definitions/AvailableBalanceProperties"
        title: Available balance properties
        x-ms-client-flatten: true
    type: object
  AvailableBalanceProperties:
    description: The properties of available balance.
    properties:
      amount:
        $ref: "#/definitions/Amount"
        description: Balance Amount.
        readOnly: true
  AzurePlan:
    description: Details about the azure plan.
    properties:
      skuDescription:
        description: The sku description.
        readOnly: true
        type: string
      skuId:
        description: The sku id.
        type: string
  BillingAccount:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A billing account resource.
    properties:
      properties:
        $ref: "#/definitions/BillingAccountProperties"
        description: A billing account.
        x-ms-client-flatten: true
    type: object
  BillingAccountListResult:
    description: Result of listing billing accounts.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of billing accounts.
        items:
          $ref: "#/definitions/BillingAccount"
        readOnly: true
        type: array
  BillingAccountProperties:
    description: The properties of the billing account.
    properties:
      address:
        $ref: "#/definitions/AddressDetails"
        description: The address associated with billing account.
      agreementType:
        description: The type of agreement.
        enum:
          - MicrosoftCustomerAgreement
          - EnterpriseAgreement
          - MicrosoftOnlineServicesProgram
          - MicrosoftPartnerAgreement
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: AgreementType
      billingProfiles:
        description: The billing profiles associated to the billing account. By default this is not populated, unless it's specified in $expand.
        items:
          $ref: "#/definitions/BillingProfile"
        type: array
      customerType:
        description: The type of customer.
        enum:
          - Enterprise
          - Individual
          - Partner
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: CustomerType
      departments:
        description: The departments associated to the enrollment.
        items:
          $ref: "#/definitions/Department"
        type: array
      displayName:
        description: The billing account name.
        readOnly: true
        type: string
      enrollmentAccounts:
        description: The accounts associated to the enrollment.
        items:
          $ref: "#/definitions/EnrollmentAccount"
        type: array
      enrollmentDetails:
        $ref: "#/definitions/Enrollment"
        description: The details about the associated legacy enrollment. By default this is not populated, unless it's specified in $expand.
        readOnly: true
      organizationId:
        description: Organization id.
        readOnly: true
        type: string
  BillingAccountUpdateRequest:
    description: The request properties of the billing account that can be updated.
    properties:
      properties:
        $ref: "#/definitions/BillingAccountProperties"
        description: A billing property.
        x-ms-client-flatten: true
  BillingPermissionsListResult:
    description: Result of list billingPermissions a caller has on a billing account.
    properties:
      value:
        description: The list of billingPermissions a caller has on a billing account.
        items:
          $ref: "#/definitions/BillingPermissionsProperties"
        readOnly: true
        type: array
  BillingPermissionsProperties:
    description: The set of allowed action and not allowed actions a caller has on a billing account
    properties:
      actions:
        description: The set of actions that the caller is allowed to do
        items:
          $ref: "#/definitions/Action"
        readOnly: true
        type: array
      notActions:
        description: The set of actions the caller is not allowed to do
        items:
          $ref: "#/definitions/NotAction"
        readOnly: true
        type: array
    type: object
  BillingProfile:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A billing profile resource.
    properties:
      properties:
        $ref: "#/definitions/BillingProfileProperties"
        description: A billing profile.
        x-ms-client-flatten: true
    type: object
  BillingProfileCreationRequest:
    description: The request parameters for creating a new billing profile.
    properties:
      address:
        $ref: "#/definitions/AddressDetails"
        description: Billing address.
      displayName:
        description: The billing profile name.
        type: string
      enabledAzurePlans:
        description: Enabled azure plans for this billing profile.
        items:
          $ref: "#/definitions/AzurePlan"
        type: array
      invoiceEmailOptIn:
        description: If the billing profile is opted in to receive invoices via email.
        type: boolean
      poNumber:
        description: Purchase order number.
        type: string
  BillingProfileListResult:
    description: Result of listing billing profiles.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of billing profiles.
        items:
          $ref: "#/definitions/BillingProfile"
        readOnly: true
        type: array
  BillingProfileProperties:
    description: The properties of the billing profile.
    properties:
      address:
        $ref: "#/definitions/AddressDetails"
        description: Billing address.
      currency:
        description: The currency associated with the billing profile.
        readOnly: true
        type: string
      displayName:
        description: The billing profile name.
        type: string
      enabledAzurePlans:
        description: Information about the enabled azure plans.
        items:
          $ref: "#/definitions/AzurePlan"
        type: array
      invoiceDay:
        description: Invoice day.
        readOnly: true
        type: integer
      invoiceEmailOptIn:
        description: If the billing profile is opted in to receive invoices via email.
        type: boolean
      invoiceSections:
        description: The invoice sections associated to the billing profile.
        items:
          $ref: "#/definitions/InvoiceSection"
        type: array
      poNumber:
        description: Purchase order number.
        type: string
  BillingProperty:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A billing property resource.
    properties:
      properties:
        $ref: "#/definitions/BillingPropertyProperties"
        description: A billing property.
        x-ms-client-flatten: true
    type: object
  BillingPropertyProperties:
    description: The billing property.
    properties:
      billingAccountDisplayName:
        description: Billing account display name.
        readOnly: true
        type: string
      billingAccountId:
        description: Billing account Id.
        readOnly: true
        type: string
      billingProfileDisplayName:
        description: Billing profile display name.
        readOnly: true
        type: string
      billingProfileId:
        description: Billing profile Id.
        readOnly: true
        type: string
      billingTenantId:
        description: Billing tenant Id.
        readOnly: true
        type: string
      costCenter:
        description: Cost center name.
        readOnly: true
        type: string
      invoiceSectionDisplayName:
        description: Invoice Section display name.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Invoice Section Id.
        readOnly: true
        type: string
      productId:
        description: Product Id.
        readOnly: true
        type: string
      productName:
        description: Product name.
        readOnly: true
        type: string
      skuDescription:
        description: SKU description.
        readOnly: true
        type: string
      skuId:
        description: SKU Id.
        readOnly: true
        type: string
  BillingRoleAssignment:
    allOf:
      - $ref: "#/definitions/Resource"
    description: a role assignment
    properties:
      properties:
        $ref: "#/definitions/BillingRoleAssignmentProperties"
        description: The role assignment the caller has
        x-ms-client-flatten: true
    type: object
  BillingRoleAssignmentListResult:
    description: Result of get list of role assignments
    properties:
      value:
        description: The list role assignments
        items:
          $ref: "#/definitions/BillingRoleAssignment"
        readOnly: true
        type: array
  BillingRoleAssignmentPayload:
    description: The payload use to update role assignment on a scope
    properties:
      billingRoleDefinitionId:
        description: The role definition id
        type: string
      principalId:
        description: The user's principal id that the role gets assigned to
        type: string
  BillingRoleAssignmentProperties:
    description: The properties of the a role assignment.
    properties:
      createdByPrincipalId:
        description: the creator's principal Id
        readOnly: true
        type: string
      createdByPrincipalTenantId:
        description: the creator's tenant Id
        readOnly: true
        type: string
      createdOn:
        description: the date the role assignment is created
        readOnly: true
        type: string
      name:
        description: the name of the role assignment
        readOnly: true
        type: string
      principalId:
        description: The user's principal id that the role gets assigned to
        readOnly: true
        type: string
      roleDefinitionName:
        description: The role definition id
        readOnly: true
        type: string
      scope:
        description: The scope the role get assigned to
        readOnly: true
        type: string
  BillingRoleDefinition:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Result of get role definition for a role.
    properties:
      properties:
        $ref: "#/definitions/BillingRoleDefinitionProperties"
        description: The role definition for a role.
        x-ms-client-flatten: true
    type: object
  BillingRoleDefinitionListResult:
    description: list the role definitions.
    properties:
      value:
        description: The list of role definitions.
        items:
          $ref: "#/definitions/BillingRoleDefinition"
        readOnly: true
        type: array
  BillingRoleDefinitionProperties:
    description: The properties of the a role definition.
    properties:
      description:
        description: The role description
        readOnly: true
        type: string
      permissions:
        description: The billingPermissions the role has
        items:
          $ref: "#/definitions/BillingPermissionsProperties"
        type: array
      roleName:
        description: The name of the role
        readOnly: true
        type: string
  BillingSubscription:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A billing Subscription resource.
    properties:
      properties:
        $ref: "#/definitions/BillingSubscriptionProperties"
        title: Billing subscription properties
        x-ms-client-flatten: true
    type: object
  BillingSubscriptionProperties:
    description: The usage context properties.
    properties:
      billingProfileDisplayName:
        description: Billing Profile display name to which this product belongs.
        readOnly: true
        type: string
      billingProfileId:
        description: Billing Profile id to which this product belongs.
        readOnly: true
        type: string
      customerDisplayName:
        description: Display name of customer to which this product belongs.
        readOnly: true
        type: string
      customerId:
        description: Customer id to which this product belongs.
        readOnly: true
        type: string
      displayName:
        description: display name.
        readOnly: true
        type: string
      invoiceSectionDisplayName:
        description: Invoice section display name to which this product belongs.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Invoice section id to which this product belongs.
        readOnly: true
        type: string
      lastMonthCharges:
        $ref: "#/definitions/Amount"
        description: Last month charges.
        readOnly: true
      monthToDateCharges:
        $ref: "#/definitions/Amount"
        description: Month to date charges.
        readOnly: true
      reseller:
        $ref: "#/definitions/Reseller"
        description: Reseller for this subscription.
        readOnly: true
      skuDescription:
        description: The sku description.
        readOnly: true
        type: string
      skuId:
        description: The sku id.
        type: string
      subscriptionBillingStatus:
        description: Subscription billing status.
        enum:
          - Active
          - Inactive
          - Abandoned
          - Deleted
          - Warning
        type: string
        x-ms-enum:
          modelAsString: true
          name: BillingSubscriptionStatusType
      subscriptionId:
        description: Subscription Id.
        format: uuid
        readOnly: true
        type: string
  BillingSubscriptionsListResult:
    description: Result of listing billing subscriptions.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of billing subscriptions.
        items:
          $ref: "#/definitions/BillingSubscription"
        readOnly: true
        type: array
  Customer:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A partner's customer.
    properties:
      properties:
        $ref: "#/definitions/CustomerProperties"
        description: The customer.
        x-ms-client-flatten: true
    type: object
  CustomerListResult:
    description: Result of listing customers.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of customers.
        items:
          $ref: "#/definitions/Customer"
        readOnly: true
        type: array
  CustomerPolicy:
    allOf:
      - $ref: "#/definitions/Resource"
    description: The Customer's Policy.
    properties:
      properties:
        $ref: "#/definitions/CustomerPolicyProperties"
        title: Customer Policy properties
        x-ms-client-flatten: true
    type: object
  CustomerPolicyProperties:
    description: The properties of a Customer's policy.
    properties:
      viewCharges:
        description: Customer can view retail prices.
        enum:
          - Allowed
          - NotAllowed
        type: string
        x-ms-enum:
          modelAsString: true
          name: ViewCharges
  CustomerProperties:
    description: The properties of a customer.
    properties:
      displayName:
        description: The name of the customer.
        type: string
      enabledAzurePlans:
        description: Information about the product.
        items:
          $ref: "#/definitions/AzurePlan"
        type: array
      resellers:
        description: The resellers which are allowed to provide service to this customer.
        items:
          $ref: "#/definitions/Reseller"
        type: array
  Department:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A department resource.
    properties:
      properties:
        $ref: "#/definitions/DepartmentProperties"
        description: A department.
        x-ms-client-flatten: true
    type: object
  DepartmentListResult:
    description: Result of listing departments.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of departments.
        items:
          $ref: "#/definitions/Department"
        readOnly: true
        type: array
  DepartmentProperties:
    description: The properties of the department.
    properties:
      costCenter:
        description: The cost center name.
        type: string
      departmentName:
        description: The name for department.
        type: string
      enrollmentAccounts:
        description: Associated enrollment accounts. By default this is not populated, unless it's specified in $expand.
        items:
          $ref: "#/definitions/EnrollmentAccount"
        type: array
      status:
        description: The status for department.
        type: string
  DetailedTransferStatus:
    description: Detailed transfer status.
    properties:
      errorDetails:
        $ref: "#/definitions/Error"
        description: Error details for transfer execution.
      productId:
        description: Id of product being transferred.
        readOnly: true
        type: string
      productType:
        $ref: "#/definitions/ProductType"
        description: Type of product being transferred.
        readOnly: true
        type: string
      transferStatus:
        $ref: "#/definitions/ProductTransferStatus"
        description: Transfer status.
        readOnly: true
        type: string
    type: object
  Document:
    description: The properties of the invoice download.
    properties:
      kind:
        description: Document type.
        enum:
          - Invoice
          - VoidNote
          - Receipt
          - CreditNote
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: DocumentType
      url:
        description: Document URL.
        readOnly: true
        type: string
  DownloadUrl:
    description: A secure URL that can be used to download a an entity until the URL expires.
    properties:
      expiryTime:
        description: The time in UTC at which this download URL will expire.
        format: date-time
        readOnly: true
        type: string
      url:
        description: The URL to the PDF file.
        readOnly: true
        type: string
  EligibleProductType:
    description: Type of the products that can be transferred.
    enum:
      - DevTestAzureSubscription
      - StandardAzureSubscription
      - AzureReservation
    type: string
    x-ms-enum:
      modelAsString: true
      name: eligibleProductType
  Enrollment:
    description: Current entity level details
    properties:
      billingCycle:
        description: Enrollment billing cycle
        readOnly: true
        type: string
      channel:
        description: The channel for Enrollment
        readOnly: true
        type: string
      countryCode:
        description: The countryCode for Enrollment
        readOnly: true
        type: string
      currency:
        description: The currency associated with enrollment
        readOnly: true
        type: string
      endDate:
        description: Enrollment End Date
        format: date-time
        type: string
      language:
        description: The language for Enrollment
        readOnly: true
        type: string
      policies:
        $ref: "#/definitions/EnrollmentPolicies"
        description: The attributes associated with legacy enrollment.
        readOnly: true
      startDate:
        description: Enrollment Start Date
        format: date-time
        type: string
      status:
        description: Enrollment status
        readOnly: true
        type: string
  EnrollmentAccount:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An account resource.
    properties:
      properties:
        $ref: "#/definitions/EnrollmentAccountProperties"
        description: An account.
        x-ms-client-flatten: true
    type: object
  EnrollmentAccountContext:
    description: The rating context.
    properties:
      costCenter:
        description: The cost center name.
        type: string
      endDate:
        description: Account End Date
        format: date-time
        type: string
      enrollmentAccountName:
        description: The enrollment account id.
        type: string
      startDate:
        description: Account Start Date
        format: date-time
        type: string
  EnrollmentAccountListResult:
    description: Result of listing enrollment accounts.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of enrollment accounts.
        items:
          $ref: "#/definitions/EnrollmentAccount"
        readOnly: true
        type: array
  EnrollmentAccountProperties:
    description: The properties of the account.
    properties:
      accountName:
        description: The account name.
        type: string
      accountOwner:
        description: The account owner
        type: string
      costCenter:
        description: The cost center name.
        type: string
      department:
        $ref: "#/definitions/Department"
        description: Associated department. By default this is not populated, unless it's specified in $expand.
      endDate:
        description: Account End Date
        format: date-time
        type: string
      startDate:
        description: Account Start Date
        format: date-time
        type: string
      status:
        description: The status for account.
        type: string
  EnrollmentPolicies:
    description: The attributes associated with legacy enrollment
    properties:
      accountOwnerViewCharges:
        description: The accountOwnerViewCharges flag for Enrollment
        readOnly: true
        type: boolean
      departmentAdminViewCharges:
        description: The departmentAdminViewCharges flag for Enrollment
        readOnly: true
        type: boolean
      marketplacesEnabled:
        description: The marketplaces flag for Enrollment
        readOnly: true
        type: boolean
      reservedInstancesEnabled:
        description: The reserved instances flag for Enrollment
        readOnly: true
        type: boolean
  Error:
    description: Error details for transfer execution.
    properties:
      errorCode:
        description: Error code.
        readOnly: true
        type: string
      errorMessage:
        description: Error message.
        readOnly: true
        type: string
  ErrorDetails:
    description: The details of the error.
    properties:
      code:
        description: Error code.
        readOnly: true
        type: string
      message:
        description: Error message indicating why the operation failed.
        readOnly: true
        type: string
      target:
        description: The target of the particular error.
        readOnly: true
        type: string
  ErrorResponse:
    description: Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
    properties:
      error:
        $ref: "#/definitions/ErrorDetails"
        description: The details of the error.
    type: object
  InitiateTransferProperties:
    description: Request parameters to initiate transfer.
    properties:
      recipientEmailId:
        description: Email Id of recipient for transfer.
        type: string
      resellerId:
        description: Optional reseller Id for transfer.
        type: string
    type: object
  InitiateTransferRequest:
    description: Request parameters to initiate transfer.
    properties:
      properties:
        $ref: "#/definitions/InitiateTransferProperties"
        description: Request parameters to initiate transfer.
        x-ms-client-flatten: true
    type: object
  Instruction:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A instruction resource.
    properties:
      properties:
        $ref: "#/definitions/InstructionProperties"
        description: A billing instruction.
        x-ms-client-flatten: true
    type: object
  InstructionListResult:
    description: Result of listing instructions.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of instructions.
        items:
          $ref: "#/definitions/Instruction"
        readOnly: true
        type: array
  InstructionProperties:
    description: A billing instruction used during invoice generation.
    properties:
      amount:
        description: The amount budgeted for this billing instruction.
        type: number
      endDate:
        description: The date this billing instruction is no longer in effect.
        format: date-time
        type: string
      startDate:
        description: The date this billing instruction goes into effect.
        format: date-time
        type: string
    required:
      - amount
      - startDate
      - endDate
  Invoice:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An invoice resource.
    properties:
      properties:
        $ref: "#/definitions/InvoiceProperties"
        description: An invoice.
        x-ms-client-flatten: true
    type: object
  InvoiceListResult:
    description: Result of listing invoices.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of invoices.
        items:
          $ref: "#/definitions/Invoice"
        readOnly: true
        type: array
  InvoiceProperties:
    description: The properties of the invoice.
    properties:
      amountDue:
        $ref: "#/definitions/Amount"
        description: Amount due.
        readOnly: true
      billedAmount:
        $ref: "#/definitions/Amount"
        description: Amount billed.
        readOnly: true
      billingProfileDisplayName:
        description: The billing profile display name this invoice belongs to.
        readOnly: true
        type: string
      billingProfileId:
        description: The billing profile id this invoice belongs to.
        readOnly: true
        type: string
      documents:
        description: List of documents available to download including invoice and tax documents.
        items:
          $ref: "#/definitions/Document"
        readOnly: true
        type: array
      dueDate:
        description: The due date for invoice.
        format: date-time
        readOnly: true
        type: string
      invoiceDate:
        description: The date when invoice was created.
        format: date-time
        readOnly: true
        type: string
      invoicePeriodEndDate:
        description: The end date of the billing period.
        format: date-time
        readOnly: true
        type: string
      invoicePeriodStartDate:
        description: The start date of the billing period.
        format: date-time
        readOnly: true
        type: string
      invoiceType:
        description: Invoice type.
        enum:
          - AzureService
          - AzureMarketplace
          - AzureSupport
        readOnly: true
        x-ms-enum:
          modelAsString: true
          name: InvoiceType
      payments:
        description: List of payments.
        items:
          $ref: "#/definitions/PaymentProperties"
        readOnly: true
        type: array
      purchaseOrderNumber:
        description: The purchase identifier for the invoice.
        readOnly: true
        type: string
      status:
        description: Invoice status.
        enum:
          - PastDue
          - Due
          - Paid
          - Void
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: InvoiceStatus
  InvoiceSection:
    allOf:
      - $ref: "#/definitions/Resource"
    description: An InvoiceSection resource.
    properties:
      properties:
        $ref: "#/definitions/InvoiceSectionProperties"
        description: The InvoiceSection.
        x-ms-client-flatten: true
    type: object
  InvoiceSectionCreationRequest:
    description: The properties of an InvoiceSection.
    properties:
      displayName:
        description: The name of the InvoiceSection.
        type: string
  InvoiceSectionListResult:
    description: Result of listing invoice sections.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of invoice sections.
        items:
          $ref: "#/definitions/InvoiceSection"
        readOnly: true
        type: array
  InvoiceSectionListWithCreateSubPermissionResult:
    description: Result of listing invoice section properties with create subscription permission.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of invoice section properties with create subscription permission.
        items:
          $ref: "#/definitions/InvoiceSectionWithCreateSubPermission"
        type: array
    type: object
  InvoiceSectionProperties:
    description: The properties of an InvoiceSection.
    properties:
      displayName:
        description: The name of the InvoiceSection.
        type: string
  InvoiceSectionWithCreateSubPermission:
    description: Invoice section properties with create subscription permission.
    properties:
      billingProfileDisplayName:
        description: Billing profile display name.
        readOnly: true
        type: string
      billingProfileId:
        description: Billing profile Id.
        readOnly: true
        type: string
      enabledAzurePlans:
        description: Enabled azure plans for the associated billing profile.
        items:
          $ref: "#/definitions/AzurePlan"
        type: array
      invoiceSectionDisplayName:
        description: Invoice Section display name.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Invoice Section Id.
        readOnly: true
        type: string
  LineOfCredit:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Line of credit resource.
    properties:
      properties:
        $ref: "#/definitions/LineOfCreditProperties"
        description: A line of credit.
        x-ms-client-flatten: true
    type: object
  LineOfCreditProperties:
    description: The properties of the line of credit.
    properties:
      creditLimit:
        $ref: "#/definitions/Amount"
        description: The current credit limit.
        readOnly: false
      reason:
        description: The reason for the line of credit status when not approved.
        readOnly: true
        type: string
      remainingBalance:
        $ref: "#/definitions/Amount"
        description: Remaining balance.
        readOnly: true
      status:
        description: The line of credit status.
        enum:
          - Approved
          - Rejected
        type: string
        x-ms-enum:
          modelAsString: true
          name: status
  NotAction:
    description: the action the caller doesn't allowed to do
    readOnly: true
    type: string
  Operation:
    description: A Billing REST API operation.
    properties:
      display:
        description: The object that represents the operation.
        properties:
          operation:
            description: "Operation type: Read, write, delete, etc."
            readOnly: true
            type: string
          provider:
            description: "Service provider: Microsoft.Billing."
            readOnly: true
            type: string
          resource:
            description: "Resource on which the operation is performed: Invoice, etc."
            readOnly: true
            type: string
      name:
        description: "Operation name: {provider}/{resource}/{operation}."
        readOnly: true
        type: string
    type: object
  OperationListResult:
    description: Result listing billing operations. It contains a list of operations and a URL link to get the next set of results.
    properties:
      nextLink:
        description: URL to get the next set of operation list results if there are any.
        readOnly: true
        type: string
      value:
        description: List of billing operations supported by the Microsoft.Billing resource provider.
        items:
          $ref: "#/definitions/Operation"
        readOnly: true
        type: array
  Participants:
    description: Details about the participant or signer.
    properties:
      email:
        description: The email address of the participant or signer.
        readOnly: true
        type: string
      status:
        description: The signing status
        readOnly: true
        type: string
      statusDate:
        description: The date when status got changed.
        format: date-time
        readOnly: true
        type: string
  PaymentMethod:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A payment method resource.
    properties:
      properties:
        $ref: "#/definitions/PaymentMethodProperties"
        title: Payment method properties
        x-ms-client-flatten: true
    type: object
  PaymentMethodProperties:
    description: The properties of the payment method.
    properties:
      currency:
        description: The currency associated with the payment method.
        readOnly: true
        type: string
      details:
        description: Details about the payment method.
        readOnly: true
        type: string
      expiration:
        description: Expiration month and year.
        readOnly: true
        type: string
      paymentMethodType:
        description: Payment method type.
        enum:
          - Credits
          - ChequeWire
        type: string
        x-ms-enum:
          modelAsString: true
          name: PaymentMethodType
  PaymentMethodsListResult:
    description: Result of listing payment methods.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of payment methods.
        items:
          $ref: "#/definitions/PaymentMethod"
        readOnly: true
        type: array
  PaymentProperties:
    description: The properties of the payment.
    properties:
      amount:
        $ref: "#/definitions/Amount"
        description: The paid amount.
        readOnly: true
      date:
        description: The date of the payment.
        format: date-time
        readOnly: true
        type: string
      paymentMethodFamily:
        description: The payment method family.
        enum:
          - Credits
          - CheckWire
          - CreditCard
          - None
        type: string
        x-ms-enum:
          modelAsString: true
          name: PaymentMethodFamily
      paymentMethodType:
        description: The type of payment method.
        readOnly: true
        type: string
      paymentType:
        description: The type of payment.
        readOnly: true
        type: string
  Policy:
    allOf:
      - $ref: "#/definitions/Resource"
    description: The Policy.
    properties:
      properties:
        $ref: "#/definitions/PolicyProperties"
        title: Policy properties
        x-ms-client-flatten: true
    type: object
  PolicyProperties:
    description: The properties of policy.
    properties:
      marketplacePurchases:
        description: The marketplace purchases are free, allowed or not allowed.
        enum:
          - AllAllowed
          - OnlyFreeAllowed
          - NotAllowed
        type: string
        x-ms-enum:
          modelAsString: true
          name: MarketplacePurchasesPolicy
      reservationPurchases:
        description: The reservation purchases allowed or not.
        enum:
          - Allowed
          - NotAllowed
        type: string
        x-ms-enum:
          modelAsString: true
          name: ReservationPurchasesPolicy
      viewCharges:
        description: Who can view charges.
        enum:
          - Allowed
          - NotAllowed
        type: string
        x-ms-enum:
          modelAsString: true
          name: ViewChargesPolicy
  Product:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A product resource.
    properties:
      properties:
        $ref: "#/definitions/ProductProperties"
        title: Product properties
        x-ms-client-flatten: true
    type: object
  ProductDetails:
    description: Details of the product to be transferred.
    properties:
      productId:
        description: Id of product to be transferred.
        type: string
      productType:
        $ref: "#/definitions/ProductType"
        description: Type of the product to be transferred.
    type: object
  ProductProperties:
    description: The properties of the product.
    properties:
      availabilityId:
        description: Availability Id.
        readOnly: true
        type: string
      billingFrequency:
        description: Billing frequency.
        enum:
          - OneTime
          - Monthly
          - UsageBased
        type: string
        x-ms-enum:
          modelAsString: true
          name: BillingFrequency
      billingProfileDisplayName:
        description: Billing Profile display name to which this product belongs.
        readOnly: true
        type: string
      billingProfileId:
        description: Billing Profile id to which this product belongs.
        readOnly: true
        type: string
      customerDisplayName:
        description: Display name of customer to which this product belongs.
        readOnly: true
        type: string
      customerId:
        description: Customer id to which this product belongs.
        readOnly: true
        type: string
      displayName:
        description: The display name of the product.
        readOnly: true
        type: string
      endDate:
        description: end date.
        format: date-time
        readOnly: true
        type: string
      invoiceSectionDisplayName:
        description: Invoice section display name to which this product belongs.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Invoice section id to which this product belongs.
        readOnly: true
        type: string
      lastCharge:
        $ref: "#/definitions/Amount"
        description: Last month charges.
        readOnly: true
      lastChargeDate:
        description: The date of the last charge.
        format: date-time
        readOnly: true
        type: string
      parentProductId:
        description: Parent Product Id.
        readOnly: true
        type: string
      productType:
        description: The type of product.
        readOnly: true
        type: string
      productTypeId:
        description: The product type id.
        readOnly: true
        type: string
      purchaseDate:
        description: The date of purchase.
        format: date-time
        readOnly: true
        type: string
      quantity:
        description: The purchased product quantity.
        readOnly: true
        type: number
      reseller:
        $ref: "#/definitions/Reseller"
        description: Reseller for this product.
        readOnly: true
      skuDescription:
        description: Sku description.
        readOnly: true
        type: string
      skuId:
        description: Sku Id.
        readOnly: true
        type: string
      status:
        description: Product status.
        enum:
          - Active
          - Inactive
          - PastDue
          - Expiring
          - Expired
          - Disabled
          - Cancelled
          - AutoRenew
        type: string
        x-ms-enum:
          modelAsString: true
          name: ProductStatusType
  ProductTransferStatus:
    description: Possible transfer status.
    enum:
      - NotStarted
      - InProgress
      - Completed
      - Failed
    type: string
    x-ms-enum:
      modelAsString: true
      name: productTransferStatus
  ProductTransferValidationErrorCode:
    description: Error code of the transfer validation response.
    enum:
      - InvalidSource
      - ProductNotActive
      - InsufficientPermissionOnSource
      - InsufficientPermissionOnDestination
      - DestinationBillingProfilePastDue
      - ProductTypeNotSupported
      - CrossBillingAccountNotAllowed
      - NotAvailableForDestinationMarket
      - OneTimePurchaseProductTransferNotAllowed
    type: string
    x-ms-enum:
      modelAsString: true
      name: productTransferValidationErrorCode
  ProductType:
    description: Type of the product to be transferred.
    enum:
      - AzureSubscription
      - AzureReservation
    type: string
    x-ms-enum:
      modelAsString: true
      name: productType
  ProductsListResult:
    description: Result of listing products. It contains a list of available products summaries in reverse chronological order by purchase date.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of products.
        items:
          $ref: "#/definitions/Product"
        readOnly: true
        type: array
  RecipientTransferDetails:
    description: Details of the transfer.
    properties:
      properties:
        $ref: "#/definitions/RecipientTransferProperties"
        description: Details of the transfer.
        x-ms-client-flatten: true
    type: object
  RecipientTransferDetailsListResult:
    description: Result of listing details of the transfer received by caller.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of transfers received by caller.
        items:
          $ref: "#/definitions/RecipientTransferDetails"
        readOnly: true
        type: array
  RecipientTransferProperties:
    description: Transfer Details.
    properties:
      allowedProductType:
        description: Type of subscriptions that can be transferred.
        items:
          $ref: "#/definitions/EligibleProductType"
        readOnly: true
        type: array
      canceledBy:
        description: Email Id who user canceled the transfer.
        readOnly: true
        type: string
      creationTime:
        description: Transfer creation time.
        format: date-time
        readOnly: true
        type: string
      detailedTransferStatus:
        description: Detailed transfer status.
        items:
          $ref: "#/definitions/DetailedTransferStatus"
        readOnly: true
        type: array
      expirationTime:
        description: Transfer expiration time.
        format: date-time
        readOnly: true
        type: string
      initiatorCustomerType:
        description: Customer type of the initiator.
        readOnly: true
        type: string
      initiatorEmailId:
        description: Email Id of initiator of transfer.
        readOnly: true
        type: string
      lastModifiedTime:
        description: Transfer last modification time.
        format: date-time
        readOnly: true
        type: string
      recipientEmailId:
        description: Email Id of recipient of transfer.
        readOnly: true
        type: string
      resellerId:
        description: Reseller Id for transfer.
        readOnly: true
        type: string
      resellerName:
        description: Reseller name for transfer.
        readOnly: true
        type: string
      transferStatus:
        $ref: "#/definitions/TransferStatus"
        description: Overall transfer status.
        readOnly: true
        type: string
    type: object
  Reseller:
    description: Details about a reseller.
    properties:
      description:
        description: A description of the reseller.
        readOnly: true
        type: string
      resellerId:
        description: The reseller id.
        readOnly: true
        type: string
  Resource:
    description: The Resource model definition.
    properties:
      id:
        description: Resource Id.
        readOnly: true
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      type:
        description: Resource type.
        readOnly: true
        type: string
    x-ms-azure-resource: true
  SubscriptionTransferValidationErrorCode:
    description: Error code of the transfer validation response.
    enum:
      - InvalidSource
      - SubscriptionNotActive
      - InsufficientPermissionOnSource
      - InsufficientPermissionOnDestination
      - DestinationBillingProfilePastDue
      - SubscriptionTypeNotSupported
      - CrossBillingAccountNotAllowed
      - NotAvailableForDestinationMarket
    type: string
    x-ms-enum:
      modelAsString: true
      name: subscriptionTransferValidationErrorCode
  Transaction:
    allOf:
      - $ref: "#/definitions/Resource"
    description: A reservation transaction resource.
    properties:
      properties:
        $ref: "#/definitions/TransactionProperties"
        title: Reservation transaction properties
        x-ms-client-flatten: true
    type: object
  TransactionListResult:
    description: Result of listing reservation transactions.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of reservation transactions.
        items:
          $ref: "#/definitions/Transaction"
        readOnly: true
        type: array
  TransactionProperties:
    description: The properties of the reservation transaction.
    properties:
      billingProfileDisplayName:
        description: Billing Profile display name to which this product belongs.
        readOnly: true
        type: string
      billingProfileId:
        description: Billing Profile id to which this product belongs.
        readOnly: true
        type: string
      customerDisplayName:
        description: Display name of customer to which this product belongs.
        readOnly: true
        type: string
      customerId:
        description: Customer id to which this product belongs.
        readOnly: true
        type: string
      date:
        description: The date of reservation transaction.
        format: date-time
        readOnly: true
        type: string
      invoice:
        description: Invoice number or 'pending' if not invoiced.
        readOnly: true
        type: string
      invoiceSectionDisplayName:
        description: Invoice section display name to which this product belongs.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Invoice section id to which this product belongs.
        readOnly: true
        type: string
      kind:
        description: The kind of transaction. Choices are all and reservation.
        enum:
          - all
          - reservation
        type: string
        x-ms-enum:
          modelAsString: true
          name: TransactionTypeKind
      orderId:
        description: The reservation order id.
        readOnly: true
        type: string
      orderName:
        description: The reservation order name.
        readOnly: true
        type: string
      productDescription:
        description: Product description.
        readOnly: true
        type: string
      productFamily:
        description: The product family.
        readOnly: true
        type: string
      productType:
        description: The type of product.
        readOnly: true
        type: string
      productTypeId:
        description: The product type id.
        readOnly: true
        type: string
      quantity:
        description: Purchase quantity.
        readOnly: true
        type: integer
      subscriptionId:
        description: The subscription id.
        readOnly: true
        type: string
      subscriptionName:
        description: The subscription name.
        readOnly: true
        type: string
      transactionAmount:
        $ref: "#/definitions/Amount"
        description: Last charge associated with the purchase.
        readOnly: true
      transactionType:
        description: Transaction types.
        enum:
          - Purchase
          - Usage Charge
        type: string
        x-ms-enum:
          modelAsString: true
          name: ReservationType
  TransferBillingSubscriptionRequest:
    description: Request parameters to transfer billing subscription.
    properties:
      properties:
        $ref: "#/definitions/TransferBillingSubscriptionRequestProperties"
        description: Request parameters to transfer billing subscription.
        x-ms-client-flatten: true
    type: object
  TransferBillingSubscriptionRequestProperties:
    description: Request parameters to transfer billing subscription.
    properties:
      destinationBillingProfileId:
        description: The destination billing profile id.
        type: string
      destinationInvoiceSectionId:
        description: The destination invoice section id.
        type: string
    type: object
  TransferBillingSubscriptionResult:
    description: Request parameters to transfer billing subscription.
    properties:
      properties:
        $ref: "#/definitions/TransferBillingSubscriptionResultProperties"
        description: Request parameters to transfer billing subscription.
        x-ms-client-flatten: true
    type: object
  TransferBillingSubscriptionResultProperties:
    description: Transfer billing subscription result properties.
    properties:
      billingSubscriptionName:
        description: The destination billing subscription id.
        type: string
    type: object
  TransferDetails:
    description: Details of the transfer.
    properties:
      properties:
        $ref: "#/definitions/TransferProperties"
        description: Details of the transfer.
        x-ms-client-flatten: true
    type: object
  TransferDetailsListResult:
    description: Result of listing details of the transfer initiated by caller.
    properties:
      nextLink:
        description: The link (url) to the next page of results.
        readOnly: true
        type: string
      value:
        description: The list of transfers initiated by caller.
        items:
          $ref: "#/definitions/TransferDetails"
        readOnly: true
        type: array
  TransferProductRequestProperties:
    description: The properties of the product to initiate a transfer.
    properties:
      destinationBillingProfileId:
        description: The destination billing profile id.
        type: string
      destinationInvoiceSectionId:
        description: The destination invoice section id.
        type: string
  TransferProperties:
    description: Transfer details
    properties:
      billingAccountId:
        description: Target billing account Id.
        readOnly: true
        type: string
      billingProfileId:
        description: Target billing profile Id.
        readOnly: true
        type: string
      canceledBy:
        description: Email Id who user canceled the transfer.
        readOnly: true
        type: string
      creationTime:
        description: Transfer creation time.
        format: date-time
        readOnly: true
        type: string
      detailedTransferStatus:
        description: Detailed transfer status.
        items:
          $ref: "#/definitions/DetailedTransferStatus"
        readOnly: true
        type: array
      expirationTime:
        description: Transfer expiration time.
        format: date-time
        readOnly: true
        type: string
      initiatorCustomerType:
        description: Customer type of the initiator.
        readOnly: true
        type: string
      initiatorEmailId:
        description: Email Id of initiator of transfer.
        readOnly: true
        type: string
      invoiceSectionId:
        description: Target invoice section Id.
        readOnly: true
        type: string
      lastModifiedTime:
        description: Transfer last modification time.
        format: date-time
        readOnly: true
        type: string
      recipientEmailId:
        description: Email Id of recipient of transfer.
        readOnly: true
        type: string
      resellerId:
        description: Reseller Id for transfer.
        readOnly: true
        type: string
      resellerName:
        description: Reseller name for transfer.
        readOnly: true
        type: string
      transferStatus:
        $ref: "#/definitions/TransferStatus"
        description: Overall transfer status.
        readOnly: true
        type: string
    type: object
  TransferStatus:
    description: Possible transfer status.
    enum:
      - Pending
      - InProgress
      - Completed
      - CompletedWithErrors
      - Failed
      - Canceled
      - Declined
    type: string
    x-ms-enum:
      modelAsString: true
      name: transferStatus
  UpdateAutoRenewOperation:
    description: Summary of cancel product operation
    properties:
      properties:
        $ref: "#/definitions/UpdateAutoRenewOperationProperties"
        description: Summary of update auto renew operation properties
        x-ms-client-flatten: true
    type: object
  UpdateAutoRenewOperationProperties:
    description: update auto renew operation properties
    properties:
      endDate:
        description: The end date of this asset
        format: date-time
        type: string
    type: object
  UpdateAutoRenewRequest:
    description: Request parameters to update auto renew for support product.
    properties:
      autoRenew:
        description: Request parameters to update auto renew policy a product.
        enum:
          - "true"
          - "false"
        type: string
        x-ms-enum:
          modelAsString: true
          name: UpdateAutoRenew
    type: object
  ValidateAddressResponse:
    description: Result of the address validation
    properties:
      status:
        $ref: "#/definitions/AddressValidationStatus"
        description: status of the address validation.
      suggestedAddresses:
        description: list of suggested addresses.
        items:
          $ref: "#/definitions/AddressDetails"
        type: array
      validationMessage:
        description: Validation error message.
        type: string
    type: object
  ValidateProductTransferEligibilityError:
    description: Error details of the product transfer eligibility validation.
    properties:
      code:
        $ref: "#/definitions/ProductTransferValidationErrorCode"
        description: Error code for the product transfer validation.
      details:
        description: Detailed error message explaining the error.
        type: string
      message:
        description: The error message.
        type: string
    type: object
  ValidateProductTransferEligibilityResult:
    description: Result of the product transfer eligibility validation.
    properties:
      errorDetails:
        $ref: "#/definitions/ValidateProductTransferEligibilityError"
        description: Validation error details.
      isTransferEligible:
        description: Specifies whether the transfer is eligible or not.
        readOnly: true
        type: boolean
    type: object
  ValidateSubscriptionTransferEligibilityError:
    description: Error details of the transfer eligibility validation
    properties:
      code:
        $ref: "#/definitions/SubscriptionTransferValidationErrorCode"
        description: Error code for the product transfer validation.
      details:
        description: Detailed error message explaining the error.
        type: string
      message:
        description: The error message.
        type: string
    type: object
  ValidateSubscriptionTransferEligibilityResult:
    description: Result of the transfer eligibility validation.
    properties:
      errorDetails:
        $ref: "#/definitions/ValidateSubscriptionTransferEligibilityError"
        description: Validation error details.
      isTransferEligible:
        description: Specifies whether the transfer is eligible or not.
        readOnly: true
        type: boolean
    type: object
  ValidateTransferListResponse:
    description: Result of transfer validation.
    properties:
      value:
        description: The list of transfer validation results.
        items:
          $ref: "#/definitions/ValidateTransferResponse"
        readOnly: true
        type: array
  ValidateTransferResponse:
    description: Transfer validation response.
    properties:
      properties:
        $ref: "#/definitions/ValidateTransferResponseProperties"
        description: Transfer validation response properties.
        x-ms-client-flatten: true
    type: object
  ValidateTransferResponseProperties:
    description: Properties of transfer validation response.
    properties:
      productId:
        description: The product id for which this result applies.
        readOnly: true
        type: string
      results:
        description: Array of validation results.
        items:
          $ref: "#/definitions/ValidationResultProperties"
        type: array
      status:
        description: The status of validation
        readOnly: true
        type: string
    type: object
  ValidationResultProperties:
    description: The properties of the validation result.
    properties:
      code:
        description: Result Code.
        readOnly: true
        type: string
      level:
        description: Result Level.
        readOnly: true
        type: string
      message:
        description: The validation message.
        readOnly: true
        type: string
